Class Overview
An AlteredCharSequence is a CharSequence that is largely mirrored from
another CharSequence, except that a specified range of characters are
mirrored from a different char array instead.
Summary
Public Methods |
char
|
charAt(int off)
Returns the character at index .
|
void
|
getChars(int start, int end, char[] dest, int off)
Exactly like String.getChars(): copy chars start
through end - 1 from this CharSequence into dest
beginning at offset destoff .
|
int
|
length()
Returns the number of characters in this sequence.
|
static
AlteredCharSequence
|
make(CharSequence source, char[] sub, int substart, int subend)
Create an AlteredCharSequence whose text (and possibly spans)
are mirrored from source , except that the range of
offsets substart inclusive to subend exclusive
are mirrored instead from sub , beginning at offset 0.
|
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 containing a concise, human-readable description of this
object.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
From interface
android.text.GetChars
abstract
void
|
getChars(int start, int end, char[] dest, int destoff)
Exactly like String.getChars(): copy chars start
through end - 1 from this CharSequence into dest
beginning at offset destoff .
|
|
From interface
java.lang.CharSequence
abstract
char
|
charAt(int index)
Returns the character at index .
|
abstract
int
|
length()
Returns the number of characters in this sequence.
|
abstract
CharSequence
|
subSequence(int start, int end)
Returns a CharSequence from the start index (inclusive)
to the end index (exclusive) of this sequence.
|
abstract
String
|
toString()
Returns a string with the same characters in the same order as in this
sequence.
|
|
Public Methods
public
char
charAt
(int off)
Returns the character at index
.
public
void
getChars
(int start, int end, char[] dest, int off)
Exactly like String.getChars(): copy chars start
through end - 1
from this CharSequence into dest
beginning at offset destoff
.
public
int
length
()
Returns the number of characters in this sequence.
Returns
- the number of characters.
public
static
AlteredCharSequence
make
(CharSequence source, char[] sub, int substart, int subend)
Create an AlteredCharSequence whose text (and possibly spans)
are mirrored from source
, except that the range of
offsets substart
inclusive to subend
exclusive
are mirrored instead from sub
, beginning at offset 0.
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 start offset of the sub-sequence. It is inclusive, that
is, the index of the first character that is included in the
sub-sequence. |
end
| the end offset of the sub-sequence. It is exclusive, that is,
the index of the first character after those that are included
in the sub-sequence |
Returns
- the requested sub-sequence.
public
String
toString
()
Returns a string containing a concise, human-readable description of this
object. Subclasses are encouraged to override this method and provide an
implementation that takes into account the object's type and data. The
default implementation is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.
Returns
- a printable representation of this object.