Class SymbolIteratorAdapter

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()
      Return true if there is a next symbol.
      java.util.Iterator<Symbol> iterator()  
      Symbol next()
      Get the next symbol or null if no more symbols.
      void remove()  
      • Methods inherited from class java.lang.Object

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

        forEach, spliterator
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Constructor Detail

      • SymbolIteratorAdapter

        public SymbolIteratorAdapter​(java.util.Iterator<? extends Symbol> iterator)
    • Method Detail

      • hasNext

        public boolean hasNext()
        Description copied from interface: SymbolIterator
        Return true if there is a next symbol.
        Specified by:
        hasNext in interface java.util.Iterator<Symbol>
        Specified by:
        hasNext in interface SymbolIterator
      • next

        public Symbol next()
        Description copied from interface: SymbolIterator
        Get the next symbol or null if no more symbols.

        NOTE: This deviates from the standard Iterator interface by returning null instead of throwing an exception.

        Specified by:
        next in interface java.util.Iterator<Symbol>
        Specified by:
        next in interface SymbolIterator
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<Symbol>
      • iterator

        public java.util.Iterator<Symbol> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<Symbol>