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.charcurrent()Implements CharacterIterator.current() for String.booleanCompares the equality of two ReplaceableCharacterIterator objects.charfirst()Implements CharacterIterator.first() for String.intImplements CharacterIterator.getBeginIndex() for String.intImplements CharacterIterator.getEndIndex() for String.intgetIndex()Implements CharacterIterator.getIndex() for String.inthashCode()Computes a hashcode for this iterator.charlast()Implements CharacterIterator.last() for String.charnext()Implements CharacterIterator.next() for String.charprevious()Implements CharacterIterator.previous() for String.charsetIndex(int p) Implements CharacterIterator.setIndex() for String.voidsetText(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:
firstin interfaceCharacterIterator- See Also:
-
last
public char last()Implements CharacterIterator.last() for String.- Specified by:
lastin interfaceCharacterIterator- See Also:
-
setIndex
public char setIndex(int p) Implements CharacterIterator.setIndex() for String.- Specified by:
setIndexin interfaceCharacterIterator- See Also:
-
current
public char current()Implements CharacterIterator.current() for String.- Specified by:
currentin interfaceCharacterIterator- See Also:
-
next
public char next()Implements CharacterIterator.next() for String.- Specified by:
nextin interfaceCharacterIterator- See Also:
-
previous
public char previous()Implements CharacterIterator.previous() for String.- Specified by:
previousin interfaceCharacterIterator- See Also:
-
getBeginIndex
public int getBeginIndex()Implements CharacterIterator.getBeginIndex() for String.- Specified by:
getBeginIndexin interfaceCharacterIterator- See Also:
-
getEndIndex
public int getEndIndex()Implements CharacterIterator.getEndIndex() for String.- Specified by:
getEndIndexin interfaceCharacterIterator- See Also:
-
getIndex
public int getIndex()Implements CharacterIterator.getIndex() for String.- Specified by:
getIndexin 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:
clonein interfaceCharacterIterator- Overrides:
clonein classObject- Returns:
- A copy of this
-