Class ModelList

  • All Implemented Interfaces:
    Serializable

    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:
    Serialized Form
    • 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.
        Overrides:
        size in class NodeList<StateNode>
        Returns:
        the number of items
      • get

        public StateNode get​(int index)
        Description copied from class: NodeList
        Gets the item at the given index.
        Overrides:
        get in class NodeList<StateNode>
        Parameters:
        index - the of the desired item
        Returns:
        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.
        Overrides:
        add in class NodeList<StateNode>
        Parameters:
        item - the item to add
      • 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 class StateNodeNodeList
        Parameters:
        index - index to insert at
        item - 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 class StateNodeNodeList
        Parameters:
        index - index of the item to remove
        Returns:
        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 class StateNodeNodeList
      • 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 class StateNodeNodeList
        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 tested
        Returns:
        true if this list contains the specified node
      • indexOf

        public int indexOf​(StateNode item)
        Description copied from class: NodeList
        Gets the position of a value in the list.
        Overrides:
        indexOf in class NodeList<StateNode>
        Parameters:
        item - the value to look for
        Returns:
        the position in the list or -1 if not found