Class BooleanOperationContributor
- java.lang.Object
-
- org.eclipse.epsilon.eol.execute.operations.contributors.OperationContributor
-
- org.eclipse.epsilon.eol.execute.operations.contributors.BooleanOperationContributor
-
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 booleanand(boolean operand)java.lang.StringasString()booleancontributesTo(java.lang.Object target)protected java.lang.BooleangetTarget()booleannot()booleanor(boolean operand)java.lang.Objectternary(java.util.function.Supplier<?> sIfTrue, java.util.function.Supplier<?> sIfFalse)Lazy functional-style ternary operation.booleanxor(boolean operand)-
Methods inherited from class org.eclipse.epsilon.eol.execute.operations.contributors.OperationContributor
findContributedMethodForEvaluatedParameters, findContributedMethodForEvaluatedParameters, findContributedMethodForUnevaluatedParameters, getContext, getReflectionTarget, includeInheritedMethods, setContext, setTarget
-
-
-
-
Method Detail
-
contributesTo
public boolean contributesTo(java.lang.Object target)
- Specified by:
contributesToin classOperationContributor
-
getTarget
protected java.lang.Boolean getTarget()
- Overrides:
getTargetin classOperationContributor- Returns:
- The
OperationContributor.targetfield.
-
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 istruesIfFalse- 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
-
-