public abstract class ConditionalExpression extends Object
Constructor and Description |
---|
ConditionalExpression()
Default constructor used when constructing an object of a
subclass that has no subexpressions (e.g., a TrueExpression) or
that has subexpressions that are not ConditionalExpressions
(e.g., a Comparison).
|
ConditionalExpression(ConditionalExpression left,
ConditionalExpression right)
Constructor used when constructing an object of a subclass that
has one or two subexpressions.
|
Modifier and Type | Method and Description |
---|---|
ConditionalExpression |
getLeft()
Returns the left (i.e., the first) subexpression of the
expression represented by the called object.
|
ConditionalExpression |
getRight()
Returns the right (i.e., the second) subexpression of the
expression represented by the called object.
|
abstract boolean |
isTrue()
Evaluates the expression represented by the called object, based on
the current truth values of the subexpressions.
|
public ConditionalExpression()
public ConditionalExpression(ConditionalExpression left, ConditionalExpression right)
left
- one of the conditional subexpressionsright
- the other conditional subexpressionpublic ConditionalExpression getLeft()
public ConditionalExpression getRight()
public abstract boolean isTrue()