Package edu.jas.arith

Class ModIntIterator

java.lang.Object
edu.jas.arith.ModIntIterator
All Implemented Interfaces:
Iterator<ModInt>

class ModIntIterator extends Object implements Iterator<ModInt>
Modular integer iterator.
  • Field Details

    • curr

      int curr
      data structure.
    • ring

      final ModIntRing ring
  • Constructor Details

    • ModIntIterator

      public ModIntIterator(ModIntRing fac)
      ModInt iterator constructor.
      Parameters:
      fac - modular integer factory;
  • Method Details

    • hasNext

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

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

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