Constructor and Description |
---|
EmbeddedSlotMap() |
Modifier and Type | Method and Description |
---|---|
void |
add(Slot newSlot)
Insert a new slot to the map.
|
boolean |
isEmpty()
Return whether the map is empty.
|
java.util.Iterator<Slot> |
iterator() |
Slot |
modify(java.lang.Object key,
int index,
int attributes)
Locate the slot with given name or index, and create a new one if necessary.
|
Slot |
query(java.lang.Object key,
int index)
Locate the slot with the given name or index.
|
void |
remove(java.lang.Object key,
int index)
Remove the slot at either "key" or "index".
|
void |
replace(Slot oldSlot,
Slot newSlot)
Replace "slot" with a new slot.
|
int |
size()
Return the size of the map.
|
public int size()
SlotMap
public boolean isEmpty()
SlotMap
public java.util.Iterator<Slot> iterator()
iterator
in interface java.lang.Iterable<Slot>
public Slot query(java.lang.Object key, int index)
public Slot modify(java.lang.Object key, int index, int attributes)
modify
in interface SlotMap
key
- 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.public void replace(Slot oldSlot, Slot newSlot)
SlotMap
public void add(Slot newSlot)
SlotMap
public void remove(java.lang.Object key, int index)
SlotMap