Package org.eclipse.core.expressions
Class EvaluationResult
java.lang.Object
org.eclipse.core.expressions.EvaluationResult
An evaluation result represents the result of an expression
evaluation. There are exact three instances of evaluation
result. They are:
FALSE
, TRUE
and
NOT_LOADED
. NOT_LOADED
represents
the fact that an expression couldn't be evaluated since a
plug-in providing certain test expressions isn't loaded yet.
In addition the class implements the three operation and
, or
and not
. The operation are
defined as follows:
AND | FALSE | TRUE | NOT_LOADED |
FALSE | FALSE | FALSE | FALSE |
TRUE | FALSE | TRUE | NOT_LOADED |
NOT_LOADED | FALSE | NOT_LOADED | NOT_LOADED |
OR | FALSE | TRUE | NOT_LOADED |
FALSE | FALSE | TRUE | NOT_LOADED |
TRUE | TRUE | TRUE | TRUE |
NOT_LOADED | NOT_LOADED | TRUE | NOT_LOADED |
NOT | FALSE | TRUE | NOT_LOADED |
TRUE | FALSE | NOT_LOADED |
The class is not intended to be subclassed by clients.
- Since:
- 3.0
- Restriction:
- This class is not intended to be subclassed by clients.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EvaluationResult
The evaluation result representing the value FALSEstatic final EvaluationResult
The evaluation result representing the value NOT_LOADEDstatic final EvaluationResult
The evaluation result representing the value TRUE -
Method Summary
Modifier and TypeMethodDescriptionand
(EvaluationResult other) Returns anEvaluationResult
whose value isthis && other)
.not()
Returns the inverted value of this evaluation resultor
(EvaluationResult other) Returns anEvaluationResult
whose value isthis || other)
.toString()
For debugging purpose onlystatic EvaluationResult
valueOf
(boolean b) Returns an evaluation result instance representing the given boolean value.static EvaluationResult
Returns a evaluation result instance representing the givenBoolean
value.
-
Field Details
-
FALSE
The evaluation result representing the value FALSE -
TRUE
The evaluation result representing the value TRUE -
NOT_LOADED
The evaluation result representing the value NOT_LOADED
-
-
Method Details
-
and
Returns anEvaluationResult
whose value isthis && other)
.- Parameters:
other
- the right hand side of the and operation.- Returns:
this && other
as defined by the evaluation result
-
or
Returns anEvaluationResult
whose value isthis || other)
.- Parameters:
other
- the right hand side of the or operation.- Returns:
this || other
as defined by the evaluation result
-
not
Returns the inverted value of this evaluation result- Returns:
- the inverted value of this evaluation result
-
valueOf
Returns an evaluation result instance representing the given boolean value. If the given boolean value istrue
thenExpressionResult.TRUE
is returned. If the value isfalse
thenExpressionResult.FALSE
is returned.- Parameters:
b
- a boolean value- Returns:
- the expression result representing the boolean value
-
valueOf
Returns a evaluation result instance representing the givenBoolean
value. If the givenBoolean
value istrue
thenExpressionResult.TRUE
is returned. If the value isfalse
thenExpressionResult.FALSE
is returned.- Parameters:
b
- aBoolean
value- Returns:
- the expression result representing the
Boolean
value
-
toString
For debugging purpose only
-