Class NumericResultNode

java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.objects.Identifiable
All Implemented Interfaces:
Cloneable, Comparable<ResultNode>
Direct Known Subclasses:
FloatResultNode, Int16ResultNode, Int32ResultNode, Int8ResultNode, IntegerResultNode

public abstract class NumericResultNode extends SingleResultNode
This is a superclass for all numerical results.
Author:
baldersheim, Simon Thoresen Hult
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    In-place division of this result with another.
    abstract Object
    Return a java numeric, either Double or Long, depending on the underlying container.
    Return a java native, either String, Double or Long, depending on the underlying container.
    abstract void
    In-place modulo of this result with another.
    abstract void
    In-place multiplication of this result with another.
    protected int
     

    Methods inherited from class com.yahoo.searchlib.expression.SingleResultNode

    add, max, min

    Methods inherited from class com.yahoo.searchlib.expression.ResultNode

    compareTo, equals, getFloat, getInteger, getRaw, getString, negate, onCmp, set

    Methods inherited from class com.yahoo.vespa.objects.Identifiable

    clone, create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getRawUtf8Bytes, getUtf8, hashCode, onDeserialize, onSerialize, putUtf8, registerClass, registerClass, serialize, serializeOptional, serializeWithId, toString, visitMembers

    Methods inherited from class com.yahoo.vespa.objects.Selectable

    select, select, selectMembers

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • classId

      public static final int classId
  • Constructor Details

    • NumericResultNode

      public NumericResultNode()
  • Method Details

    • multiply

      public abstract void multiply(ResultNode rhs)
      In-place multiplication of this result with another.
      Parameters:
      rhs - The result to multiply with this.
    • divide

      public abstract void divide(ResultNode rhs)
      In-place division of this result with another.
      Parameters:
      rhs - The result to divide this by.
    • modulo

      public abstract void modulo(ResultNode rhs)
      In-place modulo of this result with another.
      Parameters:
      rhs - The result to modulo this with.
    • getNumber

      public abstract Object getNumber()
      Return a java numeric, either Double or Long, depending on the underlying container.
      Returns:
      The underlying numeric value.
    • getValue

      public Object getValue()
      Description copied from class: SingleResultNode
      Return a java native, either String, Double or Long, depending on the underlying container.
      Specified by:
      getValue in class SingleResultNode
      Returns:
      The underlying numeric value.
    • onGetClassId

      protected int onGetClassId()
      Overrides:
      onGetClassId in class ResultNode