public class CompoundOperationMap extends Object implements SlotMap, AutoCloseable
SlotMap.SlotComputer<S extends Slot>| Modifier and Type | Field and Description |
|---|---|
protected SlotMap |
map |
protected SlotMapOwner |
owner |
| Constructor and Description |
|---|
CompoundOperationMap(SlotMapOwner owner) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(SlotMapOwner owner,
Slot newSlot)
Insert a new slot to the map.
|
void |
close() |
<S extends Slot> |
compute(SlotMapOwner owner,
CompoundOperationMap compoundOp,
Object key,
int index,
SlotMap.SlotComputer<S> compute) |
<S extends Slot> |
compute(SlotMapOwner owner,
Object key,
int index,
SlotMap.SlotComputer<S> compute)
Replace the value of key with the slot computed by the "compute" method.
|
int |
dirtySize() |
boolean |
isEmpty()
Return whether the map is empty.
|
boolean |
isTouched() |
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.
|
protected void |
updateMap(boolean resetTouched) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstartCompoundOpforEach, spliteratorprotected final SlotMapOwner owner
protected SlotMap map
public CompoundOperationMap(SlotMapOwner owner)
protected void updateMap(boolean resetTouched)
public boolean isTouched()
public void add(SlotMapOwner owner, Slot newSlot)
SlotMappublic <S extends Slot> S compute(SlotMapOwner owner, Object key, int index, SlotMap.SlotComputer<S> compute)
SlotMappublic <S extends Slot> S compute(SlotMapOwner owner, CompoundOperationMap compoundOp, Object key, int index, SlotMap.SlotComputer<S> compute)
public boolean isEmpty()
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 Slot query(Object key, int index)
SlotMappublic int size()
SlotMappublic void close()
close in interface AutoCloseableCopyright © 2025 HtmlUnit. All rights reserved.