Package edu.jas.util

Class LongIterator

java.lang.Object
edu.jas.util.LongIterator
All Implemented Interfaces:
Iterator<Long>

class LongIterator extends Object implements Iterator<Long>
Long iterator.
  • Field Details

    • current

      long current
      data structure.
    • empty

      boolean empty
    • nonNegative

      final boolean nonNegative
    • upperBound

      protected long upperBound
  • Constructor Details

    • LongIterator

      public LongIterator()
      Long iterator constructor.
    • LongIterator

      public LongIterator(boolean nn, long ub)
      Long iterator constructor.
      Parameters:
      nn - true for an iterator over non-negative longs, false for all elements iterator.
      ub - an upper bound for the entries.
  • 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.
    • hasNext

      public boolean hasNext()
      Test for availability of a next long.
      Specified by:
      hasNext in interface Iterator<Long>
      Returns:
      true if the iteration has more Longs, else false.
    • next

      public Long next()
      Get next Long.
      Specified by:
      next in interface Iterator<Long>
      Returns:
      next Long.
    • remove

      public void remove()
      Remove a tuple if allowed.
      Specified by:
      remove in interface Iterator<Long>