Interface Condition

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface Condition
    Represents an operation that returns a condition/boolean. whose functional method is isMet().
    Since:
    1.0
    Author:
    , Bobai Kato
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default Condition and​(Condition other)
      Returns a composed condition that represents a short-circuiting logical AND of this condition
      static boolean areAllMet​(Condition... conditions)
      Returns a composed condition that represents a short-circuiting logical NOT of this condition
      static boolean areAllNotMet​(Condition @NotNull ... conditions)
      Returns a composed condition that represents a short-circuiting logical NOT of this condition
      static boolean areAnyMet​(Condition @NotNull ... conditions)
      Returns a composed condition that represents a short-circuiting logical NOT of this condition
      static boolean areNoneMet​(Condition @NotNull ... conditions)
      Returns a composed condition that represents a short-circuiting logical NOT of this condition
      boolean isMet()
      Check the condition.
      default boolean isNotMet()
      Negates the condition.
      default Condition nand​(Condition other)
      Returns a composed condition that represents a short-circuiting logical NAND of this condition
      default Condition nor​(Condition other)
      Returns a composed condition that represents a short-circuiting logical NOR of this condition
      default Condition or​(Condition other)
      Returns a composed condition that represents a short-circuiting logical OR of this condition
      default Condition xnor​(Condition other)
      Returns a composed condition that represents a short-circuiting logical XNOR of this condition
      default Condition xor​(Condition other)
      Returns a composed condition that represents a short-circuiting logical XOR of this condition
    • Method Detail

      • areAllMet

        @Contract(pure=true)
        static boolean areAllMet​(Condition... conditions)
        Returns a composed condition that represents a short-circuiting logical NOT of this condition
        Parameters:
        conditions - a condition that will be logically-NOTed with this condition
        Returns:
        a composed condition that represents the short-circuiting logical NOT of this condition
      • areAnyMet

        static boolean areAnyMet​(Condition @NotNull ... conditions)
        Returns a composed condition that represents a short-circuiting logical NOT of this condition
        Parameters:
        conditions - a condition that will be logically-NOTed with this condition
        Returns:
        a composed condition that represents the short-circuiting logical NOT of this condition
      • areNoneMet

        static boolean areNoneMet​(Condition @NotNull ... conditions)
        Returns a composed condition that represents a short-circuiting logical NOT of this condition
        Parameters:
        conditions - a condition that will be logically-NOTed with this condition
        Returns:
        a composed condition that represents the short-circuiting logical NOT of this condition
      • areAllNotMet

        static boolean areAllNotMet​(Condition @NotNull ... conditions)
        Returns a composed condition that represents a short-circuiting logical NOT of this condition
        Parameters:
        conditions - a condition that will be logically-NOTed with this condition
        Returns:
        a composed condition that represents the short-circuiting logical NOT of this condition
      • isNotMet

        default boolean isNotMet()
        Negates the condition. True is condition isn't met and False when condition is met.
        Returns:
        the negated condition.
        Since:
        1.0
      • isMet

        boolean isMet()
        Check the condition.
        Returns:
        the final condition of boolean
        Since:
        1.0
      • and

        default Condition and​(Condition other)
        Returns a composed condition that represents a short-circuiting logical AND of this condition
        Parameters:
        other - a condition that will be logically-ANDed with this condition
        Returns:
        a composed condition that represents the short-circuiting logical AND of this condition
      • or

        default Condition or​(Condition other)
        Returns a composed condition that represents a short-circuiting logical OR of this condition
        Parameters:
        other - a condition that will be logically-ORed with this condition
        Returns:
        a composed condition that represents the short-circuiting logical OR of this condition
      • xor

        default Condition xor​(Condition other)
        Returns a composed condition that represents a short-circuiting logical XOR of this condition
        Parameters:
        other - a condition that will be logically-XORed with this condition
        Returns:
        a composed condition that represents the short-circuiting logical XOR of this condition
      • nand

        default Condition nand​(Condition other)
        Returns a composed condition that represents a short-circuiting logical NAND of this condition
        Parameters:
        other -
        Returns:
        a composed condition that represents the short-circuiting logical NAND of this condition
      • nor

        default Condition nor​(Condition other)
        Returns a composed condition that represents a short-circuiting logical NOR of this condition
        Parameters:
        other - a condition that will be logically-NORed with this condition
        Returns:
        a composed condition that represents the short-circuiting logical NOR of this condition
      • xnor

        default Condition xnor​(Condition other)
        Returns a composed condition that represents a short-circuiting logical XNOR of this condition
        Parameters:
        other - a condition that will be logically-XNORed with this condition
        Returns:
        a composed condition that represents the short-circuiting logical XNOR of this condition