|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.hagenah.diplomacy.game.DiaryEntry
public class DiaryEntry
| Field Summary | |
|---|---|
static int |
TOSTRING_BODY
Returns the diary entry body |
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. |
| Constructor Summary | |
|---|---|
DiaryEntry(Person from,
int number,
java.lang.String text,
Phase phase,
int messagenumber)
Creates a new diary message. |
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object obj)
Compares two diary entries by message number. |
boolean |
equals(java.lang.Object obj)
Indicates whether obj is "equal to" this one. |
Person |
getFrom()
Returns the person that created the diary entry (can be null if unknown). |
int |
getMessageNumber()
Returns a unique message number for the diary entry |
int |
getNumber()
Return the diary entry number (-1 if unknown) |
Phase |
getPhase()
Returns she phase in which the diary entry was created |
java.lang.String |
getText()
Returns the diary entry text (\n as line separator) |
int |
hashCode()
Returns a hashcode for this message. |
boolean |
isVisible(Person person)
Is this diary entry visible to the specified person? |
java.lang.String |
toString()
Returns a short description for the diary entry |
java.lang.String |
toString(int flags)
Return a text for the diary entry (e.g. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TOSTRING_BODY
public static final int TOSTRING_SHORT
public static final int TOSTRING_HTML
public static final int TOSTRING_CSS
| Constructor Detail |
|---|
public DiaryEntry(Person from,
int number,
java.lang.String text,
Phase phase,
int messagenumber)
from - The person that created the diary entry (can be null if unknown)number - The number of the diary entry (-1 if unknown)text - The diary entry text (\n as line separator)phase - The phase in which the diary entry was createdmessagenumber - A unique message number for the diary entry| Method Detail |
|---|
public Person getFrom()
public int getNumber()
public java.lang.String getText()
public Phase getPhase()
public int getMessageNumber()
public boolean isVisible(Person person)
person - The person
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The other obj
public int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparableobj - The other obj
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString(int flags)
flags - TOSTRING_BODY, TOSTRING_SHORT, TOSTRING_HTML, TOSTRING_CSS
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||