L
- the type of elements in the list to be modifiedE
- the type of elements will be or have been removed (Note that these types can only be different if
this event is fired before the removal, because than elements which are not in the associated list
might anyway be requested to be removed.)public class ListRemoveEvent<L,E> extends ListChangeEvent<L>
List
.ListChangeListener
,
ObservableList
,
Serialized FormConstructor and Description |
---|
ListRemoveEvent(java.util.List<L> source,
int index,
java.util.Collection<? extends E> affectedElements)
Creates a new event object.
|
ListRemoveEvent(java.util.List<L> source,
int index,
E affectedElement)
Creates a new event object.
|
Modifier and Type | Method and Description |
---|---|
E |
getAffectedElement()
Returns the first affected element.
|
java.util.Collection<? extends E> |
getAffectedElements()
Returns a collection of all elements that will be or have been removed from the list.
|
getIndex, getSource, getType
public ListRemoveEvent(java.util.List<L> source, int index, java.util.Collection<? extends E> affectedElements)
source
- the list instance that has been modifiedaffectedElements
- a list of elements that have been removedpublic ListRemoveEvent(java.util.List<L> source, int index, E affectedElement)
source
- the list instance that has been modifiedindex
- the index the first affected element has in the listaffectedElement
- a list of elements that have been removedpublic java.util.Collection<? extends E> getAffectedElements()
Note that this collection may contain elements have never been contained in the associated list, if this event is fired before the removal operation.
public E getAffectedElement()
getAffectedElements()