com.vaadin.flow.internal.change.
Class AbstractListChange<T extends Serializable>
Type Parameters:
T
- the type of the items in the node list
All Implemented Interfaces:
Direct Known Subclasses:
Change describing an operation (add/remove) in a list
node
feature.
For internal use only. May be renamed or removed in a future release.
Since:
1.0
Author:
Vaadin Ltd
See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractListChange
(NodeList<T> list, int index) Creates a new list change.
-
Method Summary
Modifier and TypeMethodDescriptionabstract AbstractListChange<T>
copy
(int index) Gets a copy of the change with the same data except
index
.int
getIndex()
Gets the index of the change.
Gets a changed list.
void
setIndex
(int index) Sets the index of this change in the change list.
Methods inherited from class com.vaadin.flow.internal.change.NodeFeatureChange
getFeature, populateJson
Methods inherited from class com.vaadin.flow.internal.change.NodeChange
getNode, toJson
-
Constructor Details
-
AbstractListChange
Creates a new list change.
Parameters:
list
- the changed listindex
- the index of the add operations
-
-
Method Details
-
getIndex
public int getIndex()Gets the index of the change.
Returns:
the index
-
getNodeList
Gets a changed list.
Returns:
the changed list
-
copy
Gets a copy of the change with the same data except
index
.Parameters:
index
- the new index of the changeReturns:
a copy of the change based on new index
-
setIndex
public void setIndex(int index) Sets the index of this change in the change list.
Note: This should be used only when list of changes is being re-indexed after adding a new change.
Parameters:
index
- Integer value.
-