Package edu.jas.util
Class LongIterator
- java.lang.Object
-
- edu.jas.util.LongIterator
-
- All Implemented Interfaces:
java.util.Iterator<java.lang.Long>
class LongIterator extends java.lang.Object implements java.util.Iterator<java.lang.Long>Long iterator.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) longcurrentdata structure.(package private) booleanempty(package private) booleannonNegativeprotected longupperBound
-
Constructor Summary
Constructors Constructor Description LongIterator()Long iterator constructor.LongIterator(boolean nn, long ub)Long iterator constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetUpperBound()Get the upper bound for the iterator.booleanhasNext()Test for availability of a next long.java.lang.Longnext()Get next Long.voidremove()Remove a tuple if allowed.voidsetUpperBound(long ub)Set the upper bound for the iterator.
-
-
-
Method Detail
-
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
public boolean hasNext()
Test for availability of a next long.- Specified by:
hasNextin interfacejava.util.Iterator<java.lang.Long>- Returns:
- true if the iteration has more Longs, else false.
-
next
public java.lang.Long next()
Get next Long.- Specified by:
nextin interfacejava.util.Iterator<java.lang.Long>- Returns:
- next Long.
-
remove
public void remove()
Remove a tuple if allowed.- Specified by:
removein interfacejava.util.Iterator<java.lang.Long>
-
-