Package edu.jas.arith

Class BigIntegerIterator

java.lang.Object
edu.jas.arith.BigIntegerIterator
All Implemented Interfaces:
Iterator<BigInteger>

class BigIntegerIterator extends Object implements Iterator<BigInteger>
Big integer iterator.
  • Field Details

    • curr

      data structure.
    • nonNegative

      final boolean nonNegative
  • Constructor Details

    • BigIntegerIterator

      public BigIntegerIterator()
      BigInteger iterator constructor.
    • BigIntegerIterator

      public BigIntegerIterator(boolean nn)
      BigInteger iterator constructor.
      Parameters:
      nn - true for an iterator over non-negative longs, false for all elements iterator.
  • Method Details

    • hasNext

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

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

      public void remove()
      Remove an element if allowed.
      Specified by:
      remove in interface Iterator<BigInteger>