org.apache.tools.ant.util
Class LazyHashtable
Hashtable
org.apache.tools.ant.util.LazyHashtable
public class LazyHashtable
extends Hashtable
Hashtable implementation that allows delayed construction
of expensive objects
All operations that need access to the full list of objects
will call initAll() first. Get and put are cheap.
boolean | contains(Object value) - Check if the table contains a particular value.
|
boolean | containsKey(Object value) - Check if the table contains a particular key.
|
boolean | containsValue(Object value) - Delegates to
contains .
|
Enumeration | elements() - Get a enumeration over the elements.
|
protected void | initAll() - Used to be part of init.
|
boolean | isEmpty() - Check if the table is empty.
|
Enumeration | keys() - Get an enumeration over the keys.
|
int | size() - Get the size of the table.
|
initAllDone
protected boolean initAllDone
LazyHashtable
public LazyHashtable()
No arg constructor.
contains
public boolean contains(Object value)
Check if the table contains a particular value.
value
- the value to look for.
- true if the table contains the value.
containsKey
public boolean containsKey(Object value)
Check if the table contains a particular key.
value
- the key to look for.
- true if the table contains key.
containsValue
public boolean containsValue(Object value)
value
- the value to look for.
- true if the table contains the value.
elements
public Enumeration elements()
Get a enumeration over the elements.
initAll
protected void initAll()
Used to be part of init. It must be done once - but
we delay it until we do need _all_ tasks. Otherwise we
just get the tasks that we need, and avoid costly init.
isEmpty
public boolean isEmpty()
Check if the table is empty.
keys
public Enumeration keys()
Get an enumeration over the keys.
size
public int size()
Get the size of the table.