Class ListListenerHelperEx.ElementarySubChange<E>

  • Type Parameters:
    E - The element type of the list.
    Enclosing class:
    ListListenerHelperEx<E>

    public static class ListListenerHelperEx.ElementarySubChange<E>
    extends java.lang.Object
    An abstract elementary change of an ObservableList
    • Constructor Detail

      • ElementarySubChange

        public ElementarySubChange​(ListListenerHelperEx.ElementarySubChange.Kind kind,
                                   int from,
                                   int to,
                                   java.util.List<? extends E> removed,
                                   java.util.List<? extends E> added,
                                   int[] permutation)
        Parameters:
        kind - The kind of change.
        from - The start index of the change.
        to - The end index of the change.
        removed - The elements that were removed.
        added - The elements that were added.
        permutation - A mapping of prior indexes to current ones.
    • Method Detail

      • getAdded

        public java.util.List<E> getAdded()
        Returns the elements that were added by this change.
        Returns:
        The added elements.
      • getFrom

        public int getFrom()
        Returns the index at which elements were added/removed/re-ordered.
        Returns:
        The start index.
      • getPermutation

        public int[] getPermutation()
        Returns a mapping of previous indexes to current ones
        Returns:
        An integer array representing a mapping of previous indexes to current indexes.
      • getRemoved

        public java.util.List<E> getRemoved()
        Returns the elements that were removed by this change.
        Returns:
        The removed elements.
      • getTo

        public int getTo()
        Returns the index up to which (excluding) elements were added/removed/re-ordered.
        Returns:
        The end index.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object