Class ExistingElementMap


  • public class ExistingElementMap
    extends Object
    Mapping between a server side node identifier which has been requested to attach existing client side element.
    Since:
    1.0
    Author:
    Vaadin Ltd
    • Constructor Detail

      • ExistingElementMap

        public ExistingElementMap()
    • Method Detail

      • getElement

        public elemental.dom.Element getElement​(int id)
        Gets the element stored via the add(int, Element) method by the given id.
        Parameters:
        id - identifier associated with an element
        Returns:
        the element associated with the id or null if it doesn't exist
      • getId

        public Integer getId​(elemental.dom.Element element)
        Gets the id stored via the add(int, Element) method by the given element.
        Parameters:
        element - element associated with an identifier
        Returns:
        the identifier associated with the element or null if it doesn't exist
      • remove

        public void remove​(int id)
        Remove the identifier and the associated element from the mapping.
        Parameters:
        id - identifier to remove
      • add

        public void add​(int id,
                        elemental.dom.Element element)
        Adds the id and the element to the mapping.
        Parameters:
        id - identifier of the server side node
        element - element associated with the identifier