public class StringText extends Object implements Text
String only representation of the text. Will always convert to bytes on the fly.| Modifier and Type | Field and Description |
|---|---|
static Text[] |
EMPTY_ARRAY |
| Constructor and Description |
|---|
StringText(String text) |
| Modifier and Type | Method and Description |
|---|---|
BytesReference |
bytes()
The UTF8 bytes representing the the text, might be converted on the fly, see
Text.hasBytes() |
int |
compareTo(Text text) |
static Text[] |
convertFromStringArray(String[] strings) |
boolean |
equals(Object obj) |
boolean |
hasBytes()
Are bytes available without the need to be converted into bytes when calling
Text.bytes(). |
int |
hashCode() |
boolean |
hasString()
Is there a
String representation of the text. |
String |
string()
Returns the string representation of the text, might be converted to a string on the fly.
|
String |
toString()
Returns the string representation of the text, might be converted to a string on the fly.
|
public static final Text[] EMPTY_ARRAY
public StringText(String text)
public boolean hasBytes()
TextText.bytes().public BytesReference bytes()
TextText.hasBytes()public boolean hasString()
TextString representation of the text. If not, then it Text.hasBytes().public String string()
Textpublic String toString()
Textpublic int compareTo(Text text)
compareTo in interface Comparable<Text>Copyright © 2009–2016. All rights reserved.