JML

org.jmlspecs.jmldoc.jmldoc_142
Class JmlHTML.IntPair

java.lang.Object
  extended byorg.jmlspecs.jmldoc.jmldoc_142.JmlHTML.IntPair
All Implemented Interfaces:
Comparable
Enclosing class:
JmlHTML

public static class JmlHTML.IntPair
extends Object
implements Comparable

This class holds a pair of integers, used here to mark the start and (one past the) end of a section of a text string.


Field Summary
 int end
          One past the end of the marked text substring
 int offset
          The beginning of the marked text substring
 
Constructor Summary
JmlHTML.IntPair(int offset, int end)
          The constructor for the pair of integers
 
Method Summary
 int compareTo(Object p)
          The comparison function that implements the Comparable interface.
 boolean equals(Object p)
          The equality method that implements the Comparable interface.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

offset

public int offset
The beginning of the marked text substring


end

public int end
One past the end of the marked text substring

Constructor Detail

JmlHTML.IntPair

public JmlHTML.IntPair(int offset,
                       int end)
The constructor for the pair of integers

Method Detail

compareTo

public int compareTo(Object p)
The comparison function that implements the Comparable interface. Object A is less than Object B if the start position is less; if the start positions are equal, then if the end position is less.

Specified by:
compareTo in interface Comparable

equals

public boolean equals(Object p)
The equality method that implements the Comparable interface. Two objects are equal if both start and end positions are equal, repectively.

Overrides:
equals in class Object

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.