01: // @(#) $Id: JMLComparable.java 1.1.1.1 Mon, 09 May 2005 15:27:50 +0200 engelc $
02:
03: // Copyright (C) 2001 Iowa State University
04:
05: // This file is part of JML
06:
07: // JML is free software; you can redistribute it and/or modify
08: // it under the terms of the GNU General Public License as published by
09: // the Free Software Foundation; either version 2, or (at your option)
10: // any later version.
11:
12: // JML is distributed in the hope that it will be useful,
13: // but WITHOUT ANY WARRANTY; without even the implied warranty of
14: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: // GNU General Public License for more details.
16:
17: // You should have received a copy of the GNU General Public License
18: // along with JML; see the file COPYING. If not, write to
19: // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20:
21: package org.jmlspecs.models;
22:
23: /** JMLTypes with an compareTo operation, as in {@link java.lang.Comparable}.
24: *
25: * @version $Revision: 1.1.1.1 $
26: * @author Gary T. Leavens
27: * @see java.lang.Comparable
28: */
29: //-@ immutable
30: public/*@ pure @*/interface JMLComparable extends JMLType, Comparable {
31:
32: /** Compare this to o, returning a comparison code.
33: * @param o the object this is compared to.
34: * @exception ClassCastException when o doesn't have an appropriate type.
35: */
36: /*@ also
37: @ public behavior
38: @ requires o != null;
39: @ signals (ClassCastException) ;
40: @*/
41: public int compareTo(Object o) throws ClassCastException;
42:
43: }
|