Package org.apache.tools.ant.util

# Class LinkedHashtable<K,V>

java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<K,V>
org.apache.tools.ant.util.LinkedHashtable<K,V>

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `Map<K,V>`

public class LinkedHashtable<K,V> extends Hashtable<K,V>
Subclass of Hashtable that wraps a LinkedHashMap to provide predictable iteration order.

This is not a general purpose class but has been written because the protected members of `Copy` prohibited later revisions from using a more predictable collection.

Methods are synchronized to keep Hashtable's contract.

Since:
  Ant 1.8.2
See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`LinkedHashtable()`
`LinkedHashtable(int initialCapacity)`
`LinkedHashtable(int initialCapacity, float loadFactor)`
`LinkedHashtable(Map<K,V> m)`

## Method Summary

Modifier and Type
Method
Description
`void`
`clear()`
`boolean`
`contains(Object value)`
`boolean`
`containsKey(Object value)`
`boolean`
`containsValue(Object value)`
`Enumeration<V>`
`elements()`
`Set<Map.Entry<K,V>>`
`entrySet()`
`boolean`
`equals(Object o)`
`V`
`get(Object k)`
`int`
`hashCode()`
`boolean`
`isEmpty()`
`Enumeration<K>`
`keys()`
`Set<K>`
`keySet()`
`V`
`put(K k, V v)`
`void`
`putAll(Map<? extends K,? extends V> m)`
`V`
`remove(Object k)`
`int`
`size()`
`String`
`toString()`
`Collection<V>`
`values()`

### Methods inherited from class java.util.Hashtable

`clone, compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, rehash, remove, replace, replace, replaceAll`

### Methods inherited from class java.lang.Object

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

## Constructor Details

### LinkedHashtable

public LinkedHashtable()

### LinkedHashtable

public LinkedHashtable(int initialCapacity)

### LinkedHashtable

public LinkedHashtable(int initialCapacity, float loadFactor)

### LinkedHashtable

public LinkedHashtable(Map<K,V> m)

## Method Details

### clear

public void clear()

Specified by:
  `clear` in interface `Map<K,V>`
Overrides:
  `clear` in class `Hashtable<K,V>`

### contains

public boolean contains(Object value)

Overrides:
  `contains` in class `Hashtable<K,V>`

### containsKey

public boolean containsKey(Object value)

Specified by:
  `containsKey` in interface `Map<K,V>`
Overrides:
  `containsKey` in class `Hashtable<K,V>`

### containsValue

public boolean containsValue(Object value)

Specified by:
  `containsValue` in interface `Map<K,V>`
Overrides:
  `containsValue` in class `Hashtable<K,V>`

### elements

public Enumeration<V> elements()

Overrides:
  `elements` in class `Hashtable<K,V>`

### entrySet

public Set<Map.Entry<K,V>> entrySet()

Specified by:
  `entrySet` in interface `Map<K,V>`
Overrides:
  `entrySet` in class `Hashtable<K,V>`

### equals

public boolean equals(Object o)

Specified by:
  `equals` in interface `Map<K,V>`
Overrides:
  `equals` in class `Hashtable<K,V>`

### get

public V get(Object k)

Specified by:
  `get` in interface `Map<K,V>`
Overrides:
  `get` in class `Hashtable<K,V>`

### hashCode

public int hashCode()

Specified by:
  `hashCode` in interface `Map<K,V>`
Overrides:
  `hashCode` in class `Hashtable<K,V>`

### isEmpty

public boolean isEmpty()

Specified by:
  `isEmpty` in interface `Map<K,V>`
Overrides:
  `isEmpty` in class `Hashtable<K,V>`

### keys

public Enumeration<K> keys()

Overrides:
  `keys` in class `Hashtable<K,V>`

### keySet

public Set<K> keySet()

Specified by:
  `keySet` in interface `Map<K,V>`
Overrides:
  `keySet` in class `Hashtable<K,V>`

### put

public V put(K k, V v)

Specified by:
  `put` in interface `Map<K,V>`
Overrides:
  `put` in class `Hashtable<K,V>`

### putAll

public void putAll(Map<? extends K,? extends V> m)

Specified by:
  `putAll` in interface `Map<K,V>`
Overrides:
  `putAll` in class `Hashtable<K,V>`

### remove

public V remove(Object k)

Specified by:
  `remove` in interface `Map<K,V>`
Overrides:
  `remove` in class `Hashtable<K,V>`

### size

public int size()

Specified by:
  `size` in interface `Map<K,V>`
Overrides:
  `size` in class `Hashtable<K,V>`

### toString

public String toString()

Overrides:
  `toString` in class `Hashtable<K,V>`

### values

public Collection<V> values()

Specified by:
  `values` in interface `Map<K,V>`
Overrides:
  `values` in class `Hashtable<K,V>`