public final class OCamlTuple2<T0 extends OCamlValue,T1 extends OCamlValue> extends OCamlValue
OCamlOption
class is the wrapper class for OCaml values of
type 'a * 'b
.WRAPPER
Modifier and Type | Method and Description |
---|---|
static <T0 extends OCamlValue,T1 extends OCamlValue> |
create(T0 v0,
T1 v1)
Constructs a new
'a * 'b value, and wraps it. |
boolean |
equals(java.lang.Object obj) |
T0 |
get0()
Returns the first element of the wrapped value.
|
T1 |
get1()
Returns the second element of the wrapped value.
|
Wrapper<? extends OCamlTuple2<T0,T1>> |
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 <T0 extends OCamlValue,T1 extends OCamlValue> |
wrap(Wrapper<T0> w0,
Wrapper<T1> w1,
org.ocamljava.runtime.values.Value v)
Wraps the passed value.
|
static <T0 extends OCamlValue,T1 extends OCamlValue> |
wrapper(Wrapper<T0> w0,
Wrapper<T1> w1)
Returns a wrapper for
OCamlOption values. |
value, wrap, wrapper
public Wrapper<? extends OCamlTuple2<T0,T1>> getWrapper()
Value
elements into
instances of the current class.getWrapper
in class OCamlValue
Value
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 OCamlValue
idx
- index of embedded typeValue
elements into
instances of the embedded type at given index.public T0 get0()
public T1 get1()
public int hashCode()
hashCode
in class OCamlValue
public boolean equals(java.lang.Object obj)
equals
in class OCamlValue
public java.lang.String toString()
toString
in class OCamlValue
public static <T0 extends OCamlValue,T1 extends OCamlValue> OCamlTuple2<T0,T1> create(T0 v0, T1 v1)
'a * 'b
value, and wraps it.v0
- first element of value to wrap - should not be null
v1
- second element of value to wrap - should not be null
OCamlTuple2
instance wrapping the passed valuespublic static <T0 extends OCamlValue,T1 extends OCamlValue> OCamlTuple2<T0,T1> wrap(Wrapper<T0> w0, Wrapper<T1> w1, org.ocamljava.runtime.values.Value v)
w0
- wrapper for nested value - should not be null
w1
- wrapper for nested value - should not be null
v
- value to wrap - should not be null
OCamlTuple2
instance wrapping the passed valuepublic static <T0 extends OCamlValue,T1 extends OCamlValue> Wrapper<? extends OCamlTuple2<T0,T1>> wrapper(Wrapper<T0> w0, Wrapper<T1> w1)
OCamlOption
values.w0
- wrapper for nested value - should not be null
w1
- wrapper for nested value - should not be null
OCamlOption
values