edu.stanford.nlp.ling.tokensregex.types
Class ValueFunctions.CompareFunction<T>
java.lang.Object
edu.stanford.nlp.ling.tokensregex.types.ValueFunctions.NamedValueFunction
edu.stanford.nlp.ling.tokensregex.types.ValueFunctions.CompareFunction<T>
- All Implemented Interfaces:
- ValueFunction
- Enclosing class:
- ValueFunctions
public static class ValueFunctions.CompareFunction<T>
- extends ValueFunctions.NamedValueFunction
|
Method Summary |
Value |
apply(Env env,
java.util.List<Value> in)
Applies the function to the list values using the environment as context and returns
the evaluated value. |
boolean |
checkArgs(java.util.List<Value> in)
Checks if the arguments are valid |
java.lang.Boolean |
compare(T o1,
T o2)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ValueFunctions.CompareFunction
public ValueFunctions.CompareFunction(java.lang.String name,
java.util.Comparator<T> comparator,
ValueFunctions.CompareType compType,
java.lang.Class clazz)
compare
public java.lang.Boolean compare(T o1,
T o2)
checkArgs
public boolean checkArgs(java.util.List<Value> in)
- Description copied from interface:
ValueFunction
- Checks if the arguments are valid
- Returns:
- true if the arguments are valid (false otherwise)
apply
public Value apply(Env env,
java.util.List<Value> in)
- Description copied from interface:
ValueFunction
- Applies the function to the list values using the environment as context and returns
the evaluated value.
- Parameters:
env - the environment to usein - the input arguments
- Returns:
- Value indicating the value of the function
Stanford NLP Group