rails.game
Interface PublicCertificateI

All Superinterfaces:
Certificate, Moveable
All Known Implementing Classes:
PublicCertificate

public interface PublicCertificateI
extends Certificate, Moveable


Field Summary
 
Fields inherited from interface rails.game.move.Moveable
AT_END
 
Method Summary
 PublicCertificateI copy()
          Clone this certificate
 boolean equals(PublicCertificateI cert)
          Compare certificates
 float getCertificateCount()
           
 PublicCompanyI getCompany()
           
 int getIndexInCompany()
           
 int getShare()
          Get the percentage of ownership that this certificate represents.
 int getShares()
          Get the number of shares that this certificate represents.
 java.lang.String getTypeId()
           
 java.lang.String getUniqueId()
          Set the certificate's unique ID
 boolean isInitiallyAvailable()
           
 boolean isPresidentShare()
           
 void setCertificateCount(float certificateCount)
           
 void setCompany(PublicCompanyI companyI)
           
 void setInitiallyAvailable(boolean initiallyAvailable)
          Get the current price of this certificate.
 void setPortfolio(Portfolio portfolio)
           
 void setPresident(boolean b)
           
 void setUniqueId(java.lang.String name, int index)
          Set the certificate's unique ID, for use in deserializing
 
Methods inherited from interface rails.game.Certificate
getName, getPortfolio
 
Methods inherited from interface rails.game.move.Moveable
getHolder, moveTo
 

Method Detail

setUniqueId

void setUniqueId(java.lang.String name,
                 int index)
Set the certificate's unique ID, for use in deserializing


getUniqueId

java.lang.String getUniqueId()
Set the certificate's unique ID


getIndexInCompany

int getIndexInCompany()

isPresidentShare

boolean isPresidentShare()
Returns:
if this certificate is a president's share

getShares

int getShares()
Get the number of shares that this certificate represents.

Returns:
The number of shares.

getShare

int getShare()
Get the percentage of ownership that this certificate represents. This is equal to the number of shares * the share unit.

Returns:
The share percentage.

setInitiallyAvailable

void setInitiallyAvailable(boolean initiallyAvailable)
Get the current price of this certificate.


isInitiallyAvailable

boolean isInitiallyAvailable()
Parameters:
b -

getCertificateCount

float getCertificateCount()

setCertificateCount

void setCertificateCount(float certificateCount)

setPortfolio

void setPortfolio(Portfolio portfolio)
Parameters:
portfolio -

setPresident

void setPresident(boolean b)
Parameters:
b -

getCompany

PublicCompanyI getCompany()
Returns:

setCompany

void setCompany(PublicCompanyI companyI)
Parameters:
companyI -

getTypeId

java.lang.String getTypeId()

copy

PublicCertificateI copy()
Clone this certificate


equals

boolean equals(PublicCertificateI cert)
Compare certificates

Parameters:
cert - Another publoc certificate.
Returns:
TRUE if the certificates are of the same company and represent the same number of shares.