Class jXOr
- java.lang.Object
-
- edu.uiuc.ncsa.security.util.functor.JFunctorImpl
-
- edu.uiuc.ncsa.security.util.functor.logic.jXOr
-
- All Implemented Interfaces:
JFunctor
,JMetaMetaFunctor
,JSONFunctor
,Serializable
public class jXOr extends JFunctorImpl
This is the exclusive OR operator. This means that if there is a list of conditionals, it will evaluate them in turn until the first of them is true and skip the rest. The result is therefore true if exactly one of these has evaluated to true and false otherwise if none do. This is very useful in creating statements that might be nested and require elseif statements.Created by Jeff Gaynor
on 6/13/18 at 3:45 PM- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description jXOr()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
execute()
int
getIndex()
The index of the functor that evaluated to true.-
Methods inherited from class edu.uiuc.ncsa.security.util.functor.JFunctorImpl
addArg, addArg, addArg, addArg, addArg, addArg, checkArgs, checkArgs, clearState, getArgs, getBooleanResult, getIntResult, getListResult, getName, getResult, getStringResult, isExecuted, reset, toJSON, toString
-
-
-
-
Method Detail
-
getIndex
public int getIndex()
The index of the functor that evaluated to true. Use this to get it from the arg list.- Returns:
-
execute
public Object execute()
-
-