public abstract class OCamlFunction2<T0 extends OCamlValue,T1 extends OCamlValue,TR extends OCamlValue> extends OCamlValue
OCamlFunction3
class represent an OCaml function taking two
parameter.WRAPPER
Constructor and Description |
---|
OCamlFunction2()
Constructs a new instance.
|
OCamlFunction2(Wrapper<T0> w0,
Wrapper<T1> w1,
Wrapper<TR> wr)
Constructs a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
abstract TR |
execute(T0 p0,
T1 p1)
The actual implementation of the function
|
org.ocamljava.runtime.values.Value |
getClosure(Wrapper<T0> w0,
Wrapper<T1> w1)
Returns the closure to be executed from the OCaml runtime.
|
Wrapper<? extends OCamlFunction2<T0,T1,TR>> |
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,TR extends OCamlValue> |
wrap(Wrapper<T0> w0,
Wrapper<T1> w1,
Wrapper<TR> wr,
org.ocamljava.runtime.values.Value v)
Wraps the passed value.
|
static <T0 extends OCamlValue,T1 extends OCamlValue,TR extends OCamlValue> |
wrapper(Wrapper<T0> w0,
Wrapper<T1> w1,
Wrapper<TR> wr)
Returns a wrapper for
OCamlFunction2 values. |
value, wrap, wrapper
public OCamlFunction2(Wrapper<T0> w0, Wrapper<T1> w1, Wrapper<TR> wr)
w0
- wrapper for first parameter - should not be null
w1
- wrapper for second parameter - should not be null
wr
- wrapper for result - should not be null
public OCamlFunction2()
public final Wrapper<? extends OCamlFunction2<T0,T1,TR>> 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 org.ocamljava.runtime.values.Value getClosure(Wrapper<T0> w0, Wrapper<T1> w1)
w0
- wrapper for first parameter - should not be null
w1
- wrapper for second parameter - should not be null
public abstract TR execute(T0 p0, T1 p1) throws OCamlException
p0
- first parameter - should not be null
p1
- second parameter - should not be null
OCamlException
- if function failspublic final int hashCode()
hashCode
in class OCamlValue
public final boolean equals(java.lang.Object obj)
equals
in class OCamlValue
public final java.lang.String toString()
toString
in class OCamlValue
public static <T0 extends OCamlValue,T1 extends OCamlValue,TR extends OCamlValue> OCamlFunction2<T0,T1,TR> wrap(Wrapper<T0> w0, Wrapper<T1> w1, Wrapper<TR> wr, org.ocamljava.runtime.values.Value v)
w0
- wrapper for first parameter - should not be null
w1
- wrapper for second parameter - should not be null
wr
- wrapper for result - should not be null
v
- value to wrap - should not be null
OCamlFunction2
instance wrapping the passed valuepublic static <T0 extends OCamlValue,T1 extends OCamlValue,TR extends OCamlValue> Wrapper<? extends OCamlFunction2<T0,T1,TR>> wrapper(Wrapper<T0> w0, Wrapper<T1> w1, Wrapper<TR> wr)
OCamlFunction2
values.w0
- wrapper for first parameter - should not be null
w1
- wrapper for second parameter - should not be null
wr
- wrapper for result - should not be null
OCamlFunction2
values