ComparableExt<Field>public class FloatField extends SimpleField
| Constructor | Description |
|---|---|
FloatField() |
Creates a new FloatField with zero value.
|
FloatField(double value) |
Creates a new FloatField with given value.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
compareTo(SimpleField arg0) |
Compares two float fields.
|
void |
copy(Field field) |
It makes a copy of class variables.
|
Field |
duplicate() |
Makes a new instance of a field.
|
boolean |
equals(java.lang.Object arg0) |
Checks equivalence of two objects
|
double |
get() |
Reads a value stored as float (double in fact).
|
int |
hashCode() |
Provides hashcode of a given
FloatField value. |
void |
set(double value) |
Stores a new float in this class.
|
java.lang.String |
toString() |
Returns a
String which represents value of this field. |
static FloatField |
valueOf(double value) |
Gets a float field wrapping given value.
|
isGenerated, setGeneratedcompareTo, isSimilarTo, isUnknown, setUnknownpublic FloatField()
public FloatField(double value)
value - new double valueset(double)public static FloatField valueOf(double value)
value - new float field's valuepublic void copy(Field field)
value and unknown.copy in class Fieldfield - any object which is an instance of FloatFieldInvalidTypeException - when the field is not FloatFieldjava.lang.NullPointerException - if given field is nullpublic double get()
UnknownValueException - if the value is unknownpublic void set(double value)
isUnknown() is KNOWN).
In this method any double value is accepted.value - new value to be setpublic Field duplicate()
Fieldpublic int compareTo(SimpleField arg0)
arg0 - arg0 object to be compared with this float fieldjava.lang.ClassCastException - if given object is not FloatFieldjava.lang.NullPointerException - when given object is nullUnknownValueException - when field's value is unknownpublic boolean equals(java.lang.Object arg0)
equals in class java.lang.Objectarg0 - object to be compared with this float fieldjava.lang.NullPointerException - when given object is nullpublic int hashCode()
FloatField value.hashCode in class java.lang.ObjectFloatField valuepublic java.lang.String toString()
String which represents value of this field.
If the value is known, it behaves as Double.toString().
Takes into account Settings.precision value.toString in class java.lang.ObjectDouble.toString()