com.cafesoft.cams.attr.func
Class MatchFunction

java.lang.Object
  extended by com.cafesoft.cams.attr.func.AbstractFunction
      extended by com.cafesoft.cams.attr.func.MatchFunction
All Implemented Interfaces:
Function

public class MatchFunction
extends AbstractFunction

MatchFunction implements Cams intrinsic matching Functions.

Since:
4/23/2004

Field Summary
static String NAME_CONTAINS_IGNORECASE_STRING_MATCH
          Function name for case insensitive "contains" String matching.
static String NAME_CONTAINS_STRING_MATCH
          Function name for case sensitive "contains" String matching.
static String NAME_ENDS_WITH_IGNORECASE_STRING_MATCH
          Function name for case insensitive "ends with" String matching.
static String NAME_ENDS_WITH_STRING_MATCH
          Function name for case sensitive "ends with" String matching.
static String NAME_EQUALS_IGNORECASE_STRING_MATCH
          Function name for case insensitive "equals" String matching.
static String NAME_EQUALS_STRING_MATCH
          Function name for case sensitive "equals" String matching.
static String NAME_REGEXP_STRING_MATCH
          Function name for regular expression String matching.
static String NAME_STARTS_WITH_IGNORECASE_STRING_MATCH
          Function name for case insensitive "starts with" String matching.
static String NAME_STARTS_WITH_STRING_MATCH
          Function name for case sensitive "starts with" String matching.
 
Fields inherited from class com.cafesoft.cams.attr.func.AbstractFunction
FUNCTION_NS
 
Constructor Summary
protected MatchFunction(String functionName, int functionId, String argumentType)
          Create a new MatchFunction that takes arguments that are all the same type.
protected MatchFunction(String functionName, int functionId, String[] argumentTypes)
          Creates a new MatchFunction that takes arguments that are of different types.
 
Method Summary
static void addFunctions(Map functionMap)
          Static initializer to add all the functions supported by this class to the list of functions handled by this class.
 EvaluationResult evaluate(List argList, EvaluationContext evalContext)
          Evaluate the function, using the specified parameters.
 
Methods inherited from class com.cafesoft.cams.attr.func.AbstractFunction
checkArgList, checkArgListAllowBags, evalArgs, getFunctionId, getFunctionName, getIdentifier, getReturnType, returnsBag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME_REGEXP_STRING_MATCH

public static final String NAME_REGEXP_STRING_MATCH
Function name for regular expression String matching.

See Also:
Constant Field Values

NAME_EQUALS_STRING_MATCH

public static final String NAME_EQUALS_STRING_MATCH
Function name for case sensitive "equals" String matching.

See Also:
Constant Field Values

NAME_EQUALS_IGNORECASE_STRING_MATCH

public static final String NAME_EQUALS_IGNORECASE_STRING_MATCH
Function name for case insensitive "equals" String matching.

See Also:
Constant Field Values

NAME_STARTS_WITH_STRING_MATCH

public static final String NAME_STARTS_WITH_STRING_MATCH
Function name for case sensitive "starts with" String matching.

See Also:
Constant Field Values

NAME_STARTS_WITH_IGNORECASE_STRING_MATCH

public static final String NAME_STARTS_WITH_IGNORECASE_STRING_MATCH
Function name for case insensitive "starts with" String matching.

See Also:
Constant Field Values

NAME_ENDS_WITH_STRING_MATCH

public static final String NAME_ENDS_WITH_STRING_MATCH
Function name for case sensitive "ends with" String matching.

See Also:
Constant Field Values

NAME_ENDS_WITH_IGNORECASE_STRING_MATCH

public static final String NAME_ENDS_WITH_IGNORECASE_STRING_MATCH
Function name for case insensitive "ends with" String matching.

See Also:
Constant Field Values

NAME_CONTAINS_STRING_MATCH

public static final String NAME_CONTAINS_STRING_MATCH
Function name for case sensitive "contains" String matching.

See Also:
Constant Field Values

NAME_CONTAINS_IGNORECASE_STRING_MATCH

public static final String NAME_CONTAINS_IGNORECASE_STRING_MATCH
Function name for case insensitive "contains" String matching.

See Also:
Constant Field Values
Constructor Detail

MatchFunction

protected MatchFunction(String functionName,
                        int functionId,
                        String argumentType)
Create a new MatchFunction that takes arguments that are all the same type.

Parameters:
functionName - the name of the function
functionId - identifies which of the three functions it is
argumentType - the type of all arguments

MatchFunction

protected MatchFunction(String functionName,
                        int functionId,
                        String[] argumentTypes)
Creates a new MatchFunction that takes arguments that are of different types.

Parameters:
functionName - the name of the function
functionId - identifies which of the three functions it is
argumentTypes - the types of the arguments
Method Detail

addFunctions

public static void addFunctions(Map functionMap)
Static initializer to add all the functions supported by this class to the list of functions handled by this class.


evaluate

public EvaluationResult evaluate(List argList,
                                 EvaluationContext evalContext)
Evaluate the function, using the specified parameters.

Specified by:
evaluate in interface Function
Specified by:
evaluate in class AbstractFunction
Parameters:
argList - a List of Evaluatable objects representing the arguments passed to the function
evalContext - an EvaluationContext so that the Evaluatable objects can be evaluated
Returns:
an EvaluationResult representing the function's result


Generated on 10:38:35 AM April 14, 2011, © 1996-2010 Cafésoft LLC. All rights reserved.