SOURCE
- the source typeVIEW
- the view typepublic abstract class ListView<SOURCE,VIEW> extends AbstractList<VIEW>
ViewProvider
implementation. Changes to the view list are reflected within the source list and vice versa.Modifier and Type | Class and Description |
---|---|
protected class |
ListView.ListViewIterator |
modCount
Constructor and Description |
---|
ListView() |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
VIEW element) |
boolean |
add(VIEW e) |
void |
clear() |
protected abstract SOURCE |
createSource(VIEW view)
Creates a new source object based on a given view.
|
VIEW |
get(int index) |
protected abstract List<SOURCE> |
getDelegate() |
Iterator<VIEW> |
iterator() |
ListIterator<VIEW> |
listIterator() |
ListIterator<VIEW> |
listIterator(int index) |
VIEW |
remove(int index) |
VIEW |
set(int index,
VIEW element) |
int |
size() |
protected abstract VIEW |
toView(SOURCE source)
Provides a view representation of a source object.
|
addAll, equals, hashCode, indexOf, lastIndexOf, 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
public VIEW get(int index)
public int size()
size
in interface Collection<VIEW>
size
in interface List<VIEW>
size
in class AbstractCollection<VIEW>
public boolean add(VIEW e)
add
in interface Collection<VIEW>
add
in interface List<VIEW>
add
in class AbstractList<VIEW>
public void add(int index, VIEW element)
public VIEW remove(int index)
public void clear()
clear
in interface Collection<VIEW>
clear
in interface List<VIEW>
clear
in class AbstractList<VIEW>
public ListIterator<VIEW> listIterator()
listIterator
in interface List<VIEW>
listIterator
in class AbstractList<VIEW>
public ListIterator<VIEW> listIterator(int index)
listIterator
in interface List<VIEW>
listIterator
in class AbstractList<VIEW>
protected abstract VIEW toView(SOURCE source)
source
- Copyright © 2020. All rights reserved.