be.SIRAPRISE.typeimplementations
Class PLUS_LONG_LONG

java.lang.Object
  extended by be.SIRAPRISE.typeimplementations.PLUS_LONG_LONG
All Implemented Interfaces:
AggregationOperatorImplementation, OperatorImplementation, OperatorImplementation_V0104

public final class PLUS_LONG_LONG
extends java.lang.Object
implements AggregationOperatorImplementation

The PLUS(LONG,LONG) operator returns the LONG value that is the sum of the two arguments. If no such value exists (overflow condition), then an IllegalArgumentException is thrown.

Author:
Erwin

Constructor Summary
PLUS_LONG_LONG()
           
 
Method Summary
 ValueBuffer executeOperator(java.util.LinkedList<ValueBuffer> args)
          The PLUS(LONG,LONG) operator returns the LONG value that is the sum of the two arguments.
 java.lang.String[] getArgumentTypeNames()
          PLUS takes two arguments, each of type LONG
 ScalarValueBuffer getIdentityElement()
          The identity value for PLUS is LONG(0)
 java.lang.String getReturnTypeName()
          The return type is LONG
 boolean isDeterministic()
          Tells whether the operator is deterministic with respect to the arguments of its invocations.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PLUS_LONG_LONG

public PLUS_LONG_LONG()
Method Detail

executeOperator

public ValueBuffer executeOperator(java.util.LinkedList<ValueBuffer> args)
The PLUS(LONG,LONG) operator returns the LONG value that is the sum of the two arguments. If no such value exists (overflow condition), then an IllegalArgumentException is thrown.

Specified by:
executeOperator in interface OperatorImplementation
Parameters:
args - the argument list. The list must hold as many ValueBuffer objects as there are arguments to the operator, and each ValueBuffer object holds a value for some argument to the operator. ValueBuffer objects on the list must appear in the same order as the operator argument declarations.
Returns:
A ValueBuffer object holding the result value of the operator execution in internal format.

getArgumentTypeNames

public java.lang.String[] getArgumentTypeNames()
PLUS takes two arguments, each of type LONG

Specified by:
getArgumentTypeNames in interface OperatorImplementation
Returns:
The names of the argument types

getIdentityElement

public ScalarValueBuffer getIdentityElement()
The identity value for PLUS is LONG(0)

Specified by:
getIdentityElement in interface AggregationOperatorImplementation
Returns:
The identity element.

getReturnTypeName

public java.lang.String getReturnTypeName()
The return type is LONG

Specified by:
getReturnTypeName in interface OperatorImplementation
Returns:
the name of the type of the return value

isDeterministic

public boolean isDeterministic()
Description copied from interface: OperatorImplementation_V0104
Tells whether the operator is deterministic with respect to the arguments of its invocations. An operator is deterministic if and only if for any two distinct invocations, if all the argument values are the same, then the result value returned will also be the same. An example of a nondeterministic operators is RANDOM().

Specified by:
isDeterministic in interface OperatorImplementation_V0104
Returns:
true if the operator is deterministic.