Top Description Fields Constructors Methods
org.apache.tools.ant.util

public Class LazyHashtable<K, V>

extends Hashtable<K, V>
Class Inheritance
Annotations
@Deprecated
Imports
java.util.Enumeration, .Hashtable

Deprecated

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.
Since
Ant 1.6

Field Summary

Modifier and TypeField and Description
protected boolean

Constructor Summary

AccessConstructor and Description
public
LazyHashtable()

No arg constructor.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the table contains the value.
contains
(Object
the value to look for.
value
)

Overrides java.util.Hashtable.contains.

Check if the table contains a particular value.
public boolean

Returns:

true if the table contains key.
containsKey
(Object
the key to look for.
value
)

Overrides java.util.Hashtable.containsKey.

Implements java.util.Map.containsKey.

Check if the table contains a particular key.
public boolean

Returns:

true if the table contains the value.
containsValue
(Object
the value to look for.
value
)

Overrides java.util.Hashtable.containsValue.

Implements java.util.Map.containsValue.

Delegates to contains.
public Enumeration<V>

Returns:

an enumeration.
elements
()

Overrides java.util.Hashtable.elements.

Get a enumeration over the elements.
protected void
initAll()

Used to be part of init.

public boolean

Returns:

true if it is.
isEmpty
()

Overrides java.util.Hashtable.isEmpty.

Implements java.util.Map.isEmpty.

Check if the table is empty.
public Enumeration<K>

Returns:

an enumeration.
keys
()

Overrides java.util.Hashtable.keys.

Get an enumeration over the keys.
public int

Returns:

the size.
size
()

Overrides java.util.Hashtable.size.

Implements java.util.Map.size.

Get the size of the table.
Inherited from java.util.Hashtable:
clearclonecomputecomputeIfAbsentcomputeIfPresententrySetequalsforEachgetgetOrDefaulthashCodekeySetmergeputputAllputIfAbsentrehashremoveremovereplacereplacereplaceAlltoStringvalues

Field Detail

initAllDoneback to summary
protected boolean initAllDone

Constructor Detail

LazyHashtableback to summary
public LazyHashtable()

No arg constructor.

Method Detail

containsback to summary
public boolean contains(Object value)

Overrides java.util.Hashtable.contains.

Check if the table contains a particular value.

Parameters
value:Object

the value to look for.

Returns:boolean

true if the table contains the value.

containsKeyback to summary
public boolean containsKey(Object value)

Overrides java.util.Hashtable.containsKey.

Implements java.util.Map.containsKey.

Check if the table contains a particular key.

Parameters
value:Object

the key to look for.

Returns:boolean

true if the table contains key.

containsValueback to summary
public boolean containsValue(Object value)

Overrides java.util.Hashtable.containsValue.

Implements java.util.Map.containsValue.

Delegates to contains.

Parameters
value:Object

the value to look for.

Returns:boolean

true if the table contains the value.

elementsback to summary
public Enumeration<V> elements()

Overrides java.util.Hashtable.elements.

Get a enumeration over the elements.

Returns:Enumeration<V>

an enumeration.

initAllback to summary
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.

isEmptyback to summary
public boolean isEmpty()

Overrides java.util.Hashtable.isEmpty.

Implements java.util.Map.isEmpty.

Check if the table is empty.

Returns:boolean

true if it is.

keysback to summary
public Enumeration<K> keys()

Overrides java.util.Hashtable.keys.

Get an enumeration over the keys.

Returns:Enumeration<K>

an enumeration.

sizeback to summary
public int size()

Overrides java.util.Hashtable.size.

Implements java.util.Map.size.

Get the size of the table.

Returns:int

the size.