Package org.eclipse.core.expressions
Class EvaluationResult
- java.lang.Object
-
- org.eclipse.core.expressions.EvaluationResult
-
public class EvaluationResult extends Object
An evaluation result represents the result of an expression evaluation. There are exact three instances of evaluation result. They are:FALSE,TRUEandNOT_LOADED.NOT_LOADEDrepresents 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,orandnot. The operation are defined as follows:The AND operation: AND FALSE TRUE NOT_LOADED FALSE FALSE FALSE FALSE TRUE FALSE TRUE NOT_LOADED NOT_LOADED FALSE NOT_LOADED NOT_LOADED
The OR operation: OR FALSE TRUE NOT_LOADED FALSE FALSE TRUE NOT_LOADED TRUE TRUE TRUE TRUE NOT_LOADED NOT_LOADED TRUE NOT_LOADED
The NOT operation: 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
Fields Modifier and Type Field Description static EvaluationResultFALSEThe evaluation result representing the value FALSEstatic EvaluationResultNOT_LOADEDThe evaluation result representing the value NOT_LOADEDstatic EvaluationResultTRUEThe evaluation result representing the value TRUE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EvaluationResultand(EvaluationResult other)Returns anEvaluationResultwhose value isthis && other).EvaluationResultnot()Returns the inverted value of this evaluation resultEvaluationResultor(EvaluationResult other)Returns anEvaluationResultwhose value isthis || other).StringtoString()For debugging purpose onlystatic EvaluationResultvalueOf(boolean b)Returns an evaluation result instance representing the given boolean value.static EvaluationResultvalueOf(Boolean b)Returns a evaluation result instance representing the givenBooleanvalue.
-
-
-
Field Detail
-
FALSE
public static final EvaluationResult FALSE
The evaluation result representing the value FALSE
-
TRUE
public static final EvaluationResult TRUE
The evaluation result representing the value TRUE
-
NOT_LOADED
public static final EvaluationResult NOT_LOADED
The evaluation result representing the value NOT_LOADED
-
-
Method Detail
-
and
public EvaluationResult and(EvaluationResult other)
Returns anEvaluationResultwhose value isthis && other).- Parameters:
other- the right hand side of the and operation.- Returns:
this && otheras defined by the evaluation result
-
or
public EvaluationResult or(EvaluationResult other)
Returns anEvaluationResultwhose value isthis || other).- Parameters:
other- the right hand side of the or operation.- Returns:
this || otheras defined by the evaluation result
-
not
public EvaluationResult not()
Returns the inverted value of this evaluation result- Returns:
- the inverted value of this evaluation result
-
valueOf
public static EvaluationResult valueOf(boolean b)
Returns an evaluation result instance representing the given boolean value. If the given boolean value istruethenExpressionResult.TRUEis returned. If the value isfalsethenExpressionResult.FALSEis returned.- Parameters:
b- a boolean value- Returns:
- the expression result representing the boolean value
-
valueOf
public static EvaluationResult valueOf(Boolean b)
Returns a evaluation result instance representing the givenBooleanvalue. If the givenBooleanvalue istruethenExpressionResult.TRUEis returned. If the value isfalsethenExpressionResult.FALSEis returned.- Parameters:
b- aBooleanvalue- Returns:
- the expression result representing the
Booleanvalue
-
-