com.neeve.lang
Class XDateArrayIterator

java.lang.Object
  extended by com.neeve.lang.XArrayIterator<Date>
      extended by com.neeve.lang.XDateArrayIterator
All Implemented Interfaces:
XDateIterator, XIterator<Date>, Iterator<Date>

public class XDateArrayIterator
extends XArrayIterator<Date>
implements XDateIterator

An XArrayIterator implementing XDateIterator


Constructor Summary
XDateArrayIterator(Date[] array)
          Constructs a new array iterator.
XDateArrayIterator(Date[] array, int offset, int length)
          Constructs a new array iterator.
 
Method Summary
 long nextAsTimestamp()
          Gets the next value as a timestamp.
 
Methods inherited from class com.neeve.lang.XArrayIterator
array, hasNext, length, next, offset, remove, toFirst
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.neeve.lang.XIterator
toFirst
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Constructor Detail

XDateArrayIterator

public XDateArrayIterator(Date[] array)
Constructs a new array iterator.

Parameters:
array - The array to iterate.

XDateArrayIterator

public XDateArrayIterator(Date[] array,
                          int offset,
                          int length)
Constructs a new array iterator.

Parameters:
array - The backing array.
offset - The offset into the array.
length - The length the number of elements including the offset to iterate.
Method Detail

nextAsTimestamp

public final long nextAsTimestamp()
Description copied from interface: XDateIterator
Gets the next value as a timestamp.

This call has the same semantics as Iterator.next() except that the iterator implementation may be able to avoid allocating a Date object.

While this method is provided in support of zero garbage iteration it is implementation depend as to whether or not this call is zero garbage.

Unless otherwise documented a null value is returned as -1.

Specified by:
nextAsTimestamp in interface XDateIterator


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.