Class BooleanOperationContributor
- java.lang.Object
-
- org.eclipse.epsilon.eol.execute.operations.contributors.OperationContributor
-
- org.eclipse.epsilon.eol.execute.operations.contributors.BooleanOperationContributor
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class BooleanOperationContributor extends OperationContributor
-
-
Field Summary
-
Fields inherited from class org.eclipse.epsilon.eol.execute.operations.contributors.OperationContributor
cachedMethodNames
-
-
Constructor Summary
Constructors Constructor Description BooleanOperationContributor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
and(boolean operand)
java.lang.String
asString()
boolean
contributesTo(java.lang.Object target)
protected java.lang.Boolean
getTarget()
boolean
not()
boolean
or(boolean operand)
java.lang.Object
ternary(java.util.function.Supplier<?> sIfTrue, java.util.function.Supplier<?> sIfFalse)
Lazy functional-style ternary operation.boolean
xor(boolean operand)
-
Methods inherited from class org.eclipse.epsilon.eol.execute.operations.contributors.OperationContributor
close, findContributedMethodForEvaluatedParameters, findContributedMethodForEvaluatedParameters, findContributedMethodForUnevaluatedParameters, getContext, getReflectionTarget, includeInheritedMethods, setContext, setTarget
-
-
-
-
Method Detail
-
contributesTo
public boolean contributesTo(java.lang.Object target)
- Specified by:
contributesTo
in classOperationContributor
-
getTarget
protected java.lang.Boolean getTarget()
- Overrides:
getTarget
in classOperationContributor
- 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 java.lang.String asString()
-
ternary
public java.lang.Object ternary(java.util.function.Supplier<?> sIfTrue, java.util.function.Supplier<?> sIfFalse)
Lazy functional-style ternary operation.- Parameters:
sIfTrue
- Value getter if the target istrue
sIfFalse
- Value getter if the target isfalse
- Returns:
- The value given by the Supplier parameters based on whether the target is true or false.
- Since:
- 1.6
-
-