public class AttribList
extends Object
Modifier and Type | Field and Description |
---|---|
private LinkedList |
list
The list is stored as a linked list.
|
Constructor and Description |
---|
AttribList() |
Modifier and Type | Method and Description |
---|---|
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
|
private LinkedList list
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()