public final class OCamlFloat extends OCamlValue implements OCamlNumber
OCamlFloat class is the wrapper class for OCaml values of
type float.| Modifier and Type | Field and Description |
|---|---|
static Wrapper<OCamlFloat> |
WRAPPER
Wrapper for
OCamlFloat values. |
| Modifier and Type | Method and Description |
|---|---|
byte |
byteValue()
Returns the wrapped value as a
byte, rounding and/or
truncating it if necessary. |
static OCamlFloat |
create(double v)
Constructs a new
float value, and wraps it. |
double |
doubleValue()
Returns the wrapped value as a
double, rounding and/or
truncating it if necessary. |
boolean |
equals(java.lang.Object obj) |
float |
floatValue()
Returns the wrapped value as a
float, rounding and/or
truncating it if necessary. |
Wrapper<? extends OCamlFloat> |
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() |
int |
intValue()
Returns the wrapped value as a
int, rounding and/or
truncating it if necessary. |
long |
longValue()
Returns the wrapped value as a
long, rounding and/or
truncating it if necessary. |
short |
shortValue()
Returns the wrapped value as a
short, rounding and/or
truncating it if necessary. |
java.lang.String |
toString() |
static OCamlFloat |
wrap(org.ocamljava.runtime.values.Value v)
Wraps the passed value.
|
static Wrapper<? extends OCamlFloat> |
wrapper()
Returns a wrapper for
OCamlFloat values. |
valuepublic static final Wrapper<OCamlFloat> WRAPPER
OCamlFloat values.public Wrapper<? extends OCamlFloat> 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 byte byteValue()
byte, rounding and/or
truncating it if necessary.byteValue in interface OCamlNumberbytepublic double doubleValue()
double, rounding and/or
truncating it if necessary.doubleValue in interface OCamlNumberdoublepublic float floatValue()
float, rounding and/or
truncating it if necessary.floatValue in interface OCamlNumberfloatpublic int intValue()
int, rounding and/or
truncating it if necessary.intValue in interface OCamlNumberintpublic long longValue()
long, rounding and/or
truncating it if necessary.longValue in interface OCamlNumberlongpublic short shortValue()
short, rounding and/or
truncating it if necessary.shortValue in interface OCamlNumbershortpublic 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 OCamlFloat create(double v)
float value, and wraps it.v - value to wrapOCamlFloat instance wrapping the passed valuepublic static OCamlFloat wrap(org.ocamljava.runtime.values.Value v)
v - value to wrap - should not be nullOCamlFloat instance wrapping the passed valuepublic static Wrapper<? extends OCamlFloat> wrapper()
OCamlFloat values.OCamlFloat values