E
- The element type of the list.public static class ListListenerHelperEx.ElementarySubChange<E>
extends java.lang.Object
ObservableList
Modifier and Type | Class and Description |
---|---|
static class |
ListListenerHelperEx.ElementarySubChange.Kind
The kind of change that is performed to the
ObservableList . |
Constructor and Description |
---|
ElementarySubChange(ListListenerHelperEx.ElementarySubChange.Kind kind,
int from,
int to,
java.util.List<? extends E> removed,
java.util.List<? extends E> added,
int[] permutation)
Creates a new
ListListenerHelperEx.ElementarySubChange
. |
Modifier and Type | Method and Description |
---|---|
static <E> ListListenerHelperEx.ElementarySubChange<E> |
added(java.util.List<? extends E> added,
int from,
int to)
Creates a new
ListListenerHelperEx.ElementarySubChange
representing an addition. |
java.util.List<E> |
getAdded()
Returns the elements that were added by this change.
|
int |
getFrom()
Returns the index at which elements were added/removed/re-ordered.
|
ListListenerHelperEx.ElementarySubChange.Kind |
getKind()
Returns the kind of change.
|
int[] |
getPermutation()
Returns a mapping of previous indexes to current ones
|
java.util.List<E> |
getRemoved()
Returns the elements that were removed by this change.
|
int |
getTo()
Returns the index up to which (excluding) elements were
added/removed/re-ordered.
|
static <E> ListListenerHelperEx.ElementarySubChange<E> |
permutated(int[] permutation,
int from,
int to)
Creates a new
ListListenerHelperEx.ElementarySubChange
representing a permutation. |
static <E> ListListenerHelperEx.ElementarySubChange<E> |
removed(java.util.List<? extends E> removed,
int from,
int to)
Creates a new
ListListenerHelperEx.ElementarySubChange
representing a removal. |
static <E> ListListenerHelperEx.ElementarySubChange<E> |
replaced(java.util.List<? extends E> removed,
java.util.List<? extends E> added,
int from,
int to)
Creates a new
ListListenerHelperEx.ElementarySubChange
representing a replacement. |
java.lang.String |
toString() |
public ElementarySubChange(ListListenerHelperEx.ElementarySubChange.Kind kind, int from, int to, java.util.List<? extends E> removed, java.util.List<? extends E> added, int[] permutation)
ListListenerHelperEx.ElementarySubChange
.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.public static <E> ListListenerHelperEx.ElementarySubChange<E> added(java.util.List<? extends E> added, int from, int to)
ListListenerHelperEx.ElementarySubChange
representing an addition.E
- The element type of the ObservableList
.from
- The start index of the change.to
- The end index of the change.added
- The elements that were added during this change.ListListenerHelperEx.ElementarySubChange
representing the change.public static <E> ListListenerHelperEx.ElementarySubChange<E> permutated(int[] permutation, int from, int to)
ListListenerHelperEx.ElementarySubChange
representing a permutation.E
- The element type of the ObservableList
.permutation
- A mapping of prior indexes to current ones.from
- The start index of the change.to
- The end index of the change.ListListenerHelperEx.ElementarySubChange
representing the change.public static <E> ListListenerHelperEx.ElementarySubChange<E> removed(java.util.List<? extends E> removed, int from, int to)
ListListenerHelperEx.ElementarySubChange
representing a removal.E
- The element type of the ObservableList
.from
- The start index of the change.to
- The end index of the change.removed
- The elements that were removed during this change.ListListenerHelperEx.ElementarySubChange
representing the change.public static <E> ListListenerHelperEx.ElementarySubChange<E> replaced(java.util.List<? extends E> removed, java.util.List<? extends E> added, int from, int to)
ListListenerHelperEx.ElementarySubChange
representing a replacement.E
- The element type of the ObservableList
.removed
- The elements that were removed.from
- The start index of the change.to
- The end index of the change.added
- The elements that were added during this change.ListListenerHelperEx.ElementarySubChange
representing the change.public java.util.List<E> getAdded()
public int getFrom()
public ListListenerHelperEx.ElementarySubChange.Kind getKind()
public int[] getPermutation()
public java.util.List<E> getRemoved()
public int getTo()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright (c) 2014 itemis AG and others. All rights reserved.