Class Portfolio.PortfolioInfo

java.lang.Object
  |
  +--Portfolio.PortfolioInfo

class Portfolio.PortfolioInfo
extends java.lang.Object


Class used to maintain portfolio stock data parsed from applet parameters.


Field Summary
 float f_paidTotal
          total amount paid for shares
 int i_shares
          int value of shares
 java.lang.String paid
          amount paid per share
 java.lang.String shares
          number of shares
 java.lang.String ticker_display
          stock ticker symbol displated
 java.lang.String ticker_quote
          stock ticker symbol used to read quote data
 java.lang.String url
          url to goto
 
Constructor Summary
(package private) Portfolio.PortfolioInfo()
           
 
Method Summary
 boolean isValid()
          Returns flag if this object is valid.
 Portfolio.PortfolioInfo set(java.lang.String data)
          Sets object stock data to given value.
 Portfolio.PortfolioInfo set(java.lang.String[] data, int indexStart)
          Sets object data using given stock data starting from given index.
 java.lang.String toString()
          Returns string of amount paid for shares and int value for of number of shares.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

ticker_quote

public java.lang.String ticker_quote
stock ticker symbol used to read quote data

ticker_display

public java.lang.String ticker_display
stock ticker symbol displated

paid

public java.lang.String paid
amount paid per share

shares

public java.lang.String shares
number of shares

url

public java.lang.String url
url to goto

f_paidTotal

public float f_paidTotal
total amount paid for shares

i_shares

public int i_shares
int value of shares
Constructor Detail

Portfolio.PortfolioInfo

Portfolio.PortfolioInfo()
Method Detail

set

public Portfolio.PortfolioInfo set(java.lang.String data)
Sets object stock data to given value. The method used for indices. ticker may contain additional fields delimited by ';' to specify alternative display string and hot link url like "ticker_quote;ticker_display;url"
Parameters:
data - value to set stock symbol ticker to
Returns:
this

set

public Portfolio.PortfolioInfo set(java.lang.String[] data,
                                   int indexStart)
Sets object data using given stock data starting from given index. index + 0 is stock ticker symbol, index + 1 is number shares and index + 2 is amount paid per share. This method used for stocks.
Parameters:
data - array of stock data
indexStart - index into array to set data from
Returns:
this

isValid

public boolean isValid()
Returns flag if this object is valid. An object is valid if its stock ticker symbol length is greater than 0.
Returns:
true/false if object contains valid data

toString

public java.lang.String toString()
Returns string of amount paid for shares and int value for of number of shares.
Overrides:
toString in class java.lang.Object