module JavaBoolean: sig .. end
Utility functions for boolean type and Boolean class.
Instance creation
val false_ : t
The constant for the wrapper around the false value.
val true_ : t
The constant for the wrapper around the true value.
val make : java_boolean -> t
Operations
val boolean_value : t -> java_boolean
Returns the wrapped value.
val compare : java_boolean -> java_boolean -> java_int
Compares the passed values.
val compare_to : t -> t -> java_int
Compares the passed values.
val value_of : java_boolean -> t
Converts the passed bare boolean into a boolean wrapper;
see
valueOf(...).
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.