Package edu.jas.arith

Class ModIntIterator

  • All Implemented Interfaces:
    java.util.Iterator<ModInt>

    class ModIntIterator
    extends java.lang.Object
    implements java.util.Iterator<ModInt>
    Modular integer iterator.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) int curr
      data structure.
      (package private) ModIntRing ring  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()
      Test for availability of a next element.
      ModInt next()
      Get next integer.
      void remove()
      Remove an element if allowed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Field Detail

      • curr

        int curr
        data structure.
    • Constructor Detail

      • ModIntIterator

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

      • hasNext

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

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

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