|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apfloat.spi.DataStorage.Iterator
public abstract static class DataStorage.Iterator
Iterator for iterating through elements of the data storage.
| Constructor Summary | |
|---|---|
protected |
DataStorage.Iterator()
Default constructor. |
| Method Summary | |
|---|---|
void |
close()
Closes the iterator. |
double |
getDouble()
Gets the current element as a double. |
float |
getFloat()
Gets the current element as a float. |
int |
getInt()
Gets the current element as an int. |
long |
getLong()
Gets the current element as a long. |
boolean |
hasNext()
Check if next() can be called without going past the end of the sequence. |
void |
next()
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected DataStorage.Iterator()
| Method Detail |
|---|
public boolean hasNext()
next() can be called without going past the end of the sequence.
That is, if next() can be called without deliberately causing an exception.
Note: It is important that the iterator is iterated
past the last element; that is next() is called
startPosition - endPosition times. The
get() or set() methods should not
be called for the last element.
The default implementation always returns false.
true if next() can be called, otherwise false.
public void next()
throws IllegalStateException,
ApfloatRuntimeException
Note: It is important that the iterator is iterated
past the last element; that is next() is called
startPosition - endPosition times. The
get() or set() methods should not
be called for the last element.
The default implementation always throws IllegalStateException.
IllegalStateException - If the iterator has been iterated to the end already.
ApfloatRuntimeException
public int getInt()
throws UnsupportedOperationException,
IllegalStateException,
ApfloatRuntimeException
int.
The default implementation always throws UnsupportedOperationException.
int.
UnsupportedOperationException - If the element type of the data storage can't be converted to an int.
IllegalStateException - If the iterator is at the end.
ApfloatRuntimeException
public long getLong()
throws UnsupportedOperationException,
IllegalStateException,
ApfloatRuntimeException
long.
The default implementation always throws UnsupportedOperationException.
long.
UnsupportedOperationException - If the element type of the data storage can't be converted to a long.
IllegalStateException - If the iterator is at the end.
ApfloatRuntimeException
public float getFloat()
throws UnsupportedOperationException,
IllegalStateException,
ApfloatRuntimeException
float.
The default implementation always throws UnsupportedOperationException.
float.
UnsupportedOperationException - If the element type of the data storage can't be converted to a float.
IllegalStateException - If the iterator is at the end.
ApfloatRuntimeException
public double getDouble()
throws UnsupportedOperationException,
IllegalStateException,
ApfloatRuntimeException
double.
The default implementation always throws UnsupportedOperationException.
double.
UnsupportedOperationException - If the element type of the data storage can't be converted to a double.
IllegalStateException - If the iterator is at the end.
ApfloatRuntimeException
public void setInt(int value)
throws UnsupportedOperationException,
IllegalStateException,
ApfloatRuntimeException
int.
The default implementation always throws UnsupportedOperationException.
value - The value to be set to the current element as an int.
UnsupportedOperationException - If the element type of the data storage can't be converted to an int.
IllegalStateException - If the iterator is at the end.
ApfloatRuntimeException
public void setLong(long value)
throws UnsupportedOperationException,
IllegalStateException,
ApfloatRuntimeException
long.
The default implementation always throws UnsupportedOperationException.
value - The value to be set to the current element as a long.
UnsupportedOperationException - If the element type of the data storage can't be converted to a long.
IllegalStateException - If the iterator is at the end.
ApfloatRuntimeException
public void setFloat(float value)
throws UnsupportedOperationException,
IllegalStateException,
ApfloatRuntimeException
float.
The default implementation always throws UnsupportedOperationException.
value - The value to be set to the current element as a float.
UnsupportedOperationException - If the element type of the data storage can't be converted to a float.
IllegalStateException - If the iterator is at the end.
ApfloatRuntimeException
public void setDouble(double value)
throws UnsupportedOperationException,
IllegalStateException,
ApfloatRuntimeException
double.
The default implementation always throws UnsupportedOperationException.
value - The value to be set to the current element as a double.
UnsupportedOperationException - If the element type of the data storage can't be converted to a double.
IllegalStateException - If the iterator is at the end.
ApfloatRuntimeException
public void close()
throws ApfloatRuntimeException
ApfloatRuntimeException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||