|
Final | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface CharSequence
The CharSequence interface represets an ordered set of characters and the functions to probe them.
| Method Summary | |
|---|---|
char |
charAt(int index)
Answers the character at the specified index (0-based indexing). |
int |
length()
Answers the number of characters in the sequence. |
CharSequence |
subSequence(int start,
int end)
Answers a CharSequence from the start<\code> index to the
|
String |
toString()
Answers a String with the same characters and ordering of this CharSequence |
| Method Detail |
|---|
int length()
char charAt(int index)
index - - of the character to return
IndexOutOfBoundsException - when index < 0 or
index<\code> >= the length of the CharSequence
subSequence
CharSequence subSequence(int start,
int end)
- Answers a CharSequence from the
start<\code> index to the
end<\code> index of this sequence.
- Parameters:
start - -- index of the start of the sub-sequence to returnend - -- index of the end of the sub-sequence to return
- Returns:
- the sub sequence from start to end
- Throws:
IndexOutOfBoundsException - when 1. either index is below 0
2. either index >= this.length()<\code>
3. start > end <\code>
toString
String toString()
- Answers a String with the same characters and ordering of this CharSequence
- Overrides:
toString in class Object
- Returns:
- a String based on the CharSequence
Overview
Package
Class
Tree
Deprecated
Help
Final
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Licensed Materials - Property of IBM
© Copyright IBM Corp. 2006, 2008 All Rights Reserved.