public class Hashtable extends Object implements Serializable, Iterable<Hashtable.Entry>
This second one is important because JavaScript handling of the iterator is completely different from the way that Java does it. In Java an attempt to modify a collection on a HashMap or LinkedHashMap while iterating through it (except by using the "remove" method on the Iterator object itself) results in a ConcurrentModificationException. JavaScript Maps and Sets explicitly allow the collection to be modified, or even cleared completely, while iterators exist, and even lets an iterator keep on iterating on a collection that was empty when it was created..
| Modifier and Type | Class and Description |
|---|---|
static class |
Hashtable.Entry
One entry in the hash table.
|
| Constructor and Description |
|---|
Hashtable() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
Object |
delete(Object key)
Deprecated.
use deleteEntry(Object key) instead because this returns null if the entry was
not found or the value of the entry is null
|
boolean |
deleteEntry(Object key) |
Object |
get(Object key)
Deprecated.
use getEntry(Object key) instead because this returns null if the entry was not
found or the value of the entry is null
|
Hashtable.Entry |
getEntry(Object key) |
boolean |
has(Object key) |
Iterator<Hashtable.Entry> |
iterator() |
void |
put(Object key,
Object value) |
int |
size() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic int size()
@Deprecated public Object get(Object key)
public Hashtable.Entry getEntry(Object key)
public boolean has(Object key)
@Deprecated public Object delete(Object key)
public boolean deleteEntry(Object key)
public void clear()
public Iterator<Hashtable.Entry> iterator()
iterator in interface Iterable<Hashtable.Entry>Copyright © 2025 HtmlUnit. All rights reserved.