public class HashSlotMap extends Object implements SlotMap
SlotMap.SlotComputer<S extends Slot>| Modifier | Constructor and Description |
|---|---|
|
HashSlotMap() |
protected |
HashSlotMap(int capacity) |
|
HashSlotMap(SlotMap oldMap) |
|
HashSlotMap(SlotMap oldMap,
Slot newSlot) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(SlotMapOwner owner,
Slot newSlot)
Insert a new slot to the map.
|
<S extends Slot> |
compute(SlotMapOwner owner,
Object key,
int index,
SlotMap.SlotComputer<S> c)
Replace the value of key with the slot computed by the "compute" method.
|
boolean |
isEmpty()
Return whether the map is empty.
|
Iterator<Slot> |
iterator() |
Slot |
modify(SlotMapOwner owner,
Object key,
int index,
int attributes)
Return the Slot that matches EITHER "key" or "index".
|
Slot |
query(Object key,
int index)
Retrieve the slot at EITHER key or index, or return null if the slot cannot be found.
|
int |
size()
Return the size of the map.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdirtySize, readLock, unlockReadforEach, spliteratorpublic HashSlotMap()
protected HashSlotMap(int capacity)
public HashSlotMap(SlotMap oldMap)
public int size()
SlotMappublic boolean isEmpty()
SlotMappublic Slot query(Object key, int index)
SlotMappublic Slot modify(SlotMapOwner owner, Object key, int index, int attributes)
SlotMapmodify in interface SlotMapkey - The key for the slot, which should be a String or a Symbol.index - if key is zero, then this will be used as the key instead.attributes - the attributes to be set on the slot if a new slot is created. Existing
slots will not be modified.public <S extends Slot> S compute(SlotMapOwner owner, Object key, int index, SlotMap.SlotComputer<S> c)
SlotMappublic void add(SlotMapOwner owner, Slot newSlot)
SlotMapCopyright © 2025 HtmlUnit. All rights reserved.