org.apache.tools.ant.util
Class LazyHashtable

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--org.apache.tools.ant.util.LazyHashtable
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class LazyHashtable
extends java.util.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.

Since:
Ant 1.6
See Also:
Serialized Form

Field Summary
protected  boolean initAllDone
           
 
Constructor Summary
LazyHashtable()
           
 
Method Summary
 boolean contains(java.lang.Object value)
           
 boolean containsKey(java.lang.Object value)
           
 boolean containsValue(java.lang.Object value)
          Delegates to contains.
 java.util.Enumeration elements()
           
protected  void initAll()
          Used to be part of init.
 boolean isEmpty()
           
 java.util.Enumeration keys()
           
 int size()
           
 
Methods inherited from class java.util.Hashtable
clear, clone, entrySet, equals, get, hashCode, keySet, put, putAll, rehash, remove, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

initAllDone

protected boolean initAllDone
Constructor Detail

LazyHashtable

public LazyHashtable()
Method Detail

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.


elements

public java.util.Enumeration elements()
Overrides:
elements in class java.util.Hashtable

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map
Overrides:
isEmpty in class java.util.Hashtable

size

public int size()
Specified by:
size in interface java.util.Map
Overrides:
size in class java.util.Hashtable

contains

public boolean contains(java.lang.Object value)
Overrides:
contains in class java.util.Hashtable

containsKey

public boolean containsKey(java.lang.Object value)
Specified by:
containsKey in interface java.util.Map
Overrides:
containsKey in class java.util.Hashtable

containsValue

public boolean containsValue(java.lang.Object value)
Delegates to contains.

Specified by:
containsValue in interface java.util.Map
Overrides:
containsValue in class java.util.Hashtable

keys

public java.util.Enumeration keys()
Overrides:
keys in class java.util.Hashtable


Copyright © 2000-2004 Apache Software Foundation. All Rights Reserved.