Class DataStorage.AbstractIterator

java.lang.Object
org.apfloat.spi.DataStorage.Iterator
org.apfloat.spi.DataStorage.AbstractIterator
All Implemented Interfaces:
Serializable, AutoCloseable
Direct Known Subclasses:
DoubleDiskDataStorage.BlockIterator, DoubleMemoryDataStorage.ReadWriteIterator, FloatDiskDataStorage.BlockIterator, FloatMemoryDataStorage.ReadWriteIterator, IntDiskDataStorage.BlockIterator, IntMemoryDataStorage.ReadWriteIterator, LongDiskDataStorage.BlockIterator, LongMemoryDataStorage.ReadWriteIterator
Enclosing class:
DataStorage

protected abstract class DataStorage.AbstractIterator extends DataStorage.Iterator
Abstract base class for iterators iterating through this DataStorage. This class provides most of the common functionality needed.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
     
    private long
     
    private int
     
    private long
     
    private static final long
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractIterator(int mode, long startPosition, long endPosition)
    Construct a new iterator.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Checks if any of the get() methods can be called.
    protected void
    Checks if the iterator is at the end yet.
    protected void
    Checks if any of the set() methods can be called.
    double
    Gets the current element as a double.
    float
    Gets the current element as a float.
    protected int
    Returns the increment of the iterator.
    int
    Gets the current element as an int.
    protected long
    Returns the remaining length in the iterator.
    long
    Gets the current element as a long.
    protected int
    Returns the mode in which the iterator was created.
    protected long
    Returns the current position of the iterator.
    boolean
    Check if next() can be called without going past the end of the sequence.
    void
    Advances the position in the stream by one element.
    void
    setDouble(double value)
    Sets the current element as a double.
    void
    setFloat(float value)
    Sets the current element as a float.
    void
    setInt(int value)
    Sets the current element as an int.
    void
    setLong(long value)
    Sets the current element as a long.

    Methods inherited from class org.apfloat.spi.DataStorage.Iterator

    close, get, set

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait