public final class OCamlOption<T extends OCamlValue> extends OCamlValue
OCamlOption class is the wrapper class for OCaml values of
type 'a option.WRAPPER| Modifier and Type | Method and Description |
|---|---|
static <T extends OCamlValue> |
create()
Constructs a new
'a option value, and wraps it. |
static <T extends OCamlValue> |
create(T v)
Constructs a new
'a option value, and wraps it. |
boolean |
equals(java.lang.Object obj) |
T |
get()
Returns the wrapped value.
|
Wrapper<? extends OCamlOption<T>> |
getWrapper()
Returns the wrapper used to wrap
Value elements into
instances of the current class. |
Wrapper<? extends OCamlValue> |
getWrapper(int idx)
Returns the wrapper used to wrap
Value elements into
instances of the embedded type at given index. |
int |
hashCode() |
java.lang.String |
toString() |
static <T extends OCamlValue> |
wrap(Wrapper<T> w,
org.ocamljava.runtime.values.Value v)
Wraps the passed value.
|
static <T extends OCamlValue> |
wrapper(Wrapper<T> w)
Returns a wrapper for
OCamlOption values. |
value, wrap, wrapperpublic Wrapper<? extends OCamlOption<T>> getWrapper()
Value elements into
instances of the current class.getWrapper in class OCamlValueValue elements into
instances of the current classpublic Wrapper<? extends OCamlValue> getWrapper(int idx)
Value elements into
instances of the embedded type at given index.getWrapper in class OCamlValueidx - index of embedded typeValue elements into
instances of the embedded type at given index.public int hashCode()
hashCode in class OCamlValuepublic boolean equals(java.lang.Object obj)
equals in class OCamlValuepublic java.lang.String toString()
toString in class OCamlValuepublic static <T extends OCamlValue> OCamlOption<T> create(T v)
'a option value, and wraps it.v - value to wrapOCamlOption instance wrapping the passed value
as Some vpublic static <T extends OCamlValue> OCamlOption<T> create()
'a option value, and wraps it.OCamlOption instance wrapping the passed value
as Nonepublic static <T extends OCamlValue> OCamlOption<T> wrap(Wrapper<T> w, org.ocamljava.runtime.values.Value v)
w - wrapper for nested value - should not be nullv - value to wrap - should not be nullOCamlOption instance wrapping the passed valuepublic static <T extends OCamlValue> Wrapper<? extends OCamlOption<T>> wrapper(Wrapper<T> w)
OCamlOption values.w - wrapper for nested value - should not be nullOCamlOption values