Package edu.jas.util
Class LongIterable
java.lang.Object
edu.jas.util.LongIterable
Iterable for Long.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
Get the upper bound for the iterator.iterator()
Get an iterator over Long.void
Set the iteration algorithm to all elements.void
Set the iteration algorithm to non-negative elements.void
setUpperBound
(long ub) Set the upper bound for the iterator.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
nonNegative
private boolean nonNegative -
upperBound
private long upperBound
-
-
Constructor Details
-
LongIterable
public LongIterable()Constructor. -
LongIterable
public LongIterable(long ub) Constructor.
-
-
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.
-
setAllIterator
public void setAllIterator()Set the iteration algorithm to all elements. -
setNonNegativeIterator
public void setNonNegativeIterator()Set the iteration algorithm to non-negative elements. -
iterator
Get an iterator over Long.
-