Class Splitter.SplittingIterator

  • All Implemented Interfaces:
    java.util.Iterator<java.lang.String>
    Enclosing class:
    Splitter

    private abstract static class Splitter.SplittingIterator
    extends AbstractIterator<java.lang.String>
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SplittingIterator​(Splitter splitter, java.lang.CharSequence toSplit)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String computeNext()  
      (package private) abstract int separatorEnd​(int separatorPosition)
      Returns the first index in toSplit after separatorPosition that does not contain a separator.
      (package private) abstract int separatorStart​(int start)
      Returns the first index in toSplit at or after start that contains the separator.
      • 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

      • toSplit

        final java.lang.CharSequence toSplit
      • omitEmptyStrings

        final boolean omitEmptyStrings
      • offset

        int offset
      • limit

        int limit
    • Constructor Detail

      • SplittingIterator

        protected SplittingIterator​(Splitter splitter,
                                    java.lang.CharSequence toSplit)
    • Method Detail

      • separatorStart

        abstract int separatorStart​(int start)
        Returns the first index in toSplit at or after start that contains the separator.
      • separatorEnd

        abstract int separatorEnd​(int separatorPosition)
        Returns the first index in toSplit after separatorPosition that does not contain a separator. This method is only invoked after a call to separatorStart.