|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.model.Element
com.google.gdata.model.gd.Money
public class Money
Describes money.
Field Summary | |
---|---|
static AttributeKey<java.lang.Double> |
AMOUNT
Amount. |
static AttributeKey<java.lang.String> |
CURRENCY_CODE
ISO4217 currency code. |
static ElementKey<java.lang.Void,Money> |
KEY
The key for this element. |
Constructor Summary | |
---|---|
|
Money()
Constructs an instance using the default key. |
protected |
Money(ElementKey<?,? extends Money> key)
Subclass constructor, allows subclasses to supply their own element key. |
protected |
Money(ElementKey<?,? extends Money> key,
Element source)
Constructs a new instance by doing a shallow copy of data from an existing Element instance. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.Double |
getAmount()
Returns the amount. |
java.lang.String |
getCurrencyCode()
Returns the ISO4217 currency code. |
boolean |
hasAmount()
Returns whether it has the amount. |
boolean |
hasCurrencyCode()
Returns whether it has the ISO4217 currency code. |
int |
hashCode()
|
Money |
lock()
Locks this element. |
static void |
registerMetadata(MetadataRegistry registry)
Registers the metadata for this element. |
Money |
setAmount(java.lang.Double amount)
Sets the amount. |
Money |
setCurrencyCode(java.lang.String currencyCode)
Sets the ISO4217 currency code. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ElementKey<java.lang.Void,Money> KEY
public static final AttributeKey<java.lang.Double> AMOUNT
public static final AttributeKey<java.lang.String> CURRENCY_CODE
Constructor Detail |
---|
public Money()
protected Money(ElementKey<?,? extends Money> key)
protected Money(ElementKey<?,? extends Money> key, Element source)
Element
instance. Will use the given ElementKey
as the key
for the element. This constructor is used when adapting from one element
key to another. You cannot call this constructor directly, instead use
Element.createElement(ElementKey, Element)
.
key
- The key to use for this element.source
- source elementMethod Detail |
---|
public static void registerMetadata(MetadataRegistry registry)
public Money lock()
Element
lock
in class Element
public java.lang.Double getAmount()
public Money setAmount(java.lang.Double amount)
amount
- amount or null
to reset
public boolean hasAmount()
public java.lang.String getCurrencyCode()
public Money setCurrencyCode(java.lang.String currencyCode)
currencyCode
- ISO4217 currency code or null
to reset
public boolean hasCurrencyCode()
public boolean equals(java.lang.Object obj)
equals
in class Element
public int hashCode()
hashCode
in class Element
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |