java.io.Serializable, java.lang.CloneableOtpErlangFloatpublic class OtpErlangDouble extends OtpErlangObject
OtpErlangFloat are used to provide representations corresponding to
the Java types Double and Float.OtpErlangObject.HashhashCodeValue| Constructor | Description |
|---|---|
OtpErlangDouble(double d) |
Create an Erlang float from the given double value.
|
OtpErlangDouble(OtpInputStream buf) |
Create an Erlang float from a stream containing a double encoded in
Erlang external format.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected int |
doHashCode() |
|
double |
doubleValue() |
Get the value, as a double.
|
void |
encode(OtpOutputStream buf) |
Convert this double to the equivalent Erlang external representation.
|
boolean |
equals(java.lang.Object o) |
Determine if two floats are equal.
|
float |
floatValue() |
Get the value, as a float.
|
java.lang.String |
toString() |
Get the string representation of this double.
|
public OtpErlangDouble(double d)
public OtpErlangDouble(OtpInputStream buf) throws OtpErlangDecodeException
buf - the stream containing the encoded value.OtpErlangDecodeException - if the buffer does not contain a valid external
representation of an Erlang float.public double doubleValue()
public float floatValue()
throws OtpErlangRangeException
OtpErlangRangeException - if the value cannot be represented as a float.public java.lang.String toString()
toString in class OtpErlangObjectpublic void encode(OtpOutputStream buf)
encode in class OtpErlangObjectbuf - an output stream to which the encoded value should be written.public boolean equals(java.lang.Object o)
equals in class OtpErlangObjecto - the float to compare to.protected int doHashCode()
doHashCode in class OtpErlangObject