java.lang.Object
com.sun.xacml.cond.FunctionBase
com.sun.xacml.cond.NOfFunction
- All Implemented Interfaces:
- Function
- public class NOfFunction
- extends FunctionBase
A class that implements the n-of function. It requires
at least one argument. The first argument must be an integer
and the rest of the arguments must be booleans. If the number of
boolean arguments that evaluate to true is at least the value of the
first argument, the function returns true. Otherwise, it returns false
(or indeterminate, as described in the next paragraph.
This function evaluates the arguments one at a time, starting with
the first one. As soon as the result of the function can be determined,
evaluation stops and that result is returned. During this process, if
any argument evaluates to indeterminate, an indeterminate result is
returned.
- Since:
- 1.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME_N_OF
public static final java.lang.String NAME_N_OF
- Standard identifier for the n-of function.
- See Also:
- Constant Field Values
NOfFunction
public NOfFunction(java.lang.String functionName)
- Creates a new
NOfFunction
object.
getSupportedIdentifiers
public static java.util.Set getSupportedIdentifiers()
- Returns a
Set
containing all the function identifiers
supported by this class.
evaluate
public EvaluationResult evaluate(java.util.List inputs,
com.sun.xacml.EvaluationCtx context)
- Evaluate the function, using the specified parameters.
checkInputs
public void checkInputs(java.util.List inputs)
throws java.lang.IllegalArgumentException
- Description copied from class:
FunctionBase
- Default handling of input checking. This does some simple checking
based on the type of constructor used. If you need anything more
complex, or if you used the simple constructor, then you must
override this method.
- Specified by:
checkInputs
in interface Function
- Overrides:
checkInputs
in class FunctionBase
checkInputsNoBag
public void checkInputsNoBag(java.util.List inputs)
throws java.lang.IllegalArgumentException
- Description copied from class:
FunctionBase
- Default handling of input checking. This does some simple checking
based on the type of constructor used. If you need anything more
complex, or if you used the simple constructor, then you must
override this method.
- Specified by:
checkInputsNoBag
in interface Function
- Overrides:
checkInputsNoBag
in class FunctionBase