swpchat.client
Class ContactsLocations

java.lang.Object
  |
  +--swpchat.client.ContactsLocations

public class ContactsLocations
extends java.lang.Object

Stores the Locations of a contact, that is the channels, where this contact is joined.

Since:
30.1.2000
Author:
David Kensche, Dirk Hesse

Field Summary
private static java.lang.String CLS
           
private static java.util.HashMap contactsHash
           
 
Constructor Summary
ContactsLocations()
           
 
Method Summary
static void addContact(java.lang.String nick)
          Add a contact to the list.
static void addContactAndLocations(java.lang.String nick, java.util.Enumeration channels)
          Add a contact and the channels where is joined to the list.
static void addLocation(java.lang.String nick, java.lang.String channel)
          Add a location to a contact.
static java.util.Iterator getLocations(java.lang.String nick)
          Get an Iterator over the channels where a contact is joined.
static void removeContact(java.lang.String nick)
          Remove a contact from the list.
static void removeLocation(java.lang.String nick, java.lang.String channel)
          Remove a location from a contact.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

CLS

private static final java.lang.String CLS

contactsHash

private static java.util.HashMap contactsHash
Constructor Detail

ContactsLocations

public ContactsLocations()
Method Detail

addContact

public static void addContact(java.lang.String nick)
Add a contact to the list. At this moment the contact appears to be in no channel, thence you have to use addLocation to store the channels.
Parameters:
nick - String specifying the contact.

addContactAndLocations

public static void addContactAndLocations(java.lang.String nick,
                                          java.util.Enumeration channels)
Add a contact and the channels where is joined to the list.
Parameters:
nick - String specifying the contact.
channels - Enumeration containing the channels, where this contact is joined.

removeContact

public static void removeContact(java.lang.String nick)
Remove a contact from the list.
Parameters:
nick - String specifying the contact.

addLocation

public static void addLocation(java.lang.String nick,
                               java.lang.String channel)
Add a location to a contact. If someone has joined a channel you have to invoke this to store this information.
Parameters:
nick - String specifying the contact.
channel - String specifying the channel joined.

removeLocation

public static void removeLocation(java.lang.String nick,
                                  java.lang.String channel)
Remove a location from a contact. If someone has left a channel you have to invoke this to store this information.
Parameters:
nick - String specifying the contact.
channel - String specifying the channel left.

getLocations

public static java.util.Iterator getLocations(java.lang.String nick)
Get an Iterator over the channels where a contact is joined.
Parameters:
nick - String specifying the contact.