|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jmlspecs.models.JMLInteger
A reflection of Integer that implements JMLType.
Integer,
JMLLong,
JMLShort,
JMLByte,
JMLChar,
JMLType| Field Summary | |
private int |
intValue
The integer value of this object. |
static JMLInteger |
ONE
The JMLInteger that represents one. |
static JMLInteger |
ZERO
The JMLInteger that represents zero. |
| Constructor Summary | |
JMLInteger()
Initialize this object to 0. |
|
JMLInteger(int inInt)
Initialize this object to the given int. |
|
JMLInteger(Integer inInteger)
Initialize this object to the given Integer's value. |
|
JMLInteger(String s)
Initialize this object to the given integer. |
|
| Method Summary | |
Object |
clone()
Return a clone of this object. |
int |
compareTo(Object op2)
Compare this to op2, returning a comparison code. |
JMLInteger |
dividedBy(JMLInteger i2)
Return a new object containing the quotient of this object's integer value divided by that of the given argument. |
boolean |
equals(Object op2)
Test whether this object's value is equal to the given argument. |
Integer |
getInteger()
Return an Integer object containing the integer value in this object. |
boolean |
greaterThan(JMLInteger i2)
Tell whether this object's integer value is strictly greater than that of the given argument. |
boolean |
greaterThanOrEqualTo(JMLInteger i2)
Tell whether this object's integer value is greater than or equal to that of the given argument. |
int |
hashCode()
Return a hash code for this object. |
int |
intValue()
Return the integer value in this object. |
boolean |
lessThan(JMLInteger i2)
Tell whether this object's integer value is strictly less than that of the given argument. |
boolean |
lessThanOrEqualTo(JMLInteger i2)
Tell whether this object's integer value is less than or equal to that of the given argument. |
JMLInteger |
minus(JMLInteger i2)
Return a new object containing the difference between this object's integer value and that of the given argument. |
JMLInteger |
negated()
Return a new object containing the negation of this object's integer value. |
JMLInteger |
plus(JMLInteger i2)
Return a new object containing the sum of this object's integer value and that of the given argument. |
JMLInteger |
remainderBy(JMLInteger i2)
Return a new object containing the remainder of this object's integer value divided by that of the given argument. |
JMLInteger |
times(JMLInteger i2)
Return a new object containing the product of this object's integer value and that of the given argument. |
String |
toString()
Return a string representation of this object. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
private int intValue
public static final JMLInteger ZERO
public static final JMLInteger ONE
| Constructor Detail |
public JMLInteger()
public JMLInteger(int inInt)
public JMLInteger(Integer inInteger)
inInteger - an object containing the value to use.
public JMLInteger(String s)
throws JMLTypeException
s - a string that contains the decimal representation of
the desired value.
JMLTypeException| Method Detail |
public Object clone()
clone in interface JMLTypeclone in class Object
public int compareTo(Object op2)
throws ClassCastException
compareTo in interface JMLComparableop2 - the object this is compared to.
ClassCastException - when o is not a JMLInteger.public boolean equals(Object op2)
equals in interface JMLTypeequals in class Objectpublic int hashCode()
hashCode in interface JMLTypehashCode in class Objectpublic int intValue()
public Integer getInteger()
public JMLInteger negated()
public JMLInteger plus(JMLInteger i2)
public JMLInteger minus(JMLInteger i2)
public JMLInteger times(JMLInteger i2)
public JMLInteger dividedBy(JMLInteger i2)
public JMLInteger remainderBy(JMLInteger i2)
public boolean greaterThan(JMLInteger i2)
public boolean lessThan(JMLInteger i2)
public boolean greaterThanOrEqualTo(JMLInteger i2)
public boolean lessThanOrEqualTo(JMLInteger i2)
public String toString()
toString in class Object
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||