aicas logoJamaica 6.4 release 1

java.lang
Interface CharSequence

All Known Subinterfaces:
Name
All Known Implementing Classes:
CharBuffer, Segment, String, StringBuffer, StringBuilder

public interface CharSequence

CharSequence is an interface that provides a read-only access to a sequence of characters.

Since:
1.4

Method Summary
 char charAt(int index)
          charAt returns the character at given position.
 int length()
          length the length of this sequence.
 CharSequence subSequence(int start, int end)
          subSequence creates a subsequence of this sequence.
 String toString()
          toString returns a string with the characters from this sequence.
 

Method Detail

length

int length()
length the length of this sequence.

Returns:
the number of chars in this sequence.

charAt

char charAt(int index)
charAt returns the character at given position.

Parameters:
index - the position
Returns:
the character at this position.
Throws:
IndexOutOfBoundsException - if index<0 || index>=length()

subSequence

CharSequence subSequence(int start,
                         int end)
subSequence creates a subsequence of this sequence.

Parameters:
start - the start position.
end - the end position.
Returns:
a subsequence
Throws:
IndexOutOfBoundsException - if start<0 || endlength().

toString

String toString()
toString returns a string with the characters from this sequence.

ensures

   (result.length() == length()
    && for all i: 0<=i && i result.charAt(i) == charAt(i));
 

Overrides:
toString in class Object
Returns:
the string.

aicas logoJamaica 6.4 release 1

aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2015 aicas GmbH. All Rights Reserved.