Class 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
    • Field Detail

      • index

        protected int index
    • Constructor Detail

      • jXOr

        public jXOr()
    • 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()