Package com.yahoo.searchlib.expression
Class BoolResultNode
- java.lang.Object
-
- com.yahoo.vespa.objects.Selectable
-
- com.yahoo.vespa.objects.Identifiable
-
- com.yahoo.searchlib.expression.ResultNode
-
- com.yahoo.searchlib.expression.BoolResultNode
-
- All Implemented Interfaces:
Cloneable
,Comparable<ResultNode>
public class BoolResultNode extends ResultNode
-
-
Field Summary
Fields Modifier and Type Field Description static int
classId
-
Constructor Summary
Constructors Constructor Description BoolResultNode()
BoolResultNode(boolean value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getFloat()
Returns the float representation of this result.long
getInteger()
Returns the integer representation of this result.byte[]
getRaw()
Returns the raw byte array representation of this result.String
getString()
Returns the string representation of this result.boolean
getValue()
int
hashCode()
void
negate()
Negate the value contained within the result node.protected int
onCmp(ResultNode rhs)
This method must be implemented by all subclasses of this to allow ordering of results.protected void
onDeserialize(com.yahoo.vespa.objects.Deserializer buf)
protected int
onGetClassId()
protected void
onSerialize(com.yahoo.vespa.objects.Serializer buf)
void
set(ResultNode rhs)
This method must be implemented by all subclasses of this to allow new results to be calculated.BoolResultNode
setValue(boolean value)
Sets the value of this result.void
visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor)
-
Methods inherited from class com.yahoo.searchlib.expression.ResultNode
compareTo, equals
-
-
-
-
Method Detail
-
setValue
public BoolResultNode setValue(boolean value)
Sets the value of this result.- Parameters:
value
- The value to set.- Returns:
- This, to allow chaining.
-
getValue
public boolean getValue()
-
onGetClassId
protected int onGetClassId()
- Overrides:
onGetClassId
in classResultNode
-
onSerialize
protected void onSerialize(com.yahoo.vespa.objects.Serializer buf)
- Overrides:
onSerialize
in classcom.yahoo.vespa.objects.Identifiable
-
onDeserialize
protected void onDeserialize(com.yahoo.vespa.objects.Deserializer buf)
- Overrides:
onDeserialize
in classcom.yahoo.vespa.objects.Identifiable
-
getInteger
public long getInteger()
Description copied from class:ResultNode
Returns the integer representation of this result.- Specified by:
getInteger
in classResultNode
- Returns:
- The value of this.
-
getFloat
public double getFloat()
Description copied from class:ResultNode
Returns the float representation of this result.- Specified by:
getFloat
in classResultNode
- Returns:
- The value of this.
-
getString
public String getString()
Description copied from class:ResultNode
Returns the string representation of this result.- Specified by:
getString
in classResultNode
- Returns:
- The value of this.
-
getRaw
public byte[] getRaw()
Description copied from class:ResultNode
Returns the raw byte array representation of this result.- Specified by:
getRaw
in classResultNode
- Returns:
- The value of this.
-
negate
public void negate()
Description copied from class:ResultNode
Negate the value contained within the result node.- Overrides:
negate
in classResultNode
-
onCmp
protected int onCmp(ResultNode rhs)
Description copied from class:ResultNode
This method must be implemented by all subclasses of this to allow ordering of results. This method is used by theCloneable
implementation.- Specified by:
onCmp
in classResultNode
- Parameters:
rhs
- The other node to compare with.- Returns:
- Comparable result.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.yahoo.vespa.objects.Identifiable
-
visitMembers
public void visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor)
- Overrides:
visitMembers
in classcom.yahoo.vespa.objects.Identifiable
-
set
public void set(ResultNode rhs)
Description copied from class:ResultNode
This method must be implemented by all subclasses of this to allow new results to be calculated.- Specified by:
set
in classResultNode
- Parameters:
rhs
- The node to get the result from.
-
-