be.SIRAPRISE.typeimplementations
Class SUBSTR_STRING_INT_INT

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

public final class SUBSTR_STRING_INT_INT
extends java.lang.Object
implements OperatorImplementation_V0104

The String Substring operator.

Author:
Erwin

Constructor Summary
SUBSTR_STRING_INT_INT()
           
 
Method Summary
 ValueBuffer executeOperator(java.util.LinkedList<ValueBuffer> args)
          SUBSTR(s,i,j) returns the string that appears in s starting at position i, and ends at the position immeidately before j. i is in the range [1-(LENGTH(s)+1)]. j is in the range [i-(LENGTH(s)+1)].
 java.lang.String[] getArgumentTypeNames()
          SUBSTR takes an argument of type STRING plus two arguments of type INT
 java.lang.String getReturnTypeName()
          The return type is STRING
 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

SUBSTR_STRING_INT_INT

public SUBSTR_STRING_INT_INT()
Method Detail

executeOperator

public ValueBuffer executeOperator(java.util.LinkedList<ValueBuffer> args)
SUBSTR(s,i,j) returns the string that appears in s starting at position i, and ends at the position immeidately before j. i is in the range [1-(LENGTH(s)+1)]. j is in the range [i-(LENGTH(s)+1)]. Both will be adjusted to meet those conditions if they are outside that range. i will be adjusted before j. The first position is 1. SUBSTR(s,x,x) returns the empty string.

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()
SUBSTR takes an argument of type STRING plus two arguments of type INT

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

getReturnTypeName

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

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.