Package edu.jas.poly

Class IndexListPolyIterator<C extends RingElem<C>>

java.lang.Object
edu.jas.poly.IndexListPolyIterator<C>
All Implemented Interfaces:
Iterator<IndexListMonomial<C>>

public class IndexListPolyIterator<C extends RingElem<C>> extends Object implements Iterator<IndexListMonomial<C>>
Iterator over monomials of a polynomial. Adaptor for val.entrySet().iterator().
  • Field Details

  • Constructor Details

    • IndexListPolyIterator

      public IndexListPolyIterator(SortedMap<IndexList,C> m)
      Constructor of polynomial iterator.
      Parameters:
      m - SortetMap of a polynomial.
  • Method Details

    • hasNext

      public boolean hasNext()
      Test for availability of a next monomial.
      Specified by:
      hasNext in interface Iterator<C extends RingElem<C>>
      Returns:
      true if the iteration has more monomials, else false.
    • next

      public IndexListMonomial<C> next()
      Get next monomial element.
      Specified by:
      next in interface Iterator<C extends RingElem<C>>
      Returns:
      next monomial.
    • remove

      public void remove()
      Remove the last monomial returned from underlying set if allowed.
      Specified by:
      remove in interface Iterator<C extends RingElem<C>>