net.christopherschultz.evaluator.function
Class ContainsAllFunction

java.lang.Object
  extended by net.christopherschultz.evaluator.StandardFunction
      extended by net.christopherschultz.evaluator.function.ContainsAllFunction
All Implemented Interfaces:
Function

public class ContainsAllFunction
extends StandardFunction

Returns true if the array or collection in the first argument contains all remaining arguments, in any order.

Usage: containsAll(a:array or list, element1, element2, ... elementN)

This function respects the value of MathFunction.NULL_RETURNS_NULL; if the array or list argument is null, the behavior is defined by the current value of MathExpression.NULL_RETURNS_NULL. If the property is set to true, then a null is returned. If the property is set to false, then false is returned (since null cannot contain anything).

Version:
$Revision: 1.4 $ $Date: 2008-06-20 22:58:48 $
Author:
Chris Schultz

Constructor Summary
ContainsAllFunction()
           
 
Method Summary
 Object call(EvaluationContext ec, String functionName, Object[] args)
          Calls this function with standard argument evaluation semantics.
 
Methods inherited from class net.christopherschultz.evaluator.StandardFunction
call, getExpressionValue, getExpressionValueArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContainsAllFunction

public ContainsAllFunction()
Method Detail

call

public Object call(EvaluationContext ec,
                   String functionName,
                   Object[] args)
            throws EvaluationException
Description copied from class: StandardFunction
Calls this function with standard argument evaluation semantics.

Specified by:
call in class StandardFunction
Parameters:
ec - The EvaluationContext in which this function is being called.
functionName - The name of the function being invoked.
args - The argument values to pass to this function.
Returns:
The result of the function.
Throws:
EvaluationException - If there is an error during function execution.