Class DoubleFieldValue

java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.objects.Identifiable
All Implemented Interfaces:
Cloneable, Comparable<FieldValue>

public final class DoubleFieldValue extends NumericFieldValue
A 64-bit float field value
Author:
Einar M R Rosenvinge
  • Field Details

    • classId

      public static final int classId
  • Constructor Details

    • DoubleFieldValue

      public DoubleFieldValue()
    • DoubleFieldValue

      public DoubleFieldValue(double value)
    • DoubleFieldValue

      public DoubleFieldValue(Double value)
    • DoubleFieldValue

      public DoubleFieldValue(String s)
  • Method Details

    • getFactory

      public static PrimitiveDataType.Factory getFactory()
    • clone

      public DoubleFieldValue clone()
      Overrides:
      clone in class FieldValue
    • clear

      public void clear()
      Specified by:
      clear in class FieldValue
    • getNumber

      public Number getNumber()
      Specified by:
      getNumber in class NumericFieldValue
    • assign

      public void assign(Object obj)
      Description copied from class: FieldValue
      Assign this non-fieldvalue value to this field value. This is used to be able to assign ints to Integer field values and List to Array field values and such.

      Override to accept the specific types that should be legal.

      Specified by:
      assign in class FieldValue
    • getDouble

      public double getDouble()
    • getWrappedValue

      public Object getWrappedValue()
      Description copied from class: FieldValue
      Used to retrieve wrapped type for simple types, such that you can use get methods to retrieve ints and floats directly instead of Int/Float field values. Complex types that can't be specified by simple java types just return themselves.
      Overrides:
      getWrappedValue in class FieldValue
    • getDataType

      public DataType getDataType()
      Specified by:
      getDataType in class FieldValue
    • printXml

      @Deprecated public void printXml(XmlStream xml)
      Deprecated.
      Specified by:
      printXml in class FieldValue
    • toString

      public String toString()
      Overrides:
      toString in class com.yahoo.vespa.objects.Identifiable
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class com.yahoo.vespa.objects.Identifiable
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class com.yahoo.vespa.objects.Identifiable
    • serialize

      public void serialize(Field field, FieldWriter writer)
      Description copied from class: FieldValue
      Write out field value to the specified writer
      Specified by:
      serialize in class FieldValue
    • deserialize

      public void deserialize(Field field, FieldReader reader)
      Description copied from class: FieldValue
      Read a field value from the specified reader
      Specified by:
      deserialize in class FieldValue
    • compareTo

      public int compareTo(FieldValue fieldValue)
      Specified by:
      compareTo in interface Comparable<FieldValue>
      Overrides:
      compareTo in class FieldValue