|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.swath.Info
com.swath.Identity
com.swath.Trader
This class represents a trader in TW.
| Method Summary | |
int |
alignment()
Gets the trader's alignment. |
java.lang.Object |
clone()
|
int |
corp()
Deprecated. Use the corporation() method instead. |
Corporation |
corporation()
Gets the trader's corporation. |
int |
credits()
Gets the amount of credits that the trader has. |
void |
display()
Displays this trader in the terminal window. |
void |
dump()
Dumps the trader info in the terminal window. |
boolean |
equals(java.lang.Object obj)
Compares this trader to another one. |
int |
experience()
Gets the trader's experience points. |
int |
id()
Gets the internal trader identification number in SWATH. |
boolean |
isDockedAtPort()
Indicates if the trader is docked at the port or not. |
boolean |
isOnline()
Indicates if the trader is online or not. |
boolean |
isRealPlayer()
Indicates if this is a real player or a computer controlled trader. |
boolean |
isYou()
Indicates if this is you or not. |
java.util.Date |
lastUpdate()
Gets the timestamp when the trader information was last updated. |
java.lang.String |
name()
Gets the name of the trader. |
Planet |
onPlanet()
If the trader has landed on a planet, this method will return it. |
int |
rank()
Gets the current rank of the trader. |
int |
relation()
Gets the current relation between you and this trader. |
int |
sector()
Gets the sector number where the trader is currently located. |
Ship |
ship()
Gets the trader's current ship. |
java.lang.String |
toString()
|
int |
turns()
Gets the number of turns that the trader has left. |
| Methods inherited from class com.swath.Identity |
getCorporation, getTrader, isCorporation, isTrader, isUnknown, isYourCorporation |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public java.lang.String toString()
public boolean equals(java.lang.Object obj)
equals in class Identityobj - The other trader.
true if they are equal, otherwise false.isYou(),
isRealPlayer()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class Identityjava.lang.CloneNotSupportedExceptionpublic int id()
Swath.ID_YOU,
Swath.ID_NOBODY,
Swath.ID_UNKNOWN,
Swath.ID_FEDERAL,
Swath.ID_FERRENGI,
Swath.ID_ALIENpublic boolean isYou()
isYou in class Identitytrue if this is you, otherwise false.isRealPlayer(),
equals(Object)public boolean isRealPlayer()
isRealPlayer in class Identitytrue if this is a real player, otherwise false.isYou(),
equals(Object)
public java.lang.String name()
throws java.lang.Exception
java.lang.Exception
public int sector()
throws java.lang.Exception
java.lang.Exception
public java.util.Date lastUpdate()
throws java.lang.Exception
null if never updated.
java.lang.Exception
public int corp()
throws java.lang.Exception
corporation() method instead.
java.lang.Exceptioncorporation()
public Corporation corporation()
throws java.lang.Exception
null if the trader
is not in a corporation.
java.lang.Exception
public int experience()
throws java.lang.Exception
java.lang.Exception
public int alignment()
throws java.lang.Exception
java.lang.Exception
public int credits()
throws java.lang.Exception
java.lang.Exception
public int turns()
throws java.lang.Exception
java.lang.Exception
public int rank()
throws java.lang.Exception
java.lang.Exception
public int relation()
throws java.lang.Exception
java.lang.ExceptionSwath.WITH_YOU,
Swath.ALLIED,
Swath.NEUTRAL,
Swath.ENEMY
public Ship ship()
throws java.lang.Exception
null if not known.
java.lang.ExceptionShip
public boolean isOnline()
throws java.lang.Exception
true if the trader is online,
otherwise false.
java.lang.Exception
public boolean isDockedAtPort()
throws java.lang.Exception
true if the trader is docked,
otherwise false.
java.lang.Exception
public Planet onPlanet()
throws java.lang.Exception
null if not landed or unknown.
java.lang.Exception
public void display()
throws java.lang.Exception
java.lang.Exceptiondump()
public void dump()
throws java.lang.Exception
java.lang.Exceptiondisplay()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||