Class Inclusion<T>

  • Type Parameters:
    T - the type of the value associated with the inclusion rule

    public final class Inclusion<T>
    extends Object
    Represents an inclusion rule with optional negation logic. The class provides methods for defining an action with the ability to toggle whether the next operation should be negated.
    • Constructor Detail

      • Inclusion

        public Inclusion​(T value,
                         NegateNext negateNext)
        Constructs an Inclusion instance with the specified value and negation logic.
        Parameters:
        value - the value associated with this inclusion rule
        negateNext - the NegateNext instance for managing negation logic
    • Method Detail

      • should

        public T should()
        Returns the value associated with this inclusion rule.
        Returns:
        the value of type T attached to this inclusion rule
      • shouldNot

        public T shouldNot()
        Applies negation logic to the subsequent operation and returns the associated value.
        Returns:
        the value of type T attached to this inclusion rule