public final class DoubleConstant extends Constant
Modifier and Type | Field and Description |
---|---|
private static double |
EPSILON
Very small value for testing double values.
|
private double |
value |
Modifier | Constructor and Description |
---|---|
private |
DoubleConstant(double value) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o)
This method determines the relative ordering of the current constant
with the constant specified, based upon the natural ordering of the
constant types within the constant pool.
|
(package private) static DoubleConstant |
create(ConstantPool pool,
double value) |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
protected void |
writeContent(java.io.DataOutput out)
This method must be implemented by a subclass to provide the
appropriate behavior when writing the binary representation of
this constant to an output stream.
|
getCpIndex, getWidth, setCpIndex, toString, write
private static final double EPSILON
private double value
static DoubleConstant create(ConstantPool pool, double value)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int compareTo(java.lang.Object o)
Constant
compareTo
in interface java.lang.Comparable
compareTo
in class Constant
o
- A Constant
object with which to compare this
Constant
for purposes of sorting.protected void writeContent(java.io.DataOutput out) throws java.io.IOException
Constant
writeContent
in class Constant
out
- Output stream to which to write the portion of the binary
representation of this constant which is specific to the
subclass.java.io.IOException
- if any error writing to stream.