org.jogre.common
Class User
java.lang.Object
|
+--org.jogre.common.User
- All Implemented Interfaces:
- ITransmittable
- public class User
- extends Object
- implements ITransmittable
Transmittable user data object. Contains the username and their rating
(currently not implemented yet).
- Version:
- Alpha 0.1
- Author:
- Bob Marks
Constructor Summary |
User(String inString)
Constructor which creates a User object from the flatten () method of
another User object. |
User(String username,
int rating)
Constructor which takes a username and a rating. |
Method Summary |
String |
flatten()
Flatten the User object for transmission. |
int |
getRating()
Returns the rating of this particular user (currently not implemented). |
String |
getUsername()
Return the username of this user. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
username
protected String username
- Username of User.
rating
protected int rating
- Rating of User.
User
public User(String username,
int rating)
- Constructor which takes a username and a rating.
- Parameters:
username
- rating
-
User
public User(String inString)
throws TransmissionException,
NumberFormatException
- Constructor which creates a User object from the flatten () method of
another User object.
- Parameters:
inString
- Unparsed String.- Throws:
TransmissionException
- Thrown if there is a problem in transmission.NumberFormatException
- Problem parsing an int.
getUsername
public String getUsername()
- Return the username of this user.
- Returns:
- username Username as a String.
getRating
public int getRating()
- Returns the rating of this particular user (currently not implemented).
- Returns:
- rating rating of user (int)
flatten
public String flatten()
- Flatten the User object for transmission.
- Specified by:
flatten
in interface ITransmittable
- See Also:
ITransmittable.flatten()