au.gov.tas.dpiwe.mr.util
Class NullableFloat

java.lang.Object
  extended by java.lang.Number
      extended by au.gov.tas.dpiwe.mr.util.MrNumber
          extended by au.gov.tas.dpiwe.mr.util.NullableNumber
              extended by 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

Constructor Summary
NullableFloat(float notnullable)
          Construct a new NullableFloat.
NullableFloat(Float nullable)
          Construct a new NullableFloat.
 
Method Summary
 byte byteValue()
           
 double doubleValue()
           
 boolean equals(Object object1)
           
 float floatValue()
           
 Number getNumber()
          The Float underlying this NullableFloat.
 int hashCode()
           
 int intValue()
           
 boolean isInfinite()
           
 boolean isNaN()
           
 boolean isNull()
          Returns true if this NullableFloat represents the null value.
 long longValue()
           
 short shortValue()
           
 String toString()
           
 
Methods inherited from class au.gov.tas.dpiwe.mr.util.NullableNumber
compareTo
 
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 class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 
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
 

Constructor Detail

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.
Method Detail

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