Package edu.jas.util
Class LongIterable
- java.lang.Object
-
- edu.jas.util.LongIterable
-
- All Implemented Interfaces:
java.lang.Iterable<java.lang.Long>
public class LongIterable extends java.lang.Object implements java.lang.Iterable<java.lang.Long>
Iterable for Long.- Author:
- Heinz Kredel
-
-
Constructor Summary
Constructors Constructor Description LongIterable()Constructor.LongIterable(long ub)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetUpperBound()Get the upper bound for the iterator.java.util.Iterator<java.lang.Long>iterator()Get an iterator over Long.voidsetAllIterator()Set the iteration algorithm to all elements.voidsetNonNegativeIterator()Set the iteration algorithm to non-negative elements.voidsetUpperBound(long ub)Set the upper bound for the iterator.
-
-
-
Constructor Detail
-
LongIterable
public LongIterable()
Constructor.
-
LongIterable
public LongIterable(long ub)
Constructor.
-
-
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.
-
setAllIterator
public void setAllIterator()
Set the iteration algorithm to all elements.
-
setNonNegativeIterator
public void setNonNegativeIterator()
Set the iteration algorithm to non-negative elements.
-
iterator
public java.util.Iterator<java.lang.Long> iterator()
Get an iterator over Long.- Specified by:
iteratorin interfacejava.lang.Iterable<java.lang.Long>- Returns:
- an iterator.
-
-