BinaryTree.java revision 3193:3b3bea483542
1152909Sanholt/*
2152909Sanholt * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
3139749Simp * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4112015Sanholt *
5145132Sanholt * This code is free software; you can redistribute it and/or modify it
6112015Sanholt * under the terms of the GNU General Public License version 2 only, as
7112015Sanholt * published by the Free Software Foundation.  Oracle designates this
8112015Sanholt * particular file as subject to the "Classpath" exception as provided
9112015Sanholt * by Oracle in the LICENSE file that accompanied this code.
10112015Sanholt *
11112015Sanholt * This code is distributed in the hope that it will be useful, but WITHOUT
12112015Sanholt * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13112015Sanholt * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14112015Sanholt * version 2 for more details (a copy is included in the LICENSE file that
15112015Sanholt * accompanied this code).
16112015Sanholt *
17112015Sanholt * You should have received a copy of the GNU General Public License version
18112015Sanholt * 2 along with this work; if not, write to the Free Software Foundation,
19112015Sanholt * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20112015Sanholt *
21112015Sanholt * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22112015Sanholt * or visit www.oracle.com if you need additional information or have any
23112015Sanholt * questions.
24112015Sanholt */
25112015Sanholt
26112015Sanholtpackage com.sun.source.tree;
27112015Sanholt
28112015Sanholt/**
29112015Sanholt * A tree node for a binary expression.
30112015Sanholt * Use {@link #getKind getKind} to determine the kind of operator.
31112015Sanholt *
32112015Sanholt * For example:
33112015Sanholt * <pre>
34152909Sanholt *   <em>leftOperand</em> <em>operator</em> <em>rightOperand</em>
35152909Sanholt * </pre>
36152909Sanholt *
37112015Sanholt * @jls sections 15.17 to 15.24
38112015Sanholt *
39112015Sanholt * @author Peter von der Ah&eacute;
40112015Sanholt * @author Jonathan Gibbons
41112015Sanholt * @since 1.6
42145132Sanholt */
43112015Sanholtpublic interface BinaryTree extends ExpressionTree {
44112015Sanholt    /**
45145132Sanholt     * Returns the left (first) operand of the expression.
46112015Sanholt     * @return the left operand
47152909Sanholt     */
48112015Sanholt    ExpressionTree getLeftOperand();
49145132Sanholt
50145132Sanholt    /**
51112015Sanholt     * Returns the right (second) operand of the expression.
52145132Sanholt     * @return the right operand
53145132Sanholt     */
54112015Sanholt    ExpressionTree getRightOperand();
55112015Sanholt}
56145132Sanholt