Package com.yahoo.searchlib.expression
Class UnaryBitFunctionNode
- java.lang.Object
-
- com.yahoo.vespa.objects.Selectable
-
- com.yahoo.vespa.objects.Identifiable
-
- com.yahoo.searchlib.expression.ExpressionNode
-
- com.yahoo.searchlib.expression.FunctionNode
-
- com.yahoo.searchlib.expression.MultiArgFunctionNode
-
- com.yahoo.searchlib.expression.UnaryFunctionNode
-
- com.yahoo.searchlib.expression.UnaryBitFunctionNode
-
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
MD5BitFunctionNode
,XorBitFunctionNode
public abstract class UnaryBitFunctionNode extends UnaryFunctionNode
This is an abstract super-class for all unary functions that operator on bit values.- 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 UnaryBitFunctionNode()
Constructs an empty result node.UnaryBitFunctionNode(ExpressionNode arg, int numBits)
Constructs an instance of this class with given argument and number of bits.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
equalsUnaryFunction(UnaryFunctionNode obj)
int
getNumBits()
Returns the number of bits to operate on.int
hashCode()
protected void
onDeserialize(com.yahoo.vespa.objects.Deserializer buf)
protected int
onGetClassId()
protected void
onSerialize(com.yahoo.vespa.objects.Serializer buf)
UnaryBitFunctionNode
setNumBits(int numBits)
Sets the number of bits to operate on.void
visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor)
-
Methods inherited from class com.yahoo.searchlib.expression.UnaryFunctionNode
equalsMultiArgFunction, getArg, onPrepare, onPrepareResult
-
Methods inherited from class com.yahoo.searchlib.expression.MultiArgFunctionNode
addArg, clone, equalsFunction, getArg, getNumArgs, onCalculate, onExecute, selectMembers
-
Methods inherited from class com.yahoo.searchlib.expression.FunctionNode
equalsExpression, getResult, setResult
-
Methods inherited from class com.yahoo.searchlib.expression.ExpressionNode
equals, execute, executeIterative, onArgument, prepare
-
-
-
-
Constructor Detail
-
UnaryBitFunctionNode
public UnaryBitFunctionNode()
Constructs an empty result node. NOTE: This instance is broken until non-optional member data is set.
-
UnaryBitFunctionNode
public UnaryBitFunctionNode(ExpressionNode arg, int numBits)
Constructs an instance of this class with given argument and number of bits.- Parameters:
arg
- The argument for this function.numBits
- The number of bits to operate on.
-
-
Method Detail
-
getNumBits
public final int getNumBits()
Returns the number of bits to operate on.- Returns:
- The number of bits.
-
setNumBits
public UnaryBitFunctionNode setNumBits(int numBits)
Sets the number of bits to operate on.- Parameters:
numBits
- The number of bits.- Returns:
- This, to allow chaining.
-
onGetClassId
protected int onGetClassId()
- Overrides:
onGetClassId
in classUnaryFunctionNode
-
onSerialize
protected void onSerialize(com.yahoo.vespa.objects.Serializer buf)
- Overrides:
onSerialize
in classMultiArgFunctionNode
-
onDeserialize
protected void onDeserialize(com.yahoo.vespa.objects.Deserializer buf)
- Overrides:
onDeserialize
in classMultiArgFunctionNode
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classMultiArgFunctionNode
-
equalsUnaryFunction
protected final boolean equalsUnaryFunction(UnaryFunctionNode obj)
- Specified by:
equalsUnaryFunction
in classUnaryFunctionNode
-
visitMembers
public void visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor)
- Overrides:
visitMembers
in classMultiArgFunctionNode
-
-