Package com.yahoo.searchlib.aggregation
Class XorAggregationResult
- java.lang.Object
-
- com.yahoo.vespa.objects.Selectable
-
- com.yahoo.vespa.objects.Identifiable
-
- com.yahoo.searchlib.expression.ExpressionNode
-
- com.yahoo.searchlib.aggregation.AggregationResult
-
- com.yahoo.searchlib.aggregation.XorAggregationResult
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class XorAggregationResult extends AggregationResult
This is an aggregated result holding the xor of the aggregating expression for all matching hits.- Author:
- baldersheim, Simon Thoresen Hult
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
classId
-
Constructor Summary
Constructors Constructor Description XorAggregationResult()
Constructs an empty result node.XorAggregationResult(long xor)
Constructs an instance of this class with given xor value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
equalsAggregation(AggregationResult obj)
ResultNode
getRank()
Returns a value that can be used for ranking.long
getXor()
Returns the current xor value.int
hashCode()
protected void
onDeserialize(com.yahoo.vespa.objects.Deserializer buf)
protected int
onGetClassId()
protected void
onMerge(AggregationResult result)
Mmust be implemented by subclasses to support merge.protected void
onSerialize(com.yahoo.vespa.objects.Serializer buf)
XorAggregationResult
setXor(long xor)
Sets the current xor value.void
visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor)
-
Methods inherited from class com.yahoo.searchlib.aggregation.AggregationResult
clone, equalsExpression, getExpression, getResult, getTag, merge, onExecute, onPrepare, postMerge, setExpression, setTag
-
Methods inherited from class com.yahoo.searchlib.expression.ExpressionNode
equals, execute, executeIterative, onArgument, prepare
-
-
-
-
Constructor Detail
-
XorAggregationResult
public XorAggregationResult()
Constructs an empty result node. NOTE: This instance is broken until non-optional member data is set.
-
XorAggregationResult
public XorAggregationResult(long xor)
Constructs an instance of this class with given xor value.- Parameters:
xor
- The initial xor value to set.
-
-
Method Detail
-
getXor
public long getXor()
Returns the current xor value.- Returns:
- The value.
-
setXor
public XorAggregationResult setXor(long xor)
Sets the current xor value.- Parameters:
xor
- The value to set.- Returns:
- This, to allow chaining.
-
getRank
public ResultNode getRank()
Description copied from class:AggregationResult
Returns a value that can be used for ranking.- Specified by:
getRank
in classAggregationResult
-
onGetClassId
protected int onGetClassId()
- Overrides:
onGetClassId
in classAggregationResult
-
onSerialize
protected void onSerialize(com.yahoo.vespa.objects.Serializer buf)
- Overrides:
onSerialize
in classAggregationResult
-
onDeserialize
protected void onDeserialize(com.yahoo.vespa.objects.Deserializer buf)
- Overrides:
onDeserialize
in classAggregationResult
-
onMerge
protected void onMerge(AggregationResult result)
Description copied from class:AggregationResult
Mmust be implemented by subclasses to support merge. It is called as theAggregationResult.merge(AggregationResult)
method is invoked.- Specified by:
onMerge
in classAggregationResult
- Parameters:
result
- the result to merge with
-
equalsAggregation
protected boolean equalsAggregation(AggregationResult obj)
- Specified by:
equalsAggregation
in classAggregationResult
-
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 classAggregationResult
-
-