E
- Type of the element of this listpublic abstract class AbstractLazyLoadList<E> extends Object implements List<E>
retrieveObjectForIndex()method to retrieve the object at the specified index from whatever datasource is being used, and to implement the
getSize()method to return the size of the list. The "datasource" could be results for a query, or a connection to a datastore, or whatever ... just a source of objects. TODO Change Localised message numbers to be generic
Modifier and Type | Field and Description |
---|---|
protected int |
size
Cached size of the list.
|
Constructor and Description |
---|
AbstractLazyLoadList(String cacheType)
Constructor for a lazy load list.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
Object element) |
boolean |
add(Object e) |
boolean |
addAll(Collection c) |
boolean |
addAll(int index,
Collection c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection c) |
E |
get(int index) |
protected abstract int |
getSize()
Method to return the size of the list.
|
int |
indexOf(Object o) |
boolean |
isEmpty() |
protected boolean |
isOpen()
Accessor whether the list is open.
|
Iterator<E> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator |
listIterator() |
ListIterator |
listIterator(int index) |
E |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection c) |
boolean |
retainAll(Collection c) |
protected abstract E |
retrieveObjectForIndex(int index)
Accessor to retrieve the object at an index.
|
Object |
set(int index,
Object element) |
int |
size() |
List |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
Object[] |
toArray(Object[] a) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, replaceAll, sort, spliterator
parallelStream, removeIf, stream
public AbstractLazyLoadList(String cacheType)
cacheType
- Type of caching of objects in the listprotected abstract E retrieveObjectForIndex(int index)
index
- The list indexprotected abstract int getSize()
protected boolean isOpen()
public boolean add(Object e)
public boolean addAll(Collection c)
public boolean addAll(int index, Collection c)
public void clear()
public boolean contains(Object o)
public boolean containsAll(Collection c)
containsAll
in interface Collection<E>
containsAll
in interface List<E>
public boolean isEmpty()
public int lastIndexOf(Object o)
lastIndexOf
in interface List<E>
public ListIterator listIterator()
listIterator
in interface List<E>
public ListIterator listIterator(int index)
listIterator
in interface List<E>
public boolean remove(Object o)
public boolean removeAll(Collection c)
public boolean retainAll(Collection c)
public int size()
public Object[] toArray()
Copyright © 2018. All rights reserved.