public class SNACHashMap extends HashMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
SNACHashMap(AIMSession sess,
AIMConnection conn)
Creates a new SNAC hash table with the default size.
|
SNACHashMap(AIMSession sess,
AIMConnection conn,
int size)
Creates a new SNAC hash table with the given size.
|
Modifier and Type | Method and Description |
---|---|
int |
clean(int maxAge)
Clean out SNAC's over a certain number of seconds old.
|
SNAC |
peek(int snacId)
Peek at a SNAC in the hash table.
|
SNAC |
put(SNAC snac)
Put a SNAC into the hash table.
|
SNAC |
remove(int snacId)
Remove a SNAC from the hash table.
|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
equals, hashCode, toString
public SNACHashMap(AIMSession sess, AIMConnection conn)
sess
- the oscar sessionconn
- the connectionpublic SNACHashMap(AIMSession sess, AIMConnection conn, int size)
sess
- the oscar sessionconn
- the connectionsize
- the size of this hash tablepublic SNAC put(SNAC snac)
snac
- the SNAC to put in the hash tablepublic SNAC peek(int snacId)
snacId
- the ID of the SNAC to look forpublic SNAC remove(int snacId)
snacId
- the ID of the SNAC to removepublic int clean(int maxAge)
maxAge
- the maximum age for the SNAC's, in seconds