|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.hagenah.diplomacy.map.Person
public class Person
A person in a diplomacy game (a country, master, or observer)
| Field Summary | |
|---|---|
static Person |
MASTER
The master |
static Person |
OBSERVER
An observer |
static Person |
POWER
A power before the game starts |
static int |
TOSTRING_CSS
The CSS class color-? |
static int |
TOSTRING_HTML
Returns a xhtml text, e.g. → instead of -> |
static int |
TOSTRING_SHORT
Returns a short text, e.g. |
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object obj)
Compares two Countries by Name ignoring case. |
boolean |
equals(java.lang.Object obj)
Compares two Countries by Name ignoring case. |
java.lang.String |
getAbbreviation()
Returns the abbreviation of the person. |
java.awt.Color |
getColor()
Returns the color of the person. |
java.lang.String |
getName()
Returns the name of the person. |
int |
hashCode()
Returns a hashcode for this Country. |
boolean |
isMaster()
Is this the master pseudo country? |
boolean |
isObserver()
Is this the observer pseudo country? |
boolean |
isPower()
Is this the power pseudo country (a power before the game starts)? |
java.lang.String |
toString()
Returns the name of the country. |
static java.lang.String |
toString(java.util.Collection persons,
int flags)
Returns a string for a collection of persons, e.g. |
java.lang.String |
toString(int flags)
Return a text for the person (e.g. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Person MASTER
public static final Person OBSERVER
public static final Person POWER
public static final int TOSTRING_SHORT
public static final int TOSTRING_HTML
public static final int TOSTRING_CSS
| Method Detail |
|---|
public java.lang.String getName()
public java.lang.String getAbbreviation()
public java.awt.Color getColor()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparablepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isMaster()
public boolean isObserver()
public boolean isPower()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(int flags)
flags - TOSTRING_SHORT, TOSTRING_HTML, TOSTRING_CSS
public static java.lang.String toString(java.util.Collection persons,
int flags)
flags - TOSTRING_SHORT, TOSTRING_HTML, TOSTRING_CSS
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||