Class BreakTransliterator.ReplaceableCharacterIterator

  • All Implemented Interfaces:
    java.lang.Cloneable, java.text.CharacterIterator
    Enclosing class:
    BreakTransliterator

    static final class BreakTransliterator.ReplaceableCharacterIterator
    extends java.lang.Object
    implements java.text.CharacterIterator
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int begin  
      private int end  
      private int pos  
      private Replaceable text  
      • Fields inherited from interface java.text.CharacterIterator

        DONE
    • Constructor Summary

      Constructors 
      Constructor Description
      ReplaceableCharacterIterator​(Replaceable text, int begin, int end, int pos)
      Constructs an iterator over the given range of the given string, with the index set at the specified position.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()
      Creates a copy of this iterator.
      char current()
      Implements CharacterIterator.current() for String.
      boolean equals​(java.lang.Object obj)
      Compares the equality of two ReplaceableCharacterIterator objects.
      char first()
      Implements CharacterIterator.first() for String.
      int getBeginIndex()
      Implements CharacterIterator.getBeginIndex() for String.
      int getEndIndex()
      Implements CharacterIterator.getEndIndex() for String.
      int getIndex()
      Implements CharacterIterator.getIndex() for String.
      int hashCode()
      Computes a hashcode for this iterator.
      char last()
      Implements CharacterIterator.last() for String.
      char next()
      Implements CharacterIterator.next() for String.
      char previous()
      Implements CharacterIterator.previous() for String.
      char setIndex​(int p)
      Implements CharacterIterator.setIndex() for String.
      void setText​(Replaceable text)
      Reset this iterator to point to a new string.
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • begin

        private int begin
      • end

        private int end
      • pos

        private int pos
    • Constructor Detail

      • ReplaceableCharacterIterator

        public ReplaceableCharacterIterator​(Replaceable text,
                                            int begin,
                                            int end,
                                            int pos)
        Constructs an iterator over the given range of the given string, with the index set at the specified position.
        Parameters:
        text - The String to be iterated over
        begin - Index of the first character
        end - Index of the character following the last character
        pos - Initial iterator position
    • Method Detail

      • setText

        public void setText​(Replaceable text)
        Reset this iterator to point to a new string. This package-visible method is used by other java.text classes that want to avoid allocating new ReplaceableCharacterIterator objects every time their setText method is called.
        Parameters:
        text - The String to be iterated over
      • first

        public char first()
        Implements CharacterIterator.first() for String.
        Specified by:
        first in interface java.text.CharacterIterator
        See Also:
        CharacterIterator.first()
      • last

        public char last()
        Implements CharacterIterator.last() for String.
        Specified by:
        last in interface java.text.CharacterIterator
        See Also:
        CharacterIterator.last()
      • setIndex

        public char setIndex​(int p)
        Implements CharacterIterator.setIndex() for String.
        Specified by:
        setIndex in interface java.text.CharacterIterator
        See Also:
        CharacterIterator.setIndex(int)
      • current

        public char current()
        Implements CharacterIterator.current() for String.
        Specified by:
        current in interface java.text.CharacterIterator
        See Also:
        CharacterIterator.current()
      • next

        public char next()
        Implements CharacterIterator.next() for String.
        Specified by:
        next in interface java.text.CharacterIterator
        See Also:
        CharacterIterator.next()
      • previous

        public char previous()
        Implements CharacterIterator.previous() for String.
        Specified by:
        previous in interface java.text.CharacterIterator
        See Also:
        CharacterIterator.previous()
      • getBeginIndex

        public int getBeginIndex()
        Implements CharacterIterator.getBeginIndex() for String.
        Specified by:
        getBeginIndex in interface java.text.CharacterIterator
        See Also:
        CharacterIterator.getBeginIndex()
      • getEndIndex

        public int getEndIndex()
        Implements CharacterIterator.getEndIndex() for String.
        Specified by:
        getEndIndex in interface java.text.CharacterIterator
        See Also:
        CharacterIterator.getEndIndex()
      • getIndex

        public int getIndex()
        Implements CharacterIterator.getIndex() for String.
        Specified by:
        getIndex in interface java.text.CharacterIterator
        See Also:
        CharacterIterator.getIndex()
      • equals

        public boolean equals​(java.lang.Object obj)
        Compares the equality of two ReplaceableCharacterIterator objects.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the ReplaceableCharacterIterator object to be compared with.
        Returns:
        true if the given obj is the same as this ReplaceableCharacterIterator object; false otherwise.
      • hashCode

        public int hashCode()
        Computes a hashcode for this iterator.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        A hash code
      • clone

        public java.lang.Object clone()
        Creates a copy of this iterator.
        Specified by:
        clone in interface java.text.CharacterIterator
        Overrides:
        clone in class java.lang.Object
        Returns:
        A copy of this