ConditionalExpressionTree.java revision 1604:6f34826bbfdc
15191Swollman/* 25191Swollman * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. 35191Swollman * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 45191Swollman * 55191Swollman * This code is free software; you can redistribute it and/or modify it 65191Swollman * under the terms of the GNU General Public License version 2 only, as 75191Swollman * published by the Free Software Foundation. Oracle designates this 85191Swollman * particular file as subject to the "Classpath" exception as provided 95191Swollman * by Oracle in the LICENSE file that accompanied this code. 105191Swollman * 115191Swollman * This code is distributed in the hope that it will be useful, but WITHOUT 125191Swollman * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 135191Swollman * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 145191Swollman * version 2 for more details (a copy is included in the LICENSE file that 155191Swollman * accompanied this code). 165191Swollman * 175191Swollman * You should have received a copy of the GNU General Public License version 185191Swollman * 2 along with this work; if not, write to the Free Software Foundation, 195191Swollman * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 205191Swollman * 215191Swollman * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 225191Swollman * or visit www.oracle.com if you need additional information or have any 235191Swollman * questions. 245191Swollman */ 255191Swollman 265191Swollmanpackage jdk.nashorn.api.tree; 275191Swollman 285191Swollman/** 295191Swollman * A tree node for the conditional operator ? :. 305191Swollman * 315191Swollman * For example: 325191Swollman * <pre> 335191Swollman * <em>condition</em> ? <em>trueExpression</em> : <em>falseExpression</em> 3450477Speter * </pre> 355191Swollman * 365191Swollman * @since 9 375191Swollman */ 385191Swollmanpublic interface ConditionalExpressionTree extends ExpressionTree { 395191Swollman /** 405191Swollman * Returns the condition expression of this ternary expression. 415191Swollman * 425191Swollman * @return the condition expression 435191Swollman */ 445191Swollman ExpressionTree getCondition(); 455191Swollman 465191Swollman /** 4724204Sbde * Returns the true part of this ternary expression. 485191Swollman * 495191Swollman * @return the 'true' part expression 505191Swollman */ 515191Swollman ExpressionTree getTrueExpression(); 525191Swollman 535191Swollman /** 5432350Seivind * Returns the false part of this ternary expression. 555191Swollman * 565191Swollman * @return the 'false' part expression 575191Swollman */ 585191Swollman ExpressionTree getFalseExpression(); 595191Swollman} 605191Swollman