org.jmlspecs.samples.prelimdesign
Class MoneyComparableAC
java.lang.Object
org.jmlspecs.samples.prelimdesign.MoneyAC
org.jmlspecs.samples.prelimdesign.MoneyComparableAC
- All Implemented Interfaces:
- Cloneable, JMLType, Money, MoneyComparable, Serializable
- Direct Known Subclasses:
- USMoney
- public abstract class MoneyComparableAC
- extends MoneyAC
- implements MoneyComparable
Specifications inherited from class MoneyAC |
protected constraint_redundantly this.numCents == \old(this.numCents);
protected represents pennies <- this.numCents; |
Specifications inherited from class Object |
represents objectState <- org.jmlspecs.lang.JMLDataGroup.IT;
public represents _getClass <- \typeof(this); |
Specifications inherited from interface Money |
instance public constraint this.pennies == \old(this.pennies); |
Model fields inherited from interface org.jmlspecs.samples.prelimdesign.Money |
pennies |
Fields inherited from class org.jmlspecs.samples.prelimdesign.MoneyAC |
numCents |
MoneyComparableAC
public MoneyComparableAC()
totalCents
protected static long totalCents(Money m2)
- Specifications: pure
greaterThan
public boolean greaterThan(Money m2)
- Specified by:
greaterThan
in interface MoneyComparable
- Specifications: (class)pure
- Specifications inherited from overridden method greaterThan(Money m2) in interface MoneyComparable:
(class)pure -
public normal_behavior
requires m2 != null;
assignable \nothing;
ensures \result <==> this.pennies > m2.pennies;
greaterThanOrEqualTo
public boolean greaterThanOrEqualTo(Money m2)
- Specified by:
greaterThanOrEqualTo
in interface MoneyComparable
- Specifications: (class)pure
- Specifications inherited from overridden method greaterThanOrEqualTo(Money m2) in interface MoneyComparable:
(class)pure -
public normal_behavior
requires m2 != null;
assignable \nothing;
ensures \result <==> this.pennies >= m2.pennies;
lessThan
public boolean lessThan(Money m2)
- Specified by:
lessThan
in interface MoneyComparable
- Specifications: (class)pure
- Specifications inherited from overridden method lessThan(Money m2) in interface MoneyComparable:
(class)pure -
public normal_behavior
requires m2 != null;
assignable \nothing;
ensures \result <==> this.pennies < m2.pennies;
lessThanOrEqualTo
public boolean lessThanOrEqualTo(Money m2)
- Specified by:
lessThanOrEqualTo
in interface MoneyComparable
- Specifications: (class)pure
- Specifications inherited from overridden method lessThanOrEqualTo(Money m2) in interface MoneyComparable:
(class)pure -
public normal_behavior
requires m2 != null;
assignable \nothing;
ensures \result <==> this.pennies <= m2.pennies;
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.