|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.christopherschultz.evaluator.function.ShortCircuitOr
public class ShortCircuitOr
Implements a short-circuit boolean OR operation for an arbitrary number of arguments.
In a short-circuit boolean operation, arguments are evaluated in a left-to-right fashion, stopping at the fist argument that fails to meet the criteria. For example, an AND operation would immediately return FALSE at the first FALSE argument that was encountered. Likewise, an OR operation would immediately return TRUE at the first TRUE argument that was encountered.
If a null
is encountered before the operation can
determine a value (possibly by short-circuiting), then null
is returned.
Constructor Summary | |
---|---|
ShortCircuitOr()
Creates a new ShortCircuitOr object. |
Method Summary | |
---|---|
Object |
call(EvaluationContext ec,
String functionName,
List argumentExpressions)
Invokes the function with the specified argument expressions in the specified evaluation context. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ShortCircuitOr()
Method Detail |
---|
public Object call(EvaluationContext ec, String functionName, List argumentExpressions) throws EvaluationException
Function
call
in interface Function
ec
- The EvaluationContext in which this function is being called.functionName
- The name of the function being called.argumentExpressions
- The expressions which, when evaluated, result
in the arguments to the function.
EvaluationException
- If there is a problem evaluating any of
the arguments' expressions, or if there is
an error during function execution.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |