org.nakedobjects.applib.value
Class Percentage

java.lang.Object
  extended by org.nakedobjects.applib.value.Magnitude
      extended by org.nakedobjects.applib.value.Percentage
All Implemented Interfaces:
java.io.Serializable

public class Percentage
extends Magnitude

See Also:
Serialized Form

Constructor Summary
Percentage(float value)
           
 
Method Summary
 Percentage add(float value)
           
 Percentage add(Percentage value)
           
 double doubleValue()
          Returns this value as an double.
 boolean equals(java.lang.Object other)
           
 boolean equals(Percentage other)
           
 float floatValue()
          Returns this value as an float.
 int hashCode()
           
 int intValue()
          Returns this value as an int.
 boolean isEqualTo(Magnitude magnitude)
           
 boolean isLessThan(Magnitude magnitude)
           
 long longValue()
          Returns this value as an long.
 Percentage multiply(float value)
           
 short shortValue()
          Returns this value as an short.
 Percentage subtract(float value)
           
 Percentage subtract(Percentage value)
           
 java.lang.String toString()
           
 
Methods inherited from class org.nakedobjects.applib.value.Magnitude
isBetween, isGreaterThan, isGreaterThanOrEqualTo, isLessThanOrEqualTo, max, min
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Percentage

public Percentage(float value)
Method Detail

add

public Percentage add(float value)

add

public Percentage add(Percentage value)

doubleValue

public double doubleValue()
Returns this value as an double.


floatValue

public float floatValue()
Returns this value as an float.


intValue

public int intValue()
Returns this value as an int.


isEqualTo

public boolean isEqualTo(Magnitude magnitude)
Specified by:
isEqualTo in class Magnitude

isLessThan

public boolean isLessThan(Magnitude magnitude)
Specified by:
isLessThan in class Magnitude

longValue

public long longValue()
Returns this value as an long.


multiply

public Percentage multiply(float value)

shortValue

public short shortValue()
Returns this value as an short.


subtract

public Percentage subtract(float value)

subtract

public Percentage subtract(Percentage value)

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(Percentage other)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.