|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.data.AbstractExtension
com.google.gdata.data.ExtensionPoint
com.google.gdata.data.finance.PositionData
public class PositionData
Data for the position.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint |
---|
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler |
Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension |
---|
AbstractExtension.AttributesHandler |
Field Summary |
---|
Fields inherited from class com.google.gdata.data.ExtensionPoint |
---|
xmlBlob |
Fields inherited from class com.google.gdata.data.AbstractExtension |
---|
localName, namespace |
Constructor Summary | |
---|---|
PositionData()
Default mutable constructor. |
|
PositionData(java.lang.Double gainPercentage,
java.lang.Double return1w,
java.lang.Double return1y,
java.lang.Double return3m,
java.lang.Double return3y,
java.lang.Double return4w,
java.lang.Double return5y,
java.lang.Double returnOverall,
java.lang.Double returnYTD,
java.lang.Double shares)
Immutable constructor. |
Method Summary | |
---|---|
protected void |
consumeAttributes(AttributeHelper helper)
Consumes attributes from the attribute helper. |
void |
declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within the target extension profile. |
CostBasis |
getCostBasis()
Returns the cost basis of the position in the portfolio default currency (and exchange currency if it differs). |
DaysGain |
getDaysGain()
Returns the today's gain for the position in the portfolio default currency (and exchange currency if it differs). |
static ExtensionDescription |
getDefaultDescription(boolean required,
boolean repeatable)
Returns the extension description, specifying whether it is required, and whether it is repeatable. |
Gain |
getGain()
Returns the gain for the position in the portfolio default currency (and exchange currency if it differs). |
java.lang.Double |
getGainPercentage()
Returns the percentage gain. |
MarketValue |
getMarketValue()
Returns the market value of the position in the portfolio default currency (and exchange currency if it differs). |
java.lang.Double |
getReturn1w()
Returns the 1 week return (percentage). |
java.lang.Double |
getReturn1y()
Returns the 1 year return (percentage). |
java.lang.Double |
getReturn3m()
Returns the 3 month return (percentage). |
java.lang.Double |
getReturn3y()
Returns the 3 year return (percentage). |
java.lang.Double |
getReturn4w()
Returns the 4 week return (percentage). |
java.lang.Double |
getReturn5y()
Returns the 5 year return (percentage). |
java.lang.Double |
getReturnOverall()
Returns the overall return (percentage). |
java.lang.Double |
getReturnYTD()
Returns the Year-to-date return (percentage). |
java.lang.Double |
getShares()
Returns the number of shares belonging to the position. |
boolean |
hasCostBasis()
Returns whether it has the cost basis of the position in the portfolio default currency (and exchange currency if it differs). |
boolean |
hasDaysGain()
Returns whether it has the today's gain for the position in the portfolio default currency (and exchange currency if it differs). |
boolean |
hasGain()
Returns whether it has the gain for the position in the portfolio default currency (and exchange currency if it differs). |
boolean |
hasGainPercentage()
Returns whether it has the percentage gain. |
boolean |
hasMarketValue()
Returns whether it has the market value of the position in the portfolio default currency (and exchange currency if it differs). |
boolean |
hasReturn1w()
Returns whether it has the 1 week return (percentage). |
boolean |
hasReturn1y()
Returns whether it has the 1 year return (percentage). |
boolean |
hasReturn3m()
Returns whether it has the 3 month return (percentage). |
boolean |
hasReturn3y()
Returns whether it has the 3 year return (percentage). |
boolean |
hasReturn4w()
Returns whether it has the 4 week return (percentage). |
boolean |
hasReturn5y()
Returns whether it has the 5 year return (percentage). |
boolean |
hasReturnOverall()
Returns whether it has the overall return (percentage). |
boolean |
hasReturnYTD()
Returns whether it has the Year-to-date return (percentage). |
boolean |
hasShares()
Returns whether it has the number of shares belonging to the position. |
protected void |
putAttributes(AttributeGenerator generator)
Puts attributes into the attribute generator. |
void |
setCostBasis(CostBasis costBasis)
Sets the cost basis of the position in the portfolio default currency (and exchange currency if it differs). |
void |
setDaysGain(DaysGain daysGain)
Sets the today's gain for the position in the portfolio default currency (and exchange currency if it differs). |
void |
setGain(Gain gain)
Sets the gain for the position in the portfolio default currency (and exchange currency if it differs). |
void |
setGainPercentage(java.lang.Double gainPercentage)
Sets the percentage gain. |
void |
setMarketValue(MarketValue marketValue)
Sets the market value of the position in the portfolio default currency (and exchange currency if it differs). |
void |
setReturn1w(java.lang.Double return1w)
Sets the 1 week return (percentage). |
void |
setReturn1y(java.lang.Double return1y)
Sets the 1 year return (percentage). |
void |
setReturn3m(java.lang.Double return3m)
Sets the 3 month return (percentage). |
void |
setReturn3y(java.lang.Double return3y)
Sets the 3 year return (percentage). |
void |
setReturn4w(java.lang.Double return4w)
Sets the 4 week return (percentage). |
void |
setReturn5y(java.lang.Double return5y)
Sets the 5 year return (percentage). |
void |
setReturnOverall(java.lang.Double returnOverall)
Sets the overall return (percentage). |
void |
setReturnYTD(java.lang.Double returnYTD)
Sets the Year-to-date return (percentage). |
void |
setShares(java.lang.Double shares)
Sets the number of shares belonging to the position. |
java.lang.String |
toString()
|
protected void |
validate()
Checks the attributes to see if there are any problems. |
Methods inherited from class com.google.gdata.data.AbstractExtension |
---|
disableStrictValidation, enableStrictValidation, eq, generate, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PositionData()
public PositionData(java.lang.Double gainPercentage, java.lang.Double return1w, java.lang.Double return1y, java.lang.Double return3m, java.lang.Double return3y, java.lang.Double return4w, java.lang.Double return5y, java.lang.Double returnOverall, java.lang.Double returnYTD, java.lang.Double shares)
gainPercentage
- percentage gain.return1w
- 1 week return (percentage).return1y
- 1 year return (percentage).return3m
- 3 month return (percentage).return3y
- 3 year return (percentage).return4w
- 4 week return (percentage).return5y
- 5 year return (percentage).returnOverall
- overall return (percentage).returnYTD
- Year-to-date return (percentage).shares
- number of shares belonging to the position.Method Detail |
---|
public void declareExtensions(ExtensionProfile extProfile)
ExtensionPoint
declareExtensions
in class ExtensionPoint
extProfile
- the ExtensionProfile to initialize.public CostBasis getCostBasis()
public void setCostBasis(CostBasis costBasis)
costBasis
- cost basis of the position in the portfolio default
currency (and exchange currency if it differs) or null
to
resetpublic boolean hasCostBasis()
public DaysGain getDaysGain()
public void setDaysGain(DaysGain daysGain)
daysGain
- today's gain for the position in the portfolio default
currency (and exchange currency if it differs) or null
to
resetpublic boolean hasDaysGain()
public Gain getGain()
public void setGain(Gain gain)
gain
- gain for the position in the portfolio default currency (and
exchange currency if it differs) or null
to resetpublic boolean hasGain()
public java.lang.Double getGainPercentage()
public void setGainPercentage(java.lang.Double gainPercentage)
gainPercentage
- percentage gain or null
to resetpublic boolean hasGainPercentage()
public MarketValue getMarketValue()
public void setMarketValue(MarketValue marketValue)
marketValue
- market value of the position in the portfolio default
currency (and exchange currency if it differs) or null
to
resetpublic boolean hasMarketValue()
public java.lang.Double getReturn1w()
public void setReturn1w(java.lang.Double return1w)
return1w
- 1 week return (percentage) or null
to resetpublic boolean hasReturn1w()
public java.lang.Double getReturn1y()
public void setReturn1y(java.lang.Double return1y)
return1y
- 1 year return (percentage) or null
to resetpublic boolean hasReturn1y()
public java.lang.Double getReturn3m()
public void setReturn3m(java.lang.Double return3m)
return3m
- 3 month return (percentage) or null
to resetpublic boolean hasReturn3m()
public java.lang.Double getReturn3y()
public void setReturn3y(java.lang.Double return3y)
return3y
- 3 year return (percentage) or null
to resetpublic boolean hasReturn3y()
public java.lang.Double getReturn4w()
public void setReturn4w(java.lang.Double return4w)
return4w
- 4 week return (percentage) or null
to resetpublic boolean hasReturn4w()
public java.lang.Double getReturn5y()
public void setReturn5y(java.lang.Double return5y)
return5y
- 5 year return (percentage) or null
to resetpublic boolean hasReturn5y()
public java.lang.Double getReturnOverall()
public void setReturnOverall(java.lang.Double returnOverall)
returnOverall
- overall return (percentage) or null
to
resetpublic boolean hasReturnOverall()
public java.lang.Double getReturnYTD()
public void setReturnYTD(java.lang.Double returnYTD)
returnYTD
- Year-to-date return (percentage) or null
to
resetpublic boolean hasReturnYTD()
public java.lang.Double getShares()
public void setShares(java.lang.Double shares)
shares
- number of shares belonging to the position or
null
to resetpublic boolean hasShares()
protected void validate()
AbstractExtension
validate
in class AbstractExtension
public static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable)
required
- whether it is requiredrepeatable
- whether it is repeatable
protected void putAttributes(AttributeGenerator generator)
AbstractExtension
AbstractExtension.generate(XmlWriter,ExtensionProfile)
. Default implementation
does nothing, though generally this is discouraged unless there really are
no attributes.
putAttributes
in class AbstractExtension
generator
- attribute generatorprotected void consumeAttributes(AttributeHelper helper) throws ParseException
AbstractExtension
AttributeHelper.consumeContent(boolean)
to consume the element's text
content. Called from AbstractExtension.getHandler(com.google.gdata.data.ExtensionProfile, java.lang.String, java.lang.String, org.xml.sax.Attributes)
. Default implementation does
nothing, though generally this is discouraged unless there really are no
attributes.
consumeAttributes
in class AbstractExtension
helper
- attribute helper
ParseException
- any parsing exceptionpublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |