java.lang.Object
xyz.ronella.trivial.command.logic.AbstractLogical
xyz.ronella.trivial.command.logic.LogicOR
All Implemented Interfaces:
BiConsumer<Sink,Sink>, Consumer<Sink>, ILogical

public class LogicOR extends AbstractLogical
A class that accepts multiple conditions and if at least one condition is true it will pass control to the truthLogic otherwise the falseLogic will take it.
Since:
2019-11-30
  • Constructor Details

    • LogicOR

      public LogicOR(List<BooleanSupplier> conditions, Sink defaultTruthLogic, Sink defaultFalseLogic)
      Creates an instance of LogicOR.
      Parameters:
      conditions - A list of BooleanSupplier.
      defaultTruthLogic - The default truth logic.
      defaultFalseLogic - The default false logic.
    • LogicOR

      public LogicOR(List<BooleanSupplier> conditions, Sink defaultTruthLogic)
      Creates an instance of LogicOR.
      Parameters:
      conditions - A list of BooleanSupplier.
      defaultTruthLogic - The default truth logic.
    • LogicOR

      public LogicOR(List<BooleanSupplier> conditions)
      Creates an instance of LogicOR.
      Parameters:
      conditions - A list of BooleanSupplier.
    • LogicOR

      public LogicOR(Sink defaultTruthLogic, Sink defaultFalseLogic, BooleanSupplier... conditions)
      Creates an instance of LogicOR.
      Parameters:
      defaultTruthLogic - The default truth logic.
      defaultFalseLogic - The default false logic.
      conditions - An array of BooleanSupplier.
    • LogicOR

      public LogicOR(Sink defaultTruthLogic, BooleanSupplier... conditions)
      Creates an instance of LogicOR.
      Parameters:
      defaultTruthLogic - The default truth logic.
      conditions - An array of BooleanSupplier.
    • LogicOR

      public LogicOR(BooleanSupplier... conditions)
      Creates an instance of LogicOR.
      Parameters:
      conditions - An array of BooleanSupplier.
  • Method Details