de.hagenah.diplomacy.game
Class PersonInfo

java.lang.Object
  extended by de.hagenah.diplomacy.game.PersonInfo
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class PersonInfo
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

Information of a person in a game

See Also:
Serialized Form

Constructor Summary
PersonInfo(Person person, Phase firstphase, java.lang.String name, java.lang.String email)
          Creates a new PersonInfo.
 
Method Summary
 int compareTo(java.lang.Object obj)
          Compares two PersonInfos by Person and FirstPhase (Note: This is not consistent with equals)
 java.lang.String getEmail()
          Returns the e-mail address
 Phase getFirstPhase()
          Returns the first phase of the game where this person entered orders
 java.lang.String getName()
          Returns the name of the person
 Person getPerson()
          Return sthe person
 java.lang.String toString()
          Returns a string e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PersonInfo

public PersonInfo(Person person,
                  Phase firstphase,
                  java.lang.String name,
                  java.lang.String email)
Creates a new PersonInfo.

Parameters:
person - The person
firstphase - The first phase of the game where this person entered orders
name - The name of the person
email - The e-mail address
Method Detail

getPerson

public Person getPerson()
Return sthe person


getFirstPhase

public Phase getFirstPhase()
Returns the first phase of the game where this person entered orders


getName

public java.lang.String getName()
Returns the name of the person


getEmail

public java.lang.String getEmail()
Returns the e-mail address


compareTo

public int compareTo(java.lang.Object obj)
Compares two PersonInfos by Person and FirstPhase (Note: This is not consistent with equals)

Specified by:
compareTo in interface java.lang.Comparable

toString

public java.lang.String toString()
Returns a string e.g. "Peter Miller" <peter@miller.net>.

Overrides:
toString in class java.lang.Object