StringCharacterIterator implements the CharacterIterator protocol for a String. The StringCharacterIterator class iterates over the entire String.
StringCharacterIterator implements the CharacterIterator protocol for a String. The StringCharacterIterator class iterates over the entire String.
(->string-character-iterator text)
(->string-character-iterator text pos)
(->string-character-iterator text begin end pos)
Constructor.
Constructs an iterator over the given range of the given string, with the index set at the specified position.
text - The String to be iterated over - java.lang.String
begin - Index of the first character - int
end - Index of the character following the last character - int
pos - Initial iterator position - int
Constructor. Constructs an iterator over the given range of the given string, with the index set at the specified position. text - The String to be iterated over - `java.lang.String` begin - Index of the first character - `int` end - Index of the character following the last character - `int` pos - Initial iterator position - `int`
(clone this)
Creates a copy of this iterator.
returns: A copy of this - java.lang.Object
Creates a copy of this iterator. returns: A copy of this - `java.lang.Object`
(current this)
Implements CharacterIterator.current() for String.
returns: the character at the current position or DONE if the current
position is off the end of the text. - char
Implements CharacterIterator.current() for String. returns: the character at the current position or DONE if the current position is off the end of the text. - `char`
(equals this obj)
Compares the equality of two StringCharacterIterator objects.
obj - the StringCharacterIterator object to be compared with. - java.lang.Object
returns: true if the given obj is the same as this
StringCharacterIterator object; false otherwise. - boolean
Compares the equality of two StringCharacterIterator objects. obj - the StringCharacterIterator object to be compared with. - `java.lang.Object` returns: true if the given obj is the same as this StringCharacterIterator object; false otherwise. - `boolean`
(first this)
Implements CharacterIterator.first() for String.
returns: the first character in the text, or DONE if the text is empty - char
Implements CharacterIterator.first() for String. returns: the first character in the text, or DONE if the text is empty - `char`
(get-begin-index this)
Implements CharacterIterator.getBeginIndex() for String.
returns: the index at which the text begins. - int
Implements CharacterIterator.getBeginIndex() for String. returns: the index at which the text begins. - `int`
(get-end-index this)
Implements CharacterIterator.getEndIndex() for String.
returns: the index after the last character in the text - int
Implements CharacterIterator.getEndIndex() for String. returns: the index after the last character in the text - `int`
(get-index this)
Implements CharacterIterator.getIndex() for String.
returns: the current index. - int
Implements CharacterIterator.getIndex() for String. returns: the current index. - `int`
(hash-code this)
Computes a hashcode for this iterator.
returns: A hash code - int
Computes a hashcode for this iterator. returns: A hash code - `int`
(last this)
Implements CharacterIterator.last() for String.
returns: the last character in the text, or DONE if the text is empty - char
Implements CharacterIterator.last() for String. returns: the last character in the text, or DONE if the text is empty - `char`
(next this)
Implements CharacterIterator.next() for String.
returns: the character at the new position or DONE if the new
position is off the end of the text range. - char
Implements CharacterIterator.next() for String. returns: the character at the new position or DONE if the new position is off the end of the text range. - `char`
(previous this)
Implements CharacterIterator.previous() for String.
returns: the character at the new position or DONE if the current
position is equal to getBeginIndex(). - char
Implements CharacterIterator.previous() for String. returns: the character at the new position or DONE if the current position is equal to getBeginIndex(). - `char`
(set-index this p)
Implements CharacterIterator.setIndex() for String.
p - the position within the text. Valid values range from getBeginIndex() to getEndIndex(). An IllegalArgumentException is thrown if an invalid value is supplied. - int
returns: the character at the specified position or DONE if the specified position is equal to getEndIndex() - char
Implements CharacterIterator.setIndex() for String. p - the position within the text. Valid values range from getBeginIndex() to getEndIndex(). An IllegalArgumentException is thrown if an invalid value is supplied. - `int` returns: the character at the specified position or DONE if the specified position is equal to getEndIndex() - `char`
(set-text this 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 StringCharacterIterator objects every time their setText method is called.
text - The String to be iterated over - java.lang.String
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 StringCharacterIterator objects every time their setText method is called. text - The String to be iterated over - `java.lang.String`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close