SlotMap.SlotComputer<S extends Slot>| Constructor and Description |
|---|
EmbeddedSlotMap() |
EmbeddedSlotMap(int capacity) |
| 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)
Locate the slot with given name or index, and create a new one if necessary.
|
protected void |
promoteMap(SlotMapOwner owner,
Slot newSlot) |
Slot |
query(Object key,
int index)
Locate the slot with the given name or index.
|
int |
size()
Return the size of the map.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdirtySize, readLock, unlockReadforEach, spliteratorpublic EmbeddedSlotMap()
public EmbeddedSlotMap(int capacity)
public int size()
SlotMappublic boolean isEmpty()
SlotMappublic Slot modify(SlotMapOwner owner, Object key, int index, int attributes)
modify in interface SlotMapkey - either a String or a Symbol object that identifies the propertyindex - index or 0 if slot holds property name.attributes - the attributes to be set on the slot if a new slot is created. Existing
slots will not be modified.protected void promoteMap(SlotMapOwner owner, Slot newSlot)
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.