|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jmlspecs.models.JMLFloat
A reflection of Float that implements JMLType.
Float,
JMLDouble| Field Summary | |
private float |
floatValue
The float that is the abstract value of this object. |
| Constructor Summary | |
JMLFloat()
Initialize this object to contain zero. |
|
JMLFloat(float inFloat)
Initialize this object to contain the given float. |
|
JMLFloat(int inInt)
Initialize this object to contain an approximation to the given integer. |
|
JMLFloat(Float inFloat)
Initialize this object to contain the value of the given Float. |
|
JMLFloat(String s)
Initialize this object to contain the value given by the string argument. |
|
| Method Summary | |
boolean |
approximatelyEqualTo(float f2,
float epsilon)
Tell whether relative difference of this JMLFloat and the arg is within the given epsilon. |
static boolean |
approximatelyEqualTo(float f1,
float f2,
float epsilon)
Tell whether relative difference of the two arguments is within the given epsilon. |
boolean |
approximatelyEqualTo(Float f2,
float epsilon)
Tell whether relative difference of this JMLFloat and the arg is within the given epsilon. |
boolean |
approximatelyEqualTo(JMLFloat f2,
float epsilon)
Tell whether relative difference of this JMLFloat and the arg is within the given epsilon. |
static boolean |
approximatelyEqualTo(JMLFloat f1,
float f2,
float epsilon)
Tell whether relative difference of this JMLFloat and the arg is within the given epsilon. |
static boolean |
approximatelyEqualTo(JMLFloat f1,
Float f2,
float epsilon)
Tell whether relative difference of this JMLFloat and the arg is within the given epsilon. |
static boolean |
approximatelyEqualTo(JMLFloat f1,
JMLFloat f2,
float epsilon)
Tell whether relative difference of this JMLFloat and the arg is within the given epsilon. |
Object |
clone()
Return a clone of this object. |
int |
compareTo(Object op2)
Compare this to op2, returning a comparison code. |
JMLFloat |
dividedBy(JMLFloat f2)
Return the quotient of this divided by the given argument. |
boolean |
equals(Object op2)
Tell whether this object is equal to the argument. |
float |
floatValue()
Return the float contained in this object. |
Float |
getFloat()
Return a Float containing the float contained in this object. |
boolean |
greaterThan(JMLFloat f2)
Tell whether this is strictly greater than the given argument. |
boolean |
greaterThanOrEqualTo(JMLFloat f2)
Tell whether this is greater than or equal to the given argument. |
int |
hashCode()
Return a hash code for this object. |
boolean |
isInfinite()
Tell if this object contains either positive or negative infinity. |
boolean |
isNaN()
Tell if this object contains NaN (not a number). |
boolean |
isZero()
Tell if this object contains zero (either positive or negative). |
static boolean |
isZero(float f)
Tell if the argument is zero (either positive or negative). |
boolean |
lessThan(JMLFloat f2)
Tell whether this is strictly less than the given argument. |
boolean |
lessThanOrEqualTo(JMLFloat f2)
Tell whether this is less than or equal to the given argument. |
JMLFloat |
minus(JMLFloat f2)
Return the difference between this and the given argument. |
JMLFloat |
negated()
Return the negation of this. |
JMLFloat |
plus(JMLFloat f2)
Return the sum of this and the given argument. |
JMLFloat |
remainderBy(JMLFloat f2)
Return the remainder of this divided by the given argument. |
JMLFloat |
times(JMLFloat f2)
Return the product of this and the given argument. |
String |
toString()
Return a string representation of this object. |
boolean |
withinEpsilonOf(float f2,
float epsilon)
Tell whether absolute value of difference of this JMLFloat and the arg is within the given epsilon. |
static boolean |
withinEpsilonOf(float f1,
float f2,
float epsilon)
Tell whether absolute value of difference of the two arguments is within the given epsilon. |
boolean |
withinEpsilonOf(Float f2,
float epsilon)
Tell whether absolute value of difference of this JMLFloat and the arg is within the given epsilon. |
boolean |
withinEpsilonOf(JMLFloat f2,
float epsilon)
Tell whether absolute value of difference of this JMLFloat and the arg is within the given epsilon. |
static boolean |
withinEpsilonOf(JMLFloat f1,
float f2,
float epsilon)
Tell whether absolute value of difference of this JMLFloat and the arg is within the given epsilon. |
static boolean |
withinEpsilonOf(JMLFloat f1,
Float f2,
float epsilon)
Tell whether absolute value of difference of this JMLFloat and the arg is within the given epsilon. |
static boolean |
withinEpsilonOf(JMLFloat f1,
JMLFloat f2,
float epsilon)
Tell whether absolute value of difference of this JMLFloat and the arg is within the given epsilon. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
private float floatValue
| Constructor Detail |
public JMLFloat()
public JMLFloat(float inFloat)
public JMLFloat(int inInt)
public JMLFloat(Float inFloat)
public JMLFloat(String s)
throws NumberFormatException
NumberFormatException| Method Detail |
public boolean isInfinite()
public boolean isNaN()
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 JMLFloat.public static boolean isZero(float f)
public boolean isZero()
public boolean equals(Object op2)
equals in interface JMLTypeequals in class Objectpublic int hashCode()
hashCode in interface JMLTypehashCode in class Objectpublic float floatValue()
public Float getFloat()
public JMLFloat negated()
public JMLFloat plus(JMLFloat f2)
public JMLFloat minus(JMLFloat f2)
public JMLFloat times(JMLFloat f2)
public JMLFloat dividedBy(JMLFloat f2)
public JMLFloat remainderBy(JMLFloat f2)
public boolean greaterThan(JMLFloat f2)
public boolean lessThan(JMLFloat f2)
public boolean greaterThanOrEqualTo(JMLFloat f2)
public boolean lessThanOrEqualTo(JMLFloat f2)
public String toString()
toString in class Object
public boolean withinEpsilonOf(JMLFloat f2,
float epsilon)
public boolean approximatelyEqualTo(JMLFloat f2,
float epsilon)
approximatelyEqualTo(float, float, float)
public boolean withinEpsilonOf(Float f2,
float epsilon)
public boolean approximatelyEqualTo(Float f2,
float epsilon)
approximatelyEqualTo(float, float, float)
public boolean withinEpsilonOf(float f2,
float epsilon)
public boolean approximatelyEqualTo(float f2,
float epsilon)
approximatelyEqualTo(float, float, float)
public static boolean withinEpsilonOf(float f1,
float f2,
float epsilon)
public static boolean approximatelyEqualTo(float f1,
float f2,
float epsilon)
public static boolean withinEpsilonOf(JMLFloat f1,
JMLFloat f2,
float epsilon)
public static boolean approximatelyEqualTo(JMLFloat f1,
JMLFloat f2,
float epsilon)
approximatelyEqualTo(float, float, float)
public static boolean withinEpsilonOf(JMLFloat f1,
Float f2,
float epsilon)
public static boolean approximatelyEqualTo(JMLFloat f1,
Float f2,
float epsilon)
approximatelyEqualTo(float, float, float)
public static boolean withinEpsilonOf(JMLFloat f1,
float f2,
float epsilon)
public static boolean approximatelyEqualTo(JMLFloat f1,
float f2,
float epsilon)
approximatelyEqualTo(float, float, float)
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||