Class Conditions

java.lang.Object
xyz.ronella.trivial.handy.Conditions

public final class Conditions extends Object
A collection of logic implementations.
Since:
2019-11-30
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    and(List<BooleanSupplier> conditions, Sink truthLogic)
    Accepts multiple conditions if all conditions are true it will pass control to the truthLogic.
    static void
    and(List<BooleanSupplier> conditions, Sink truthLogic, Sink falseLogic)
    Accepts multiple conditions if all condition are true it will pass control to the truthLogic otherwise the falseLogic will take it.
    static void
    or(List<BooleanSupplier> conditions, Sink truthLogic)
    Accepts multiple conditions if at least one condition is true it will pass control to the truthLogic.
    static void
    or(List<BooleanSupplier> conditions, Sink truthLogic, Sink falseLogic)
    Accepts multiple conditions if at least one condition is true it will pass control to the truthLogic otherwise the falseLogic will take it.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • or

      public static void or(List<BooleanSupplier> conditions, Sink truthLogic)
      Accepts multiple conditions if at least one condition is true it will pass control to the truthLogic.
      Parameters:
      conditions - A list of Boolean suppliers.
      truthLogic - Must have the truthLogic to perform if at least one is evaluated to true.
    • or

      public static void or(List<BooleanSupplier> conditions, Sink truthLogic, Sink falseLogic)
      Accepts multiple conditions if at least one condition is true it will pass control to the truthLogic otherwise the falseLogic will take it.
      Parameters:
      conditions - A list of Boolean suppliers.
      truthLogic - Must have the truthLogic to perform if at least one is evaluated to true.
      falseLogic - Must have the falseLogic to perform if nothing is evaluated to true.
    • and

      public static void and(List<BooleanSupplier> conditions, Sink truthLogic)
      Accepts multiple conditions if all conditions are true it will pass control to the truthLogic.
      Parameters:
      conditions - A list of Boolean suppliers.
      truthLogic - Must have the truthLogic to perform if all are evaluated to true.
    • and

      public static void and(List<BooleanSupplier> conditions, Sink truthLogic, Sink falseLogic)
      Accepts multiple conditions if all condition are true it will pass control to the truthLogic otherwise the falseLogic will take it.
      Parameters:
      conditions - A list of Boolean suppliers.
      truthLogic - Must have the truthLogic to perform if all are evaluated to true.
      falseLogic - Must have the falseLogic to perform if at least one is evaluated to false.