APIdia Launch Partner
Top Description Methods
com.sun.source.tree

public Interface ConditionalExpressionTree

extends ExpressionTree
Known Direct Implementers
com.sun.tools.javac.tree.JCTree.JCConditional

A tree node for the conditional operator ? :. For example:
  condition ? trueExpression : falseExpression
Authors
Peter von der Ahé, Jonathan Gibbons
Since
1.6
Java Language Specification
15.25 Conditional Operator ? :

Method Summary

Modifier and TypeMethod and Description
public ExpressionTree

Returns:

the condition
getCondition
()

Returns the condition.

public ExpressionTree

Returns:

the expression to be evaluated if the condition is false
getFalseExpression
()

Returns the expression to be evaluated if the condition is false.

public ExpressionTree

Returns:

the expression to be evaluated if the condition is true
getTrueExpression
()

Returns the expression to be evaluated if the condition is true.

Method Detail

getConditionback to summary
public ExpressionTree getCondition()

Returns the condition.

Returns:ExpressionTree

the condition

getFalseExpressionback to summary
public ExpressionTree getFalseExpression()

Returns the expression to be evaluated if the condition is false.

Returns:ExpressionTree

the expression to be evaluated if the condition is false

getTrueExpressionback to summary
public ExpressionTree getTrueExpression()

Returns the expression to be evaluated if the condition is true.

Returns:ExpressionTree

the expression to be evaluated if the condition is true