|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Infinite precision integers with an plus and minus infinity.
This type is intended to support reasoning like that done by Eric Hehner for the time behavior of programs. Of course, it could also be used for other purposes as well.
BigInteger| Method Summary | |
JMLInfiniteInteger |
abs()
Return the absolute value of this integer. |
JMLInfiniteInteger |
add(JMLInfiniteInteger n)
Return the sum of this integer and the argument. |
int |
compareTo(Object o)
Compare this to o, returning a comparison code. |
JMLInfiniteInteger |
divide(JMLInfiniteInteger n)
Return the quotient of this integer divided by the argument. |
double |
doubleValue()
Return this integer approximated by a double. |
boolean |
equals(Object o)
Tell whether this integer is equal to the argument. |
BigInteger |
finiteValue()
Assuming this integer is finite, return its value. |
float |
floatValue()
Return this integer approximated by a float. |
boolean |
greaterThan(JMLInfiniteInteger n)
Tell if this integer is strictly greater than the argument. |
boolean |
greaterThanOrEqualTo(JMLInfiniteInteger n)
Tell if this integer is greater than or equal to the argument. |
int |
hashCode()
Return a hash code for this integer. |
boolean |
isFinite()
Tell if this integer is finite. |
boolean |
lessThan(JMLInfiniteInteger n)
Tell if this integer is strictly less than the argument. |
boolean |
lessThanOrEqualTo(JMLInfiniteInteger n)
Tell if this integer is less than or equal to the argument. |
JMLInfiniteInteger |
max(JMLInfiniteInteger n)
Return the maximum of this integer and the argument. |
JMLInfiniteInteger |
min(JMLInfiniteInteger n)
Return the minimum of this integer and the argument. |
JMLInfiniteInteger |
mod(JMLInfiniteInteger n)
Return this integer modulo the argument. |
JMLInfiniteInteger |
multiply(JMLInfiniteInteger n)
Return the product of this integer and the argument. |
JMLInfiniteInteger |
negate()
Return the negation of this integer. |
JMLInfiniteInteger |
pow(int n)
Return this integer raised to the argument's power. |
JMLInfiniteInteger |
remainder(JMLInfiniteInteger n)
Return the remainder of this integer divided by the argument. |
int |
signum()
Does this object represent a nonnegative integer? |
JMLInfiniteInteger |
subtract(JMLInfiniteInteger n)
Return the difference between this integer and the argument. |
String |
toString()
Return the decimal representation of this integer. |
String |
toString(int radix)
Return the digits representing this integer in the given radix. |
| Methods inherited from interface org.jmlspecs.models.JMLType |
clone |
| Method Detail |
public int signum()
public boolean isFinite()
public BigInteger finiteValue()
throws ArithmeticException
ArithmeticException
public int compareTo(Object o)
throws ClassCastException
compareTo in interface JMLComparableo - the object this is compared to.
ClassCastException - when o is not
a JMLInfiniteInteger or a BigInteger.equals(Object),
greaterThanOrEqualTo(org.jmlspecs.models.JMLInfiniteInteger),
greaterThan(org.jmlspecs.models.JMLInfiniteInteger),
lessThanOrEqualTo(org.jmlspecs.models.JMLInfiniteInteger),
lessThan(org.jmlspecs.models.JMLInfiniteInteger)public boolean equals(Object o)
equals in interface JMLTypecompareTo(Object),
greaterThanOrEqualTo(org.jmlspecs.models.JMLInfiniteInteger),
greaterThan(org.jmlspecs.models.JMLInfiniteInteger),
lessThanOrEqualTo(org.jmlspecs.models.JMLInfiniteInteger),
lessThan(org.jmlspecs.models.JMLInfiniteInteger)public boolean greaterThanOrEqualTo(JMLInfiniteInteger n)
equals(Object),
compareTo(Object),
greaterThan(org.jmlspecs.models.JMLInfiniteInteger),
lessThanOrEqualTo(org.jmlspecs.models.JMLInfiniteInteger),
lessThan(org.jmlspecs.models.JMLInfiniteInteger)public boolean lessThanOrEqualTo(JMLInfiniteInteger n)
equals(Object),
compareTo(Object),
greaterThanOrEqualTo(org.jmlspecs.models.JMLInfiniteInteger),
greaterThan(org.jmlspecs.models.JMLInfiniteInteger),
lessThan(org.jmlspecs.models.JMLInfiniteInteger)public boolean greaterThan(JMLInfiniteInteger n)
equals(Object),
compareTo(Object),
greaterThanOrEqualTo(org.jmlspecs.models.JMLInfiniteInteger),
lessThanOrEqualTo(org.jmlspecs.models.JMLInfiniteInteger),
lessThan(org.jmlspecs.models.JMLInfiniteInteger)public boolean lessThan(JMLInfiniteInteger n)
equals(Object),
compareTo(Object),
greaterThanOrEqualTo(org.jmlspecs.models.JMLInfiniteInteger),
greaterThan(org.jmlspecs.models.JMLInfiniteInteger),
lessThanOrEqualTo(org.jmlspecs.models.JMLInfiniteInteger)public int hashCode()
hashCode in interface JMLTypepublic JMLInfiniteInteger abs()
negate()public JMLInfiniteInteger max(JMLInfiniteInteger n)
min(org.jmlspecs.models.JMLInfiniteInteger)public JMLInfiniteInteger min(JMLInfiniteInteger n)
max(org.jmlspecs.models.JMLInfiniteInteger)public JMLInfiniteInteger negate()
abs(),
subtract(org.jmlspecs.models.JMLInfiniteInteger)public JMLInfiniteInteger add(JMLInfiniteInteger n)
subtract(org.jmlspecs.models.JMLInfiniteInteger)public JMLInfiniteInteger subtract(JMLInfiniteInteger n)
add(org.jmlspecs.models.JMLInfiniteInteger),
negate()public JMLInfiniteInteger multiply(JMLInfiniteInteger n)
divide(org.jmlspecs.models.JMLInfiniteInteger),
remainder(org.jmlspecs.models.JMLInfiniteInteger),
mod(org.jmlspecs.models.JMLInfiniteInteger)
public JMLInfiniteInteger divide(JMLInfiniteInteger n)
throws ArithmeticException
ArithmeticExceptionmultiply(org.jmlspecs.models.JMLInfiniteInteger),
remainder(org.jmlspecs.models.JMLInfiniteInteger),
mod(org.jmlspecs.models.JMLInfiniteInteger)
public JMLInfiniteInteger remainder(JMLInfiniteInteger n)
throws ArithmeticException
ArithmeticExceptiondivide(org.jmlspecs.models.JMLInfiniteInteger),
mod(org.jmlspecs.models.JMLInfiniteInteger)
public JMLInfiniteInteger mod(JMLInfiniteInteger n)
throws ArithmeticException
ArithmeticExceptiondivide(org.jmlspecs.models.JMLInfiniteInteger),
remainder(org.jmlspecs.models.JMLInfiniteInteger)
public JMLInfiniteInteger pow(int n)
throws ArithmeticException
ArithmeticExceptionpublic double doubleValue()
floatValue()public float floatValue()
doubleValue()public String toString()
toString(int)public String toString(int radix)
toString()
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||