org.apache.tools.ant.util

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

Field Summary

protected boolean
initAllDone

Constructor Summary

LazyHashtable()

Method Summary

boolean
contains(Object value)
boolean
containsKey(Object value)
boolean
containsValue(Object value)
Delegates to contains.
Enumeration
elements()
protected void
initAll()
Used to be part of init.
boolean
isEmpty()
Enumeration
keys()
int
size()

Field Details

initAllDone

protected boolean initAllDone

Constructor Details

LazyHashtable

public LazyHashtable()

Method Details

contains

public boolean contains(Object value)

containsKey

public boolean containsKey(Object value)

containsValue

public boolean containsValue(Object value)

elements

public Enumeration 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()

keys

public Enumeration keys()

size

public int size()

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