|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.text.StringCharacterIterator
public final class StringCharacterIterator
StringCharacterIterator is an implementation of CharacterIterator for Strings.
| Field Summary | |
|---|---|
(package private) int |
end
|
(package private) int |
offset
|
(package private) int |
start
|
(package private) String |
string
|
| Fields inherited from interface java.text.CharacterIterator |
|---|
DONE |
| Constructor Summary | |
|---|---|
StringCharacterIterator(String value)
Constructs a new StringCharacterIterator on the specified String. |
|
StringCharacterIterator(String value,
int location)
Constructs a new StringCharacterIterator on the specified String with the current index set to the specified value. |
|
StringCharacterIterator(String value,
int start,
int end,
int location)
Constructs a new StringCharacterIterator on the specified String with the begin, end and current index set to the specified values. |
|
| Method Summary | |
|---|---|
Object |
clone()
Returns a new StringCharacterIterator with the same source String, begin, end, and current index as this StringCharacterIterator. |
char |
current()
Returns the character at the current index in the source String. |
boolean |
equals(Object object)
Compares the specified object to this StringCharacterIterator and answer if they are equal. |
char |
first()
Sets the current position to the begin index and returns the character at the begin index. |
int |
getBeginIndex()
Returns the begin index in the source String. |
int |
getEndIndex()
Returns the end index in the source String. |
int |
getIndex()
Returns the current index in the source String. |
int |
hashCode()
Returns an integer hash code for the receiver. |
char |
last()
Sets the current position to the end index - 1 and returns the character at the current position. |
char |
next()
Increments the current index and returns the character at the new index. |
char |
previous()
Decrements the current index and returns the character at the new index. |
char |
setIndex(int location)
Sets the current index in the source String. |
void |
setText(String value)
Sets the source String to iterate. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
String string
int start
int end
int offset
| Constructor Detail |
|---|
public StringCharacterIterator(String value)
value - the new source String to iterate
public StringCharacterIterator(String value,
int location)
value - the new source String to iteratelocation - the current index
IllegalArgumentException - when the current index is less than zero or greater than
the length of the String
public StringCharacterIterator(String value,
int start,
int end,
int location)
value - the new source String to iteratestart - the index of the first character to iterateend - the index one past the last character to iteratelocation - the current index
IllegalArgumentException - when the begin index is less than zero, the end index is
greater than the String length, the begin index is greater
than the end index, the current index is less than the
begin index or greater than the end index| Method Detail |
|---|
public Object clone()
clone in interface CharacterIteratorclone in class ObjectCloneablepublic char current()
current in interface CharacterIteratorpublic boolean equals(Object object)
equals in class Objectobject - the object to compare with this object
hashCode()public char first()
first in interface CharacterIteratorpublic int getBeginIndex()
getBeginIndex in interface CharacterIteratorpublic int getEndIndex()
getEndIndex in interface CharacterIteratorpublic int getIndex()
getIndex in interface CharacterIteratorpublic int hashCode()
hashCode in class Objectequals(java.lang.Object)public char last()
last in interface CharacterIteratorpublic char next()
next in interface CharacterIteratorpublic char previous()
previous in interface CharacterIteratorpublic char setIndex(int location)
setIndex in interface CharacterIteratorlocation - The index the CharacterIterator is set to.
IllegalArgumentException - when the new index is less than the begin index or greater
than the end indexpublic void setText(String value)
value - the new source String
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||