Class LongIterator
java.lang.Object
edu.jas.util.LongIterator
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) longdata structure.(package private) boolean(package private) final booleanprotected long -
Constructor Summary
ConstructorsConstructorDescriptionLong iterator constructor.LongIterator(boolean nn, long ub) Long iterator constructor. -
Method Summary
Modifier and TypeMethodDescriptionlongGet the upper bound for the iterator.booleanhasNext()Test for availability of a next long.next()Get next Long.voidremove()Remove a tuple if allowed.voidsetUpperBound(long ub) Set the upper bound for the iterator.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining
-
Field Details
-
current
long currentdata structure. -
empty
boolean empty -
nonNegative
final boolean nonNegative -
upperBound
protected long upperBound
-
-
Constructor Details
-
LongIterator
public LongIterator()Long iterator constructor. -
LongIterator
public LongIterator(boolean nn, long ub) Long iterator constructor.- Parameters:
nn- true for an iterator over non-negative longs, false for all elements iterator.ub- an upper bound for the entries.
-
-
Method Details
-
setUpperBound
public void setUpperBound(long ub) Set the upper bound for the iterator.- Parameters:
ub- an upper bound for the iterator elements.
-
getUpperBound
public long getUpperBound()Get the upper bound for the iterator.- Returns:
- the upper bound for the iterator elements.
-
hasNext
-
next
-
remove
-