Package edu.jas.arith

Class ModLongIterator

java.lang.Object
edu.jas.arith.ModLongIterator
All Implemented Interfaces:
Iterator<ModLong>

class ModLongIterator extends Object implements Iterator<ModLong>
Modular integer iterator.
  • Field Details

    • curr

      long curr
      data structure.
    • ring

      final ModLongRing ring
  • Constructor Details

    • ModLongIterator

      public ModLongIterator(ModLongRing fac)
      ModLong 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<ModLong>
      Returns:
      true if the iteration has more elements, else false.
    • next

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

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