edu.stanford.nlp.ling.tokensregex.types
Class ValueFunctions.StringFunction

java.lang.Object
  extended by edu.stanford.nlp.ling.tokensregex.types.ValueFunctions.NamedValueFunction
      extended by edu.stanford.nlp.ling.tokensregex.types.ValueFunctions.StringFunction
All Implemented Interfaces:
ValueFunction
Enclosing class:
ValueFunctions

public abstract static class ValueFunctions.StringFunction
extends ValueFunctions.NamedValueFunction


Field Summary
protected  int nargs
           
protected  java.lang.String resultTypeName
           
 
Fields inherited from class edu.stanford.nlp.ling.tokensregex.types.ValueFunctions.NamedValueFunction
name, signature
 
Constructor Summary
protected ValueFunctions.StringFunction(java.lang.String name, int nargs)
           
protected ValueFunctions.StringFunction(java.lang.String name, int nargs, java.lang.String resultTypeName)
           
 
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
abstract  java.lang.String compute(java.lang.String... strs)
           
 
Methods inherited from class edu.stanford.nlp.ling.tokensregex.types.ValueFunctions.NamedValueFunction
getParamDesc, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

resultTypeName

protected java.lang.String resultTypeName

nargs

protected int nargs
Constructor Detail

ValueFunctions.StringFunction

protected ValueFunctions.StringFunction(java.lang.String name,
                                        int nargs)

ValueFunctions.StringFunction

protected ValueFunctions.StringFunction(java.lang.String name,
                                        int nargs,
                                        java.lang.String resultTypeName)
Method Detail

compute

public abstract java.lang.String compute(java.lang.String... strs)

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 use
in - the input arguments
Returns:
Value indicating the value of the function


Stanford NLP Group