Class EmptyCodeUnitIterator

  • All Implemented Interfaces:
    CodeUnitIterator, java.lang.Iterable<CodeUnit>, java.util.Iterator<CodeUnit>

    public class EmptyCodeUnitIterator
    extends java.lang.Object
    implements CodeUnitIterator
    CodeUnitIterator that represents an empty set of codeunits.
    • Constructor Summary

      Constructors 
      Constructor Description
      EmptyCodeUnitIterator()
      Constructs a new EmptyCodeUnitIterator
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()
      Return true if there is a next CodeUnit.
      java.util.Iterator<CodeUnit> iterator()  
      CodeUnit next()
      Get the next CodeUnit or null if no more CodeUnits.
      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

      • EmptyCodeUnitIterator

        public EmptyCodeUnitIterator()
        Constructs a new EmptyCodeUnitIterator
    • Method Detail

      • next

        public CodeUnit next()
        Description copied from interface: CodeUnitIterator
        Get the next CodeUnit or null if no more CodeUnits.

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

        Specified by:
        next in interface CodeUnitIterator
        Specified by:
        next in interface java.util.Iterator<CodeUnit>
        See Also:
        CodeUnitIterator.next()
      • remove

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

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