edu.jas.util
Class LongIterable

java.lang.Object
  extended by 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
LongIterable()
          Constructor.
LongIterable(long ub)
          Constructor.
 
Method Summary
 long getUpperBound()
          Get the upper bound for the iterator.
 java.util.Iterator<java.lang.Long> iterator()
          Get an iterator over Long.
 void setAllIterator()
          Set the iteration algorithm to all elements.
 void setNonNegativeIterator()
          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
 

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:
iterator in interface java.lang.Iterable<java.lang.Long>
Returns:
an iterator.