Class Text (2.0.0)

public final class Text implements Serializable

Text wraps around a string of unlimited size.

Ordinary Java strings stored as properties in Entity objects are limited to 1500 bytes. However, Text objects can also be stored in properties, and are unlimited in size. However, they will not be indexed for query purposes.

Consider using a standard Java string and storing it with the Entity#setUnindexedProperty method instead.

Inheritance

java.lang.Object > Text

Implements

Serializable

Static Fields

serialVersionUID

public static final long serialVersionUID
Field Value
TypeDescription
long

Constructors

Text(String value)

public Text(String value)

Construct a new Text object with the specified value. This object cannot be modified after construction.

Parameter
NameDescription
valueString

Methods

equals(@Nullable Object object)

public boolean equals(@Nullable Object object)

Two Text objects are considered equal if their content strings match exactly.

Parameter
NameDescription
object@org.checkerframework.checker.nullness.qual.Nullable java.lang.Object
Returns
TypeDescription
boolean
Overrides

getValue()

public String getValue()

Return the value of this Text. Can be null.

Returns
TypeDescription
String

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

toString()

public String toString()

Returns the first 70 characters of the underlying string.

Returns
TypeDescription
String
Overrides