public final class SpannedString extends Object implements CharSequence, GetChars, Spanned
SpannableString
; for mutable text,
see SpannableStringBuilder
.SPAN_COMPOSING, SPAN_EXCLUSIVE_EXCLUSIVE, SPAN_EXCLUSIVE_INCLUSIVE, SPAN_INCLUSIVE_EXCLUSIVE, SPAN_INCLUSIVE_INCLUSIVE, SPAN_INTERMEDIATE, SPAN_MARK_MARK, SPAN_MARK_POINT, SPAN_PARAGRAPH, SPAN_POINT_MARK, SPAN_POINT_MARK_MASK, SPAN_POINT_POINT, SPAN_PRIORITY, SPAN_PRIORITY_SHIFT, SPAN_USER, SPAN_USER_SHIFT
Constructor and Description |
---|
SpannedString(CharSequence source) |
Modifier and Type | Method and Description |
---|---|
char |
charAt(int i) |
void |
getChars(int start,
int end,
char[] dest,
int off) |
int |
getSpanEnd(Object what) |
int |
getSpanFlags(Object what) |
<T> T[] |
getSpans(int queryStart,
int queryEnd,
Class<T> kind) |
int |
getSpanStart(Object what) |
int |
length() |
int |
nextSpanTransition(int start,
int limit,
Class kind) |
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.
|
static SpannedString |
valueOf(CharSequence source) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSpanEnd, getSpanFlags, getSpans, getSpanStart, nextSpanTransition
charAt, length, toString
public SpannedString(CharSequence source)
public CharSequence subSequence(int start, int end)
CharSequence
CharSequence
from the start
index (inclusive)
to the end
index (exclusive) of this sequence.subSequence
in interface CharSequence
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-sequencepublic static SpannedString valueOf(CharSequence source)
public final int length()
public final char charAt(int i)
public final String toString()
Object
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.
public final void getChars(int start, int end, char[] dest, int off)
public int getSpanStart(Object what)
public int getSpanEnd(Object what)
public int getSpanFlags(Object what)
public <T> T[] getSpans(int queryStart, int queryEnd, Class<T> kind)
public int nextSpanTransition(int start, int limit, Class kind)