Class BooleanOperationContributor

java.lang.Object
org.eclipse.epsilon.eol.execute.operations.contributors.OperationContributor
org.eclipse.epsilon.eol.execute.operations.contributors.BooleanOperationContributor
All Implemented Interfaces:
AutoCloseable

public class BooleanOperationContributor extends OperationContributor
  • Constructor Details

    • BooleanOperationContributor

      public BooleanOperationContributor()
  • Method Details

    • contributesTo

      public boolean contributesTo(Object target)
      Specified by:
      contributesTo in class OperationContributor
    • getTarget

      protected Boolean getTarget()
      Overrides:
      getTarget in class OperationContributor
      Returns:
      The OperationContributor.target field.
    • or

      public boolean or(boolean operand)
    • and

      public boolean and(boolean operand)
    • not

      public boolean not()
    • xor

      public boolean xor(boolean operand)
    • asString

      public String asString()
    • ternary

      public Object ternary(Supplier<?> sIfTrue, Supplier<?> sIfFalse)
      Lazy functional-style ternary operation.
      Parameters:
      sIfTrue - Value getter if the target is true
      sIfFalse - Value getter if the target is false
      Returns:
      The value given by the Supplier parameters based on whether the target is true or false.
      Since:
      1.6