01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //
09: //
10:
11: package de.uka.ilkd.key.java.expression.operator;
12:
13: import de.uka.ilkd.key.java.Expression;
14: import de.uka.ilkd.key.java.PrettyPrinter;
15: import de.uka.ilkd.key.java.visitor.Visitor;
16: import de.uka.ilkd.key.util.ExtList;
17:
18: /**
19: * Less than.
20: */
21:
22: public class LessThan extends ComparativeOperator {
23:
24: /**
25: * Less than.
26: * @param children an ExtList with all children of this node
27: * the first children in list will be the one on the left
28: * side, the second the one on the right side.
29: */
30: public LessThan(ExtList children) {
31: super (children);
32: }
33:
34: /**
35: * Less than.
36: * @param lhs the expression that is checked to be less than rhs
37: * @param rhs the expression that is checked to be greater than lhs
38: */
39: public LessThan(Expression lhs, Expression rhs) {
40: super (lhs, rhs);
41: }
42:
43: /**
44: * Get precedence.
45: * @return the int value.
46: */
47:
48: public int getPrecedence() {
49: return 5;
50: }
51:
52: /** calls the corresponding method of a visitor in order to
53: * perform some action/transformation on this element
54: * @param v the Visitor
55: */
56: public void visit(Visitor v) {
57: v.performActionOnLessThan(this );
58: }
59:
60: public void prettyPrint(PrettyPrinter p) throws java.io.IOException {
61: p.printLessThan(this);
62: }
63: }
|