module JavaLocale: sig .. end
Utility functions for Java locales.
Instance creation
val get_available_locales : unit -> t list
Returns the list of all available locales.
val get_default : unit -> t
Returns the default locale.
val set_default : t -> unit
set_default loc changes the default locale to loc.
Raises Java_exception if loc is null
Properties
Predefined locales
val simplified_chinese : unit -> t
val traditional_chinese : unit -> t
val canada_french : unit -> t
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.