T
- list content typepublic abstract class ListWithCallbacks<T> extends AbstractList<T>
modCount
Constructor and Description |
---|
ListWithCallbacks() |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
T element) |
boolean |
add(T e) |
protected void |
added(T element)
Called to notify subclasses of item addition.
|
void |
clear()
Clear the list, but don't explicitly "remove" the contents.
|
T |
get(int index) |
T |
remove(int index) |
protected void |
removed(T element)
Called to notify subclasses of item removal.
|
protected void |
replaced(T oldElement,
T newElement)
Called to notify subclasses of item replacement.
|
T |
set(int index,
T element) |
int |
size() |
addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
protected void added(T element)
element
- added itemprotected void removed(T element)
element
- removed itemprotected void replaced(T oldElement, T newElement)
oldElement
- old elementnewElement
- new elementpublic void clear()
clear
in interface Collection<T>
clear
in interface List<T>
clear
in class AbstractList<T>
public T get(int index)
public int size()
size
in interface Collection<T>
size
in interface List<T>
size
in class AbstractCollection<T>
public boolean add(T e)
add
in interface Collection<T>
add
in interface List<T>
add
in class AbstractList<T>
public void add(int index, T element)
Copyright © 2000–2024 Packwood Software. All rights reserved.