1 package polyglot.ast; 2 3 /** 4 * A <code>Conditional</code> is a representation of a Java ternary 5 * expression. That is, <code>(cond ? consequent : alternative)</code>. 6 */ 7 public interface Conditional extends Expr { 8 /** Get the condition to test. */ 9 Expr cond(); 10 /** Set the condition to test. */ 11 Conditional cond(Expr cond); 12 13 /** Get the expression to evaluate when the condition is true. */ 14 Expr consequent(); 15 /** Set the expression to evaluate when the condition is true. */ 16 Conditional consequent(Expr consequent); 17 18 /** Get the expression to evaluate when the condition is false. */ 19 Expr alternative(); 20 /** Set the expression to evaluate when the condition is false. */ 21 Conditional alternative(Expr alternative); 22 } 23