Class ModelList
java.lang.Object
com.vaadin.flow.internal.nodefeature.NodeFeature
com.vaadin.flow.internal.nodefeature.NodeList<StateNode>
com.vaadin.flow.internal.nodefeature.StateNodeNodeList
com.vaadin.flow.internal.nodefeature.ModelList
- All Implemented Interfaces:
Serializable
List for model values used in data binding in templates.
For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.internal.nodefeature.NodeList
NodeList.SetView<T extends Serializable> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInserts an item at the given index of the list.voidAdds an item to the end of the list.voidaddAll(Collection<? extends StateNode> items) Adds all provided items to the end of the list.voidclear()Removes all nodes, including those not known by the server.booleanReturnstrueif this list contains the specified node.get(int index) Gets the item at the given index.intGets the position of a value in the list.remove(int index) Removes the item at the given index.intsize()Gets the number of items in this list.Methods inherited from class com.vaadin.flow.internal.nodefeature.StateNodeNodeList
forEachChild, isNodeValuesMethods inherited from class com.vaadin.flow.internal.nodefeature.NodeList
collectChanges, generateChangesFromEmpty, getChangeTracker, iterator, onDetachMethods inherited from class com.vaadin.flow.internal.nodefeature.NodeFeature
allowsChanges, attachPotentialChild, detatchPotentialChild, getNode, onAttach
-
Constructor Details
-
ModelList
Creates an instance of this node feature.- Parameters:
node- the node that the feature belongs to
-
-
Method Details
-
size
public int size()Description copied from class:NodeListGets the number of items in this list. -
get
Description copied from class:NodeListGets the item at the given index. -
add
Description copied from class:NodeListAdds an item to the end of the list. -
add
Description copied from class:NodeListInserts an item at the given index of the list.- Overrides:
addin classStateNodeNodeList- Parameters:
index- index to insert atitem- the item to insert
-
remove
Description copied from class:NodeListRemoves the item at the given index.- Overrides:
removein classStateNodeNodeList- Parameters:
index- index of the item to remove- Returns:
- the element previously at the specified position
-
clear
public void clear()Description copied from class:NodeListRemoves all nodes, including those not known by the server.- Overrides:
clearin classStateNodeNodeList
-
addAll
Description copied from class:NodeListAdds all provided items to the end of the list.- Overrides:
addAllin classStateNodeNodeList- Parameters:
items- a collection of items to add, not null
-
contains
Returnstrueif this list contains the specified node. More- Parameters:
node- node whose presence in this list is to be tested- Returns:
trueif this list contains the specified node
-
indexOf
Description copied from class:NodeListGets the position of a value in the list.
-