|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.object.value.AbstractNakedValue
org.nakedobjects.object.value.Currency
Value object representing a monetary value including a currency type. Note this is currently limited to pounds sterling.
NOTE: this class does not (and is unlikely ever to) support about listeners.
Use Money instead.
Money,
Serialized Form| Constructor Summary | |
Currency()
Deprecated. Create a Currency with zero value. |
|
Currency(Currency currency)
Deprecated. Create a Currency with the same value as the specified object. |
|
Currency(int whole,
int part)
Deprecated. Create a Currency with the specified values. |
|
Currency(java.lang.String text)
Deprecated. Create a Currency by parsing the text value. |
|
| Method Summary | |
void |
add(Currency value)
Deprecated. Add the specified Currency value to this value. |
void |
add(int whole,
int part)
Deprecated. Add the specified values to this value. |
int |
asInt()
Deprecated. Add the this value as an int. |
void |
clear()
Deprecated. Clears the value so that it is empty, i.e. |
void |
copyObject(Naked object)
Deprecated. Copies the specified object's contained data to this instance. |
void |
divideBy(double operand)
Deprecated. Divides this value by the specified amount. |
java.lang.String |
getObjectHelpText()
Deprecated. Returns a textual desctiption of the object - its contents and possible uses. |
boolean |
isEmpty()
Deprecated. Returns true if the object contains no data, eg when new |
boolean |
isGreaterThan(Currency value)
Deprecated. Returns true if this value is greater than the specified values. |
boolean |
isLessThan(Currency value)
Deprecated. Returns true if this value is less than the specified values. |
boolean |
isNegative()
Deprecated. Returns true if this value is less than zero. |
boolean |
isSameAs(Naked object)
Deprecated. Checks to see if two objects contain the same information. |
void |
multiplyBy(double operand)
Deprecated. Multiply this value by the specified amount. |
void |
parse(java.lang.String in)
Deprecated. Takes a user entry string which is parsed to set up the object. |
void |
readExternal(java.io.ObjectInput in)
Deprecated. |
void |
reset()
Deprecated. Resets a value to its default value. |
void |
restoreString(java.lang.String data)
Deprecated. Takes a storage string and uses it reinstate this value object to its previous state/ |
java.lang.String |
saveString()
Deprecated. Returns a basic string representation of this value for storage purposes. |
void |
setValue(Currency value)
Deprecated. Set this value to be the same as the specified value. |
void |
setValue(int whole,
int part)
Deprecated. Set this value to have the specified values. |
void |
subtract(Currency value)
Deprecated. Subtract the specified amount from this value. |
void |
subtract(int whole,
int part)
Deprecated. Subtract the specified amount from this value. |
Title |
title()
Deprecated. Returns a Title object describing the object. |
void |
writeExternal(java.io.ObjectOutput out)
Deprecated. |
| Methods inherited from class org.nakedobjects.object.value.AbstractNakedValue |
about, addNakedValueListener, checkCanOperate, contextualTitle, deepCopy, dumpObject, fireValueChanged, fireValueChanged, getClassName, getFullClassName, getLogger, isNull, isValid, nakedValueListeners, removeNakedValueListener, setAbout, setNull, setValidity, summary, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Currency()
public Currency(int whole,
int part)
public Currency(java.lang.String text)
public Currency(Currency currency)
| Method Detail |
public void add(int whole,
int part)
public void add(Currency value)
public int asInt()
public void clear()
NakedValueisEmpty returns true.
clear in interface NakedValuepublic void copyObject(Naked object)
copyObject in interface Nakedobject - the object to copy the data frompublic void divideBy(double operand)
public java.lang.String getObjectHelpText()
Naked
getObjectHelpText in interface NakedgetObjectHelpText in class AbstractNakedValuepublic boolean isEmpty()
Naked
isEmpty in interface Nakedpublic boolean isGreaterThan(Currency value)
public boolean isLessThan(Currency value)
public boolean isNegative()
public void multiplyBy(double operand)
public void parse(java.lang.String in)
throws ValueParseException
NakedValue
parse in interface NakedValueValueParseExceptionNakedValue.restoreString(String)
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundExceptionpublic void reset()
NakedValueclear method.
reset in interface NakedValue
public void setValue(int whole,
int part)
public void setValue(Currency value)
public void subtract(int whole,
int part)
public void subtract(Currency value)
public Title title()
Naked
title in interface Naked
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic boolean isSameAs(Naked object)
Nakedequals, which determines
if the one object is replaceable with another.
isSameAs in interface Nakedobject - the object to compare
public void restoreString(java.lang.String data)
NakedValue
restoreString in interface NakedValuedata - NakedValue.parse(String)public java.lang.String saveString()
NakedValue
saveString in interface NakedValue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||