com.swath
Class Corporation

java.lang.Object
  extended bycom.swath.Info
      extended bycom.swath.Identity
          extended bycom.swath.Corporation
All Implemented Interfaces:
java.lang.Cloneable

public final class Corporation
extends Identity

This class represents a corporation in TW.

Since:
SWATH 1.5

Method Summary
 Trader ceo()
          Gets the current ceo of the corporation.
 java.lang.Object clone()
           
 void dump()
          Dumps the corporation info in the terminal window.
 boolean equals(java.lang.Object obj)
          Compares this corporation to another one.
 int id()
          Gets the corporation identification number.
 boolean isOnline()
          Indicates if some member of this corporation is currently online.
 boolean isYourCorporation()
          Indicates if this is your corporation or not.
 java.util.Date lastUpdate()
          Gets the timestamp when the corporation information was last updated.
 java.lang.String name()
          Gets the name of the corporation.
 int rank()
          Gets the current rank of the corporation.
 int relation()
          Gets the current relation between you and this corporation.
 java.lang.String toString()
           
 
Methods inherited from class com.swath.Identity
getCorporation, getTrader, isCorporation, isRealPlayer, isTrader, isUnknown, isYou
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public java.lang.String toString()

equals

public boolean equals(java.lang.Object obj)
Compares this corporation to another one.

Specified by:
equals in class Identity
Parameters:
obj - The other corporation.
Returns:
true if they are equal, otherwise false.
Since:
SWATH 1.5
See Also:
isYourCorporation()

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Specified by:
clone in class Identity
Throws:
java.lang.CloneNotSupportedException

id

public int id()
Gets the corporation identification number.

Returns:
The corporation id.
Since:
SWATH 1.5

isYourCorporation

public boolean isYourCorporation()
Indicates if this is your corporation or not.

Overrides:
isYourCorporation in class Identity
Returns:
true if this is your corporation, otherwise false.
Since:
SWATH 1.5
See Also:
equals(Object)

lastUpdate

public java.util.Date lastUpdate()
                          throws java.lang.Exception
Gets the timestamp when the corporation information was last updated.

Returns:
The last update or null if never updated.
Throws:
java.lang.Exception
Since:
SWATH 1.5

name

public java.lang.String name()
                      throws java.lang.Exception
Gets the name of the corporation.

Returns:
The corporation name.
Throws:
java.lang.Exception
Since:
SWATH 1.5

ceo

public Trader ceo()
           throws java.lang.Exception
Gets the current ceo of the corporation.

Returns:
The corporation ceo.
Throws:
java.lang.Exception
Since:
SWATH 1.6
See Also:
Trader

rank

public int rank()
         throws java.lang.Exception
Gets the current rank of the corporation.

Returns:
The current rank or -1 if unknown.
Throws:
java.lang.Exception
Since:
SWATH 1.6

relation

public int relation()
             throws java.lang.Exception
Gets the current relation between you and this corporation.

Returns:
The relation status.
Throws:
java.lang.Exception
Since:
SWATH 1.5
See Also:
Swath.WITH_YOU, Swath.ALLIED, Swath.NEUTRAL, Swath.ENEMY

isOnline

public boolean isOnline()
                 throws java.lang.Exception
Indicates if some member of this corporation is currently online.

Returns:
true if someone is online, otherwise false.
Throws:
java.lang.Exception
Since:
SWATH 1.7

dump

public void dump()
          throws java.lang.Exception
Dumps the corporation info in the terminal window.

Throws:
java.lang.Exception
Since:
SWATH 1.5