public final class Text extends java.lang.Object implements java.lang.CharSequence, java.lang.Comparable<Text>
A common text element which is used by multiple elements and namespaces in XMPP. This list of elements it is used by includes:
Collator
instance of the locale (if any) and is consistent with equals
.Constructor and Description |
---|
Text(java.lang.String text)
Constructs a default status.
|
Text(java.lang.String text,
java.util.Locale language)
Constructs a status with a language attribute.
|
Modifier and Type | Method and Description |
---|---|
char |
charAt(int index) |
int |
compareTo(Text o) |
boolean |
equals(java.lang.Object o) |
java.util.Locale |
getLanguage()
Gets the language.
|
java.lang.String |
getText()
Gets the text.
|
int |
hashCode() |
int |
length() |
java.lang.CharSequence |
subSequence(int start,
int end) |
java.lang.String |
toString() |
public Text(java.lang.String text)
Constructs a default status.
text
- The text.public Text(java.lang.String text, java.util.Locale language)
Constructs a status with a language attribute.
text
- The textlanguage
- The language.public final java.util.Locale getLanguage()
Gets the language.
public final java.lang.String getText()
Gets the text.
public final int length()
length
in interface java.lang.CharSequence
public final char charAt(int index)
charAt
in interface java.lang.CharSequence
public final java.lang.CharSequence subSequence(int start, int end)
subSequence
in interface java.lang.CharSequence
public final int compareTo(Text o)
compareTo
in interface java.lang.Comparable<Text>
public final boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object
public final java.lang.String toString()
toString
in interface java.lang.CharSequence
toString
in class java.lang.Object
Copyright © 2014–2019 XMPP.rocks. All rights reserved.