module JavaFloat: sig .. end
Support for float
type and Float
class.
Instance creation
val min_value : java_float
The smallest value for float values.
val max_value : java_float
The largest value for float values.
val nan : java_float
The not-a-number constant.
val negative_infinity : java_float
The constant for the negative infinity.
val positive_infinity : java_float
The constant for the positive infinity.
val make : java_float -> t
Operations
val byte_value : t -> java_byte
Returns the wrapped value, as a byte.
val double_value : t -> java_double
Returns the wrapped value, as a double.
val float_value : t -> java_float
Returns the wrapped value, as a float.
val int_value : t -> java_int
Returns the wrapped value, as an int.
val long_value : t -> java_long
Returns the wrapped value, as a long.
val short_value : t -> java_short
Returns the wrapped value, as a short.
val compare : java_float -> java_float -> java_int
Compares the passed values.
val compare_to : t -> t -> java_int
Compares the passed values.
val value_of : java_float -> t
Converts the passed bare float into a float wrapper; see
valueOf(...).
val parse_float : JavaString.t -> java_float
Converts the passed string into a float wrapper; see
parseFloat(...).
Raises Java_exception
if the string is invalid
val value_of_string : JavaString.t -> t
Converts the passed string into a float wrapper; see
valueOf(...).
Raises Java_exception
if the string is invalid
Null value
val null : t
The null
value.
val is_null : t -> bool
is_null obj
returns true
iff obj
is equal to null
.
val is_not_null : t -> bool
is_not_null obj
returns false
iff obj
is equal to null
.
Miscellaneous
val wrap : t -> t option
wrap obj
wraps the reference
obj
into an option type:
Some x
if obj
is not null
;
None
if obj
is null
.
val unwrap : t option -> t
unwrap obj
unwraps the option
obj
into a bare reference:
Some x
is mapped to x
;
None
is mapped to null
.