T - the type of the items in the node listpublic class ListAddChange<T extends Serializable> extends AbstractListChange<T>
list node feature.| Constructor and Description |
|---|
ListAddChange(NodeList<T> list,
boolean nodeValues,
int index,
List<? extends T> newItems)
Creates a new list add change.
|
| Modifier and Type | Method and Description |
|---|---|
ListAddChange<T> |
copy(int indx)
Gets a copy of the change with the same data except
index. |
ListAddChange<T> |
copy(List<? extends T> items)
Gets a copy of the change with the same data except a list of new
items. |
List<T> |
getNewItems()
Gets the added items.
|
boolean |
isEmpty()
Returns whether this add operation still contains any new items.
|
protected void |
populateJson(elemental.json.JsonObject json,
ConstantPool constantPool)
Overridden by subclasses to populate a JSON object when serializing.
|
getIndex, getNodeListgetFeaturegetNode, toJsonpublic ListAddChange(NodeList<T> list, boolean nodeValues, int index, List<? extends T> newItems)
list - the changed listnodeValues - true if the values are StateNodes, false otherwiseindex - the index of the add operationsnewItems - a list of new itemspublic boolean isEmpty()
true if no new items, false if still
has new itemspublic ListAddChange<T> copy(List<? extends T> items)
items.items - new list of itemspublic ListAddChange<T> copy(int indx)
AbstractListChangeindex.copy in class AbstractListChange<T extends Serializable>indx - the new index of the changeprotected void populateJson(elemental.json.JsonObject json,
ConstantPool constantPool)
NodeChangepopulateJson in class NodeFeatureChangejson - the json object to populateconstantPool - the constant pool to use for serializing constant pool
referencesCopyright © 2021. All rights reserved.