Class Conditions


  • @API(status=EXPERIMENTAL,
         since="1.0")
    public final class Conditions
    extends java.lang.Object
    Builder for various conditions.
    Since:
    1.0
    Author:
    Michael J. Simons, Gerrit Meier
    • Method Detail

      • not

        public static Condition not​(Condition condition)
        Negates the given condition.
        Parameters:
        condition - The condition to negate. Must not be null.
        Returns:
        The negated condition.
      • noCondition

        public static Condition noCondition()
        Creates a placeholder condition which is not rendered in the final statement but is useful while chaining conditions together.
        Returns:
        A placeholder condition.
      • isTrue

        public static Condition isTrue()
        Returns:
        a condition that is always true.
      • isFalse

        public static Condition isFalse()
        Returns:
        a condition that is always false.