ru.onego.industrial.catalog.util
Class LeftFunction

java.lang.Object
  extended by ru.onego.industrial.catalog.util.LeftFunction
All Implemented Interfaces:
FunctionInterface

public class LeftFunction
extends java.lang.Object
implements FunctionInterface

Class implements standard Left() function.

Version:
1.0
Author:
Lev Levin

Constructor Summary
LeftFunction()
           
 
Method Summary
 java.lang.Object exec(java.util.List params)
          Returns result of left() function aplied to value.
 java.lang.String getName()
          Returns name of this function
 int getParamCount()
          Returns number of parameters
 java.lang.Class getParamType(int param)
          Returns type of parameter, specified by the index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LeftFunction

public LeftFunction()
Method Detail

getName

public java.lang.String getName()
Returns name of this function

Specified by:
getName in interface FunctionInterface
Returns:
"Left"

getParamCount

public int getParamCount()
                  throws FunctionException
Returns number of parameters

Specified by:
getParamCount in interface FunctionInterface
Returns:
1
Throws:
FunctionException - never

getParamType

public java.lang.Class getParamType(int param)
                             throws FunctionException
Description copied from interface: FunctionInterface
Returns type of parameter, specified by the index. Parameters should be convertible t the results of this method.

Specified by:
getParamType in interface FunctionInterface
Parameters:
param - Index of the parameter
Returns:
Class representing type of parameter
Throws:
FunctionException - Thrown if index out of bounbds

exec

public java.lang.Object exec(java.util.List params)
                      throws FunctionException
Returns result of left() function aplied to value.

Specified by:
exec in interface FunctionInterface
Parameters:
params - Function params
Returns:
Treated value
Throws:
FunctionException - never