Class BooleanFunction

  • All Implemented Interfaces:
    Function<Boolean>

    public abstract class BooleanFunction
    extends Object
    implements Function<Boolean>
    A Function for primitives that accepts an argument of type boolean and returns a new value of the same type.

    The reason why BooleanFunction is an abstract class instead of an ordinary interface, is that this class doesn't cause any unwanted boxing of primitives version of the call method is used instead of the one that accepts and returns a/an Boolean).

    This class is generated.

    Author:
    Peter Veentjer.
    • Constructor Detail

      • BooleanFunction

        public BooleanFunction()
    • Method Detail

      • call

        public abstract boolean call​(boolean current)
        Calculates the new value based on the current value.
        Parameters:
        current - the current value.
        Returns:
        the new value.
      • call

        public final Boolean call​(Boolean arg)
        Description copied from interface: Function
        Evaluates the function.
        Specified by:
        call in interface Function<Boolean>
        Parameters:
        arg - the value to evaluate.
        Returns:
        the result of the evaluation