Class FunctionArguments
java.lang.Object
org.apache.cassandra.cql3.functions.FunctionArguments
- All Implemented Interfaces:
Arguments
Default
Arguments implementation.-
Constructor Summary
ConstructorsConstructorDescriptionFunctionArguments(ProtocolVersion version, ArgumentDeserializer... deserializers) -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if at least one of the arguments is null.static FunctionArgumentsemptyInstance(ProtocolVersion version) Creates an emptyFunctionArguments.<T> Tget(int i) Returns the specified argumentReturns the protocol versionstatic FunctionArgumentsnewInstanceForNativeFunction(ProtocolVersion version, List<AbstractType<?>> argTypes) Creates a newFunctionArgumentsfor a native function.static FunctionArgumentsnewInstanceForUdf(ProtocolVersion version, List<UDFDataType> argTypes) Creates a newFunctionArgumentsfor the specified types.static FunctionArgumentsnewNoopInstance(ProtocolVersion version, int numberOfArguments) Creates a newFunctionArgumentsthat does not deserialize the arguments.voidset(int i, ByteBuffer buffer) Sets the specified value to the argumentsintsize()Returns the current number of arguments.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cassandra.cql3.functions.Arguments
getAsBoolean, getAsByte, getAsDouble, getAsFloat, getAsInt, getAsLong, getAsShort
-
Constructor Details
-
FunctionArguments
-
-
Method Details
-
newInstanceForUdf
public static FunctionArguments newInstanceForUdf(ProtocolVersion version, List<UDFDataType> argTypes) Creates a newFunctionArgumentsfor the specified types.- Parameters:
version- the protocol versionargTypes- the argument types- Returns:
- a new
FunctionArgumentsfor the specified types.
-
getProtocolVersion
Description copied from interface:ArgumentsReturns the protocol version- Specified by:
getProtocolVersionin interfaceArguments- Returns:
- the protocol version
-
newNoopInstance
Creates a newFunctionArgumentsthat does not deserialize the arguments.- Parameters:
version- the protocol versionnumberOfArguments- the number of argument- Returns:
- a new
FunctionArgumentsfor the specified types.
-
emptyInstance
Creates an emptyFunctionArguments.- Parameters:
version- the protocol version- Returns:
- an empty
FunctionArguments
-
newInstanceForNativeFunction
public static FunctionArguments newInstanceForNativeFunction(ProtocolVersion version, List<AbstractType<?>> argTypes) Creates a newFunctionArgumentsfor a native function.Native functions can use different
ArgumentDeserializerto avoid instanciating primitive wrappers.- Parameters:
version- the protocol versionargTypes- the argument types- Returns:
- a new
FunctionArgumentsfor the specified types.
-
set
Description copied from interface:ArgumentsSets the specified value to the arguments -
containsNulls
public boolean containsNulls()Description copied from interface:ArgumentsChecks if at least one of the arguments is null.- Specified by:
containsNullsin interfaceArguments- Returns:
trueif at least one of the arguments is null,falseotherwise.
-
get
public <T> T get(int i) Description copied from interface:ArgumentsReturns the specified argument -
size
public int size()Description copied from interface:ArgumentsReturns the current number of arguments.
-