Class Value<V>

java.lang.Object
com.google.cloud.datastore.Value<V>
Type Parameters:
V - the type of the content for this value
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BlobValue, BooleanValue, DoubleValue, EntityValue, KeyValue, LatLngValue, ListValue, LongValue, NullValue, RawValue, StringValue, TimestampValue

public abstract class Value<V> extends Object implements Serializable
Base class for all Google Cloud Datastore value types. All values must be associated with a non-null content (except NullValue). All values are immutable (including their content). To edit (a copy) use toBuilder(). Unsupported value (deprecated or unrecognized) would be represented by RawValue.
See Also:
  • Method Details

    • getType

      public final ValueType getType()
      Returns the type of this value.
    • excludeFromIndexes

      public final boolean excludeFromIndexes()
      Returns whether this value should be excluded from indexes.
    • get

      public final V get()
    • toBuilder

      public abstract ValueBuilder<?,?,?> toBuilder()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • fromPb

      public static Value<?> fromPb(Value proto)