com.google.gdata.model.gd
Class Money

java.lang.Object
  extended by com.google.gdata.model.Element
      extended by com.google.gdata.model.gd.Money

public class Money
extends Element

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.
 
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 com.google.gdata.model.Element
addElement, addElement, addElement, clear, createElement, createElement, getAttributeCount, getAttributeIterator, getAttributeIterator, getAttributeValue, getAttributeValue, getDefaultKey, getElement, getElement, getElementCount, getElementId, getElementIterator, getElementIterator, getElementKey, getElements, getElements, getElementSet, getElementSet, getElementValue, getElementValue, getTextValue, getTextValue, hasAttribute, hasAttribute, hasElement, hasElement, hasTextValue, isLocked, removeAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeElement, removeElement, removeElement, removeElement, replaceElement, resolve, resolve, setAttributeValue, setAttributeValue, setElement, setElement, setElement, setTextValue, toString, visit
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY

public static final ElementKey<java.lang.Void,Money> KEY
The key for this element.


AMOUNT

public static final AttributeKey<java.lang.Double> AMOUNT
Amount.


CURRENCY_CODE

public static final AttributeKey<java.lang.String> CURRENCY_CODE
ISO4217 currency code.

Constructor Detail

Money

public Money()
Constructs an instance using the default key.

Method Detail

registerMetadata

public static void registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.


lock

public Money lock()
Description copied from class: Element
Locks this element. A locked element cannot have any changes made to its content or its attributes or child elements. This will also lock all attributes and child elements as well. Once this method has been called, this element can be safely published to other threads.

Overrides:
lock in class Element

getAmount

public java.lang.Double getAmount()
Returns the amount.

Returns:
amount

setAmount

public Money setAmount(java.lang.Double amount)
Sets the amount.

Parameters:
amount - amount or null to reset
Returns:
this to enable chaining setters

hasAmount

public boolean hasAmount()
Returns whether it has the amount.

Returns:
whether it has the amount

getCurrencyCode

public java.lang.String getCurrencyCode()
Returns the ISO4217 currency code.

Returns:
ISO4217 currency code

setCurrencyCode

public Money setCurrencyCode(java.lang.String currencyCode)
Sets the ISO4217 currency code.

Parameters:
currencyCode - ISO4217 currency code or null to reset
Returns:
this to enable chaining setters

hasCurrencyCode

public boolean hasCurrencyCode()
Returns whether it has the ISO4217 currency code.

Returns:
whether it has the ISO4217 currency code

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Element