|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.camelspotting.jotl.domain.Company
public class Company
This class represents a company currently in the game.
Constructor Summary | |
---|---|
Company(int currentId,
String companyName,
int inaugerated,
long companyValue,
long balance,
long income,
int performance,
boolean pwProtected,
Map<Vehicle,Integer> vehicleCountMap,
Map<Station,Integer> stationCountMap)
The constructor for companies. |
Method Summary | |
---|---|
int |
compareTo(Company o)
This method makes the companies comparable based on their rating. |
boolean |
equals(Object o)
This method returns true if two companies have the same currentID. |
long |
getBalance()
Method for getting the company's current balance. |
String |
getCompanyName()
Method for getting the company's name |
long |
getCompanyValue()
Method for getting the company's current value. |
int |
getCurrentId()
Method for getting the current ID of a company |
String |
getFormattedBalance()
Method for getting the company's current balance in a format suitable for display. |
String |
getFormattedCompanyValue()
Method for getting the company's current value in a format suitable for display. |
String |
getFormattedIncome()
Method for getting the company's current income in a format suitable for display. |
int |
getInaugerationYear()
Method for getting the company's inaugeration year. |
long |
getIncome()
Method for getting the company's current income. |
Map<Station,Integer> |
getNumberOfStations()
Method for accessing how many stations a company has. |
Map<Vehicle,Integer> |
getNumberOfVehicles()
Method for accessing how many vehicles a company has. |
int |
getRating()
Method for getting the company's current rating. |
int |
hashCode()
|
boolean |
isPasswordProtected()
Method for finding out whether or not the company is password protected. |
String |
toString()
Convenience method for printing out relevant information for display. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Company(int currentId, String companyName, int inaugerated, long companyValue, long balance, long income, int performance, boolean pwProtected, Map<Vehicle,Integer> vehicleCountMap, Map<Station,Integer> stationCountMap)
currentId
- in-game idcompanyName
- the company nameinaugerated
- the year the company was foundedcompanyValue
- a company's worthbalance
- current balanceincome
- company's incomerating
- company's ratingpwProtected
- whether or not the company has been password protectedMethod Detail |
---|
public Map<Vehicle,Integer> getNumberOfVehicles()
ServerInfo#vehicles
array to find out what
number is what kind of vehicle.
ServerInfo#vehicles
public Map<Station,Integer> getNumberOfStations()
ServerInfo#stations
array to find out what
number is what kind of stations.
ServerInfo#stations
public int getCurrentId()
public String getCompanyName()
public int getInaugerationYear()
public long getCompanyValue()
public String getFormattedCompanyValue()
public long getBalance()
public String getFormattedBalance()
public long getIncome()
public String getFormattedIncome()
public int getRating()
public boolean isPasswordProtected()
public String toString()
toString
in class Object
String
representation of the objectpublic int compareTo(Company o)
compareTo
in interface Comparable<Company>
o
- the Company
to compare to
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |