Class NameIterator


  • public final class NameIterator
    extends Object
    • Field Detail

      • MAX_LENGTH

        public static final int MAX_LENGTH
        Configuration key maximum allowed length.
        See Also:
        Constant Field Values
    • Constructor Detail

      • NameIterator

        public NameIterator​(String name)
      • NameIterator

        public NameIterator​(String name,
                            boolean startAtEnd)
      • NameIterator

        public NameIterator​(String name,
                            int pos)
    • Method Detail

      • goToEnd

        public void goToEnd()
      • goToStart

        public void goToStart()
      • getPosition

        public int getPosition()
        Get the cursor position. It will be -1 if the cursor is at the beginning of the string, or name.length() if it is at the end.
        Returns:
        the cursor position
      • getPreviousStart

        public int getPreviousStart()
      • getNextEnd

        public int getNextEnd()
      • nextSegmentEquals

        public boolean nextSegmentEquals​(String other)
      • nextSegmentEquals

        public boolean nextSegmentEquals​(String other,
                                         int offs,
                                         int len)
      • getNextSegment

        public String getNextSegment()
      • previousSegmentEquals

        public boolean previousSegmentEquals​(String other)
      • previousSegmentEquals

        public boolean previousSegmentEquals​(String other,
                                             int offs,
                                             int len)
      • getPreviousSegment

        public String getPreviousSegment()
      • getAllPreviousSegments

        public String getAllPreviousSegments()
      • getAllPreviousSegmentsWith

        public String getAllPreviousSegmentsWith​(String suffix)
      • hasNext

        public boolean hasNext()
      • hasPrevious

        public boolean hasPrevious()
      • next

        public void next()
      • previous

        public void previous()
      • getName

        public String getName()