Package com.ibm.icu.text
Class BreakTransliterator.ReplaceableCharacterIterator
java.lang.Object
com.ibm.icu.text.BreakTransliterator.ReplaceableCharacterIterator
- All Implemented Interfaces:
Cloneable
,CharacterIterator
- Enclosing class:
BreakTransliterator
static final class BreakTransliterator.ReplaceableCharacterIterator
extends Object
implements CharacterIterator
-
Field Summary
FieldsFields inherited from interface java.text.CharacterIterator
DONE
-
Constructor Summary
ConstructorsConstructorDescriptionReplaceableCharacterIterator
(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
Modifier and TypeMethodDescriptionclone()
Creates a copy of this iterator.char
current()
Implements CharacterIterator.current() for String.boolean
Compares the equality of two ReplaceableCharacterIterator objects.char
first()
Implements CharacterIterator.first() for String.int
Implements CharacterIterator.getBeginIndex() for String.int
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.
-
Field Details
-
text
-
begin
private int begin -
end
private int end -
pos
private int pos
-
-
Constructor Details
-
ReplaceableCharacterIterator
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 overbegin
- Index of the first characterend
- Index of the character following the last characterpos
- Initial iterator position
-
-
Method Details
-
setText
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 interfaceCharacterIterator
- See Also:
-
last
public char last()Implements CharacterIterator.last() for String.- Specified by:
last
in interfaceCharacterIterator
- See Also:
-
setIndex
public char setIndex(int p) Implements CharacterIterator.setIndex() for String.- Specified by:
setIndex
in interfaceCharacterIterator
- See Also:
-
current
public char current()Implements CharacterIterator.current() for String.- Specified by:
current
in interfaceCharacterIterator
- See Also:
-
next
public char next()Implements CharacterIterator.next() for String.- Specified by:
next
in interfaceCharacterIterator
- See Also:
-
previous
public char previous()Implements CharacterIterator.previous() for String.- Specified by:
previous
in interfaceCharacterIterator
- See Also:
-
getBeginIndex
public int getBeginIndex()Implements CharacterIterator.getBeginIndex() for String.- Specified by:
getBeginIndex
in interfaceCharacterIterator
- See Also:
-
getEndIndex
public int getEndIndex()Implements CharacterIterator.getEndIndex() for String.- Specified by:
getEndIndex
in interfaceCharacterIterator
- See Also:
-
getIndex
public int getIndex()Implements CharacterIterator.getIndex() for String.- Specified by:
getIndex
in interfaceCharacterIterator
- See Also:
-
equals
Compares the equality of two ReplaceableCharacterIterator objects. -
hashCode
public int hashCode()Computes a hashcode for this iterator. -
clone
Creates a copy of this iterator.- Specified by:
clone
in interfaceCharacterIterator
- Overrides:
clone
in classObject
- Returns:
- A copy of this
-