|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.dyade.aaa.agent.ServersHT
public class ServersHT
This class implements a ServerDesc hashtable, which uses sid as keys.
Constructor Summary | |
---|---|
ServersHT()
Constructs a new, empty hashtable with the default initial capacity and load factor. |
Method Summary | |
---|---|
void |
clear()
Clears this hashtable so that it contains no descriptors. |
java.util.Enumeration |
elements()
Returns an enumeration of the server descriptors in this hashtable. |
ServerDesc |
get(short sid)
Returns the descriptor of the corresponding server. |
java.util.Enumeration |
keys()
Returns an enumeration of the keys (server id.) in this hashtable. |
ServerDesc |
put(ServerDesc desc)
Maps the specified desc in this hashtable. |
protected void |
rehash()
Increases the capacity of and internally reorganizes this hashtable, in order to accommodate and access its entries more efficiently. |
ServerDesc |
remove(short sid)
Removes the descriptor from this hashtable. |
int |
size()
Returns the number of entries in this hashtable. |
java.lang.String |
toString()
Returns a string representation of this Hashtable object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ServersHT()
Method Detail |
---|
public int size()
public java.util.Enumeration keys()
Enumeration
public java.util.Enumeration elements()
Enumeration
public ServerDesc get(short sid)
sid
- The server unique identification.
protected void rehash()
public ServerDesc put(ServerDesc desc)
desc
in this hashtable.
The descriptor can be retrieved by calling the get
method with a key that is equal to the server id.
desc
- the descriptor.
null
if it did not have one.
java.lang.NullPointerException
- if the descriptor is null
.public ServerDesc remove(short sid)
sid
- the id of server that needs to be removed.
null
if
it is not defined.public void clear()
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 |