package edu.govschool.govchat.user;

import java.io.Serializable;

/**
 * This class represents a connected user to GovChat.
 * This class will store the entire representation of a connected user. This
 * includes any data or methods needed on this object. For example, the user's
 * nickname (or username) and favorite servers could be stored here. The class
 * implements the interface <code>Serializable</code> to allow it to be written
 * to a file.
 * @author Mr. Davis
 */
public class GCUser implements Serializable
{
    // The username of the user
    private String username;
    
    /**
     * Empty constructor.
     * Creates a <code>GCUser</code> with empty information.
     */
    public GCUser()
    {
        this("");
    }
    
    /**
     * Default constructor.
     * Creates a <code>GCUser</code> with the given username.
     * @param username the username of the <code>GCUser</code>
     */
    public GCUser(String username)
    {
        this.username = username;
    }
    
    /**
     * Gets the username of this <code>GCUser</code>.
     * @return the username of this <code>GCUser</code>
     */
    public String getUsername()
    {
        return this.username;
    }
}
@@ -41,28 +41,127 @@
 ort 
-java.io.Serializable
+edu.govschool.govchat.net.GCServerInfo;%0Aimport java.io.Serializable;%0Aimport java.util.LinkedList;%0Aimport java.util.List
 ;%0A%0A/
@@ -674,24 +674,106 @@
 g username;%0A
+    // A list of favorite servers%0A    private List%3CGCServerInfo%3E favoriteServers;%0A
     %0A    /**
@@ -1163,24 +1163,75 @@
 = username;%0A
+        this.favoriteServers = new LinkedList%3C%3E();%0A
     %7D%0A    %0A 
@@ -1385,32 +1385,32 @@
 sername()%0A    %7B%0A
-
         return t
@@ -1429,9 +1429,693 @@
 ;%0A    %7D%0A
+    %0A    /**%0A     * Gets the favorite servers of this %3Ccode%3EGCUser%3C/code%3E.%0A     * All the methods of %3Ccode%3Ejava.util.LinkedList%3C/code%3E are available to%0A     * search and mutate the list of favorite servers.%0A     * @return the list of favorite servers%0A     */%0A    public List%3CGCServerInfo%3E getFavoriteServers()%0A    %7B%0A        return this.favoriteServers;%0A    %7D%0A    %0A    /**%0A     * Add a server to the list of favorite servers.%0A     * This is a convenience method to quickly add a server to the list of%0A     * favorite servers.%0A     * @param server the server to add%0A     */%0A    public void addServerToFavorites(GCServerInfo server)%0A    %7B%0A        this.favoriteServers.add(server);%0A    %7D%0A
 %7D

Add list of favorite servers to GCUser