Class ReferenceIterator

java.lang.Object
com.github.curiousoddman.rgxgen.iterators.ReferenceIterator
All Implemented Interfaces:
StringIterator, Iterator<String>

public class ReferenceIterator extends Object implements StringIterator
  • Constructor Details

    • ReferenceIterator

      public ReferenceIterator()
  • Method Details

    • setOther

      public void setOther(StringIterator other)
    • next

      public String next()
      Specified by:
      next in interface Iterator<String>
    • current

      public String current()
      Description copied from interface: StringIterator
      Return same value as last call to next(). Behavior is not defined if method is called before next()
      Specified by:
      current in interface StringIterator
      Returns:
      Value returned by last call to next().
    • reset

      public void reset()
      Description copied from interface: StringIterator
      Reset the iterator to the initial position. After reset it will start iterating from the first value.

      Can be used to restart iterator that returns false when hasNext() is called.

      Specified by:
      reset in interface StringIterator
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<String>