JML

org.jmlspecs.jmlrac.qexpr
Class QInterval.Bound

java.lang.Object
  extended byorg.jmlspecs.jmlrac.qexpr.QInterval.Bound
Enclosing class:
QInterval

private static class QInterval.Bound
extends Object

A class for representing tuples of JExpression objects and int values. The tuple objects represent lower or upper bounds of quantified intervals. The quantified variable is assumed to be positioned on the right-hand side; for example, a bound expression 10 > x is represented by a tuple (10,>) and an expression x > 10 is represented by a tuple (10,<).


Field Summary
 JExpression expr
          bound expression, e.g, 10 in x > 10
 int oper
          bound operator, e.g, > in x > 10
 CType type
          The target type, e.g, x's type in x > 10
 
Constructor Summary
private QInterval.Bound(int oper, JExpression expr, CType type)
          Constructs a Bound object
 
Method Summary
static QInterval.Bound fromLeftExpression(int oper, JExpression expr, CType type)
          Returns a bound built from a bound expression with the bound value, expr, on the left-hand side, e.g., in 10 > x.
static QInterval.Bound fromRightExpression(int oper, JExpression expr, CType type)
          Returns a bound built from a bound expression with the bound value, expr, on the right-hand side, e.g., in x > 10.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

expr

public JExpression expr
bound expression, e.g, 10 in x > 10


oper

public int oper
bound operator, e.g, > in x > 10


type

public CType type
The target type, e.g, x's type in x > 10

Constructor Detail

QInterval.Bound

private QInterval.Bound(int oper,
                        JExpression expr,
                        CType type)
Constructs a Bound object

Method Detail

fromLeftExpression

public static QInterval.Bound fromLeftExpression(int oper,
                                                 JExpression expr,
                                                 CType type)
Returns a bound built from a bound expression with the bound value, expr, on the left-hand side, e.g., in 10 > x.

  requires expr != null;
 


fromRightExpression

public static QInterval.Bound fromRightExpression(int oper,
                                                  JExpression expr,
                                                  CType type)
Returns a bound built from a bound expression with the bound value, expr, on the right-hand side, e.g., in x > 10.

  requires expr != null;
 


JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.