au.gov.tas.dpiwe.mr.util
Class NullableFloat
java.lang.Object
java.lang.Number
au.gov.tas.dpiwe.mr.util.MrNumber
au.gov.tas.dpiwe.mr.util.NullableNumber
au.gov.tas.dpiwe.mr.util.NullableFloat
- All Implemented Interfaces:
- TypedNumber, Serializable, Cloneable, Comparable
public class NullableFloat
- extends NullableNumber
- implements Comparable
This is an emulation of Float which can simulate a null reference.
It can be used to indicate a search for null values in a
find[All]WhereFieldEqual() and find[All]InOrder()
method.
- Since:
- Ms Architecture 1.3
- Version:
- 1.0.0.6
- Author:
- Kade Hansson, au.gov.tas.dpiwe.mr.tool.NullableMaker
- See Also:
- Serialized Form
| Methods inherited from class au.gov.tas.dpiwe.mr.util.MrNumber |
clone, divide, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getType, getUnit, multiply, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setType, setUnit |
| Methods inherited from interface au.gov.tas.dpiwe.mr.util.TypedNumber |
clone, divide, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getType, getUnit, multiply, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setType, setUnit |
NullableFloat
public NullableFloat(Float nullable)
- Construct a new NullableFloat.
- Parameters:
nullable - a Float instance or null.
NullableFloat
public NullableFloat(float notnullable)
- Construct a new NullableFloat.
- Parameters:
notnullable - a float value.
getNumber
public Number getNumber()
- The Float underlying this
NullableFloat.
- Specified by:
getNumber in class MrNumber
- Returns:
- a Float instance or null.
isNull
public boolean isNull()
- Returns true if this NullableFloat represents the null value.
- Returns:
- true if this NullableFloat represents the null value, false otherwise.
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object object1)
- Overrides:
equals in class Object
toString
public String toString()
- Overrides:
toString in class Object
- Returns:
- "null" if this object represents a null, otherwise
a string representation of the underlying Float.
isNaN
public boolean isNaN()
throws RuntimeException
- Throws:
RuntimeException
isInfinite
public boolean isInfinite()
throws RuntimeException
- Throws:
RuntimeException
byteValue
public byte byteValue()
throws RuntimeException
- Overrides:
byteValue in class Number
- Throws:
RuntimeException
shortValue
public short shortValue()
throws RuntimeException
- Overrides:
shortValue in class Number
- Throws:
RuntimeException
intValue
public int intValue()
throws RuntimeException
- Specified by:
intValue in class Number
- Throws:
RuntimeException
longValue
public long longValue()
throws RuntimeException
- Specified by:
longValue in class Number
- Throws:
RuntimeException
floatValue
public float floatValue()
throws RuntimeException
- Specified by:
floatValue in class Number
- Throws:
RuntimeException
doubleValue
public double doubleValue()
throws RuntimeException
- Specified by:
doubleValue in class Number
- Throws:
RuntimeException