java.lang.Object
org.elasticsearch.common.text.Text
- All Implemented Interfaces:
Comparable<Text>,ToXContent,ToXContentFragment
Both
String and BytesReference representation of the text. Starts with one of those, and if
the other is requests, caches the other one in a local reference so no additional conversion will be needed.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params -
Field Summary
FieldsFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbytes()Returns aBytesReferenceview of the data.intstatic Text[]convertFromStringArray(String[] strings) booleanbooleanhasBytes()Whether aBytesReferenceview of the data is already materialized.inthashCode()booleanWhether aStringview of the data is already materialized.string()Returns aStringview of the data.toString()toXContent(XContentBuilder builder, ToXContent.Params params) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
EMPTY_ARRAY
-
-
Constructor Details
-
Text
-
Text
-
-
Method Details
-
convertFromStringArray
-
hasBytes
public boolean hasBytes()Whether aBytesReferenceview of the data is already materialized. -
bytes
Returns aBytesReferenceview of the data. -
hasString
public boolean hasString()Whether aStringview of the data is already materialized. -
string
Returns aStringview of the data. -
toString
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<Text>
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-