Android
java.lang
public interface

java.lang.CharSequence

java.lang.CharSequence

The CharSequence interface represents an ordered set of characters and the functions to probe them.

Known Indirect Subclasses

Summary

Public Methods

          char  charAt(int index)
Returns the character at the specified index, with the first character having index zero.
          int  length()
Returns the number of characters in the sequence.
          CharSequence  subSequence(int start, int end)
Returns a CharSequence from the start index (inclusive) to the end index (exclusive) of this sequence.
          String  toString()
Returns a String with the same characters and ordering of this CharSequence

Details

Public Methods

public char charAt(int index)

Returns the character at the specified index, with the first character having index zero.

Parameters

index The index of the character to return

Returns

  • The requested character

Throws

IndexOutOfBoundsException when index < 0 or index >= the length of the CharSequence

public int length()

Returns the number of characters in the sequence.

Returns

  • the number of characters in the sequence

public CharSequence subSequence(int start, int end)

Returns a CharSequence from the start index (inclusive) to the end index (exclusive) of this sequence.

Parameters

start The starting offset of the sub-sequence, that is, the index of the first character that goes into the sub-sequence
end The ending offset of the sub-sequence, that is, the index of the first character after those that go into the sub-sequence

Returns

  • The requested sub-sequence

Throws

IndexOutOfBoundsException when 1. either index is below 0 2. either index >= this.length() 3. start > end

public String toString()

Returns a String with the same characters and ordering of this CharSequence

Returns

  • a String based on the CharSequence
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56