com.vaadin.flow.internal.nodefeature.
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:
public class ModelList extends StateNodeNodeList
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 Constructor and Description ModelList(StateNode node)
Creates an instance of this node feature.
-
Method Summary
All Methods Modifier and Type Method and Description void
add(int index, StateNode item)
Inserts an item at the given index of the list.
void
add(StateNode item)
Adds an item to the end of the list.
void
addAll(Collection<? extends StateNode> items)
Adds all provided items to the end of the list.
void
clear()
Removes all nodes, including those not known by the server.
boolean
contains(StateNode node)
Returns true if this list contains the specified node.
StateNode
get(int index)
Gets the item at the given index.
int
indexOf(StateNode item)
Gets the position of a value in the list.
StateNode
remove(int index)
Removes the item at the given index.
int
size()
Gets the number of items in this list.
-
Methods inherited from class com.vaadin.flow.internal.nodefeature.StateNodeNodeList
forEachChild, isNodeValues
-
Methods inherited from class com.vaadin.flow.internal.nodefeature.NodeList
collectChanges, generateChangesFromEmpty, getChangeTracker, iterator, onDetach
-
Methods inherited from class com.vaadin.flow.internal.nodefeature.NodeFeature
allowsChanges, attachPotentialChild, detatchPotentialChild, getNode, onAttach
-
-
-
-
Constructor Detail
-
ModelList
public ModelList(StateNode node)
Creates an instance of this node feature.
Parameters:
node
- the node that the feature belongs to
-
-
Method Detail
-
size
public int size()
Description copied from class:
NodeList
Gets the number of items in this list.
-
get
public StateNode get(int index)
Description copied from class:
NodeList
Gets the item at the given index.
-
add
public void add(StateNode item)
Description copied from class:
NodeList
Adds an item to the end of the list.
-
add
public void add(int index, StateNode item)
Description copied from class:
NodeList
Inserts an item at the given index of the list.
Overrides:
add
in classStateNodeNodeList
Parameters:
index
- index to insert atitem
- the item to insert
-
remove
public StateNode remove(int index)
Description copied from class:
NodeList
Removes the item at the given index.
Overrides:
remove
in classStateNodeNodeList
Parameters:
index
- index of the item to removeReturns:
the element previously at the specified position
-
clear
public void clear()
Description copied from class:
NodeList
Removes all nodes, including those not known by the server.
Overrides:
clear
in classStateNodeNodeList
-
addAll
public void addAll(Collection<? extends StateNode> items)
Description copied from class:
NodeList
Adds all provided items to the end of the list.
Overrides:
addAll
in classStateNodeNodeList
Parameters:
items
- a collection of items to add, not null
-
contains
public boolean contains(StateNode node)
Returns true if this list contains the specified node. More
Parameters:
node
- node whose presence in this list is to be testedReturns:
true if this list contains the specified node
-
-