Class ListSpliceEvent

    • Constructor Detail

      • ListSpliceEvent

        public ListSpliceEvent​(NodeList source,
                               int index,
                               JsArray<?> remove,
                               JsArray<?> add,
                               boolean clear)
        Creates a new list splice event.
        Parameters:
        source - the changed list
        index - the start index of the changes
        remove - the removed items, not null
        add - the added items, not null
        clear - true when this is an event triggered upon removing all the nodes of the given list, false otherwise
    • Method Detail

      • getIndex

        public int getIndex()
        Gets the start index of the changes.
        Returns:
        the start index of the changes
      • getRemove

        public JsArray<?> getRemove()
        Gets an array of removed items.
        Returns:
        array of removed items, not null
      • getAdd

        public JsArray<?> getAdd()
        Gets an array of added items.
        Returns:
        array of added items, not null
      • isClear

        public boolean isClear()
        Gets whether this event is a clear event.
        Returns:
        true if the event was triggered after a full clear, false otherwise.