LazyHashtable (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.util, class: LazyHashtable

# 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 public class LazyHashtable<K,V> extends Hashtable<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:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected boolean`
  `initAllDone`
  Deprecated.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LazyHashtable()`
  Deprecated.
  No arg constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `contains(Object value)`
  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 to `contains`.
  `Enumeration<V>`
  `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.
  `Enumeration<K>`
  `keys()`
  Deprecated.
  Get an enumeration over the keys.
  `int`
  `size()`
  Deprecated.
  Get the size of the table.

  ### Methods inherited from class 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`

  ### Methods inherited from class Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### initAllDone

    protected boolean initAllDone
    Deprecated.

- ## 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

    public Enumeration<V> elements()
    Deprecated.
    Get a enumeration over the elements.
    Overrides:
      `elements` in class `Hashtable<K,V>`
    Returns:
      an enumeration.

  - ### isEmpty

    public boolean isEmpty()
    Deprecated.
    Check if the table is empty.
    Specified by:
      `isEmpty` in interface `Map<K,V>`
    Overrides:
      `isEmpty` in class `Hashtable<K,V>`
    Returns:
      true if it is.

  - ### size

    public int size()
    Deprecated.
    Get the size of the table.
    Specified by:
      `size` in interface `Map<K,V>`
    Overrides:
      `size` in class `Hashtable<K,V>`
    Returns:
      the size.

  - ### contains

    public boolean contains(Object value)
    Deprecated.
    Check if the table contains a particular value.
    Overrides:
      `contains` in class `Hashtable<K,V>`
    Parameters:
      `value` - the value to look for.
    Returns:
      true if the table contains the value.

  - ### containsKey

    public boolean containsKey(Object value)
    Deprecated.
    Check if the table contains a particular key.
    Specified by:
      `containsKey` in interface `Map<K,V>`
    Overrides:
      `containsKey` in class `Hashtable<K,V>`
    Parameters:
      `value` - the key to look for.
    Returns:
      true if the table contains key.

  - ### containsValue

    public boolean containsValue(Object value)
    Deprecated.
    Delegates to `contains`.
    Specified by:
      `containsValue` in interface `Map<K,V>`
    Overrides:
      `containsValue` in class `Hashtable<K,V>`
    Parameters:
      `value` - the value to look for.
    Returns:
      true if the table contains the value.

  - ### keys

    public Enumeration<K> keys()
    Deprecated.
    Get an enumeration over the keys.
    Overrides:
      `keys` in class `Hashtable<K,V>`
    Returns:
      an enumeration.