Package edu.jas.util

Class LongIterable

java.lang.Object
edu.jas.util.LongIterable
All Implemented Interfaces:
Iterable<Long>

public class LongIterable extends Object implements Iterable<Long>
Iterable for Long.
  • 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

      public Iterator<Long> iterator()
      Get an iterator over Long.
      Specified by:
      iterator in interface Iterable<Long>
      Returns:
      an iterator.