Package org.apache.tools.ant.util
Class LazyHashtable<K,V>
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<K,V>
org.apache.tools.ant.util.LazyHashtable<K,V>
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<K,
V>
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
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated.Check if the table contains a particular value.boolean
containsKey
(Object value) Deprecated.Check if the table contains a particular key.boolean
containsValue
(Object value) Deprecated.Delegates tocontains
.elements()
Deprecated.Get a enumeration over the elements.protected void
initAll()
Deprecated.Used to be part of init.boolean
isEmpty()
Deprecated.Check if the table is empty.keys()
Deprecated.Get an enumeration over the keys.int
size()
Deprecated.Get the size of the table.Methods inherited from class java.util.Hashtable
clear, clone, compute, computeIfAbsent, computeIfPresent, entrySet, equals, forEach, get, getOrDefault, hashCode, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, toString, values
-
Field Details
-
initAllDone
protected boolean initAllDoneDeprecated.
-
-
Constructor Details
-
LazyHashtable
public LazyHashtable()Deprecated.No arg constructor.
-
-
Method Details
-
initAll
protected void initAll()Deprecated.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. -
elements
-
isEmpty
-
size
-
contains
-
containsKey
Deprecated.Check if the table contains a particular key.- Specified by:
containsKey
in interfaceMap<K,
V> - Overrides:
containsKey
in classHashtable<K,
V> - Parameters:
value
- the key to look for.- Returns:
- true if the table contains key.
-
containsValue
Deprecated.Delegates tocontains
.- Specified by:
containsValue
in interfaceMap<K,
V> - Overrides:
containsValue
in classHashtable<K,
V> - Parameters:
value
- the value to look for.- Returns:
- true if the table contains the value.
-
keys
-