|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectAttribList
public class AttribList
Maintains a list of key/value pairs. Can be easily iterated over or searched by key.
| Field Summary | |
|---|---|
private LinkedList |
list
The list is stored as a linked list. |
| Constructor Summary | |
|---|---|
AttribList()
|
|
| Method Summary | |
|---|---|
void |
clear()
Remove all key/value pairs from the list |
String |
get(String key)
Retrieves the value associated with the given key, or null if not present. |
boolean |
isEmpty()
Check if the list is empty |
Iterator |
iterator()
Get an iterator on the list |
void |
put(String key,
String value)
Add a key/value pair to the list. |
int |
size()
Return the number of key/value pairs in the list |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private LinkedList list
| Constructor Detail |
|---|
public AttribList()
| Method Detail |
|---|
public void put(String key,
String value)
key - Key identifiervalue - Value to associate with that keypublic String get(String key)
public Iterator iterator()
public void clear()
public boolean isEmpty()
public int size()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||