|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.greenrobot.dao.LazyList<E>
E
- Entity type.public class LazyList<E>
A thread-safe, unmodifiable list that reads entities once they are accessed from an underlying database cursor. Make sure to close the list once you are done with it. The lazy list can be cached or not. Cached lazy lists store the entities in memory to avoid loading entities more than once. Some features of the list are limited to cached lists (e.g. features that require the entire list). Cached lists close the cursor automatically once you queried all entities. However, to avoid leaked cursors, you should not rely on this behavior: if an exception occurs before the entire list is read, you should close the lazy list (and thus the underlying cursor) on your own to be on the safe side.
Method Summary | ||
---|---|---|
boolean |
add(E object)
|
|
void |
add(int location,
E object)
|
|
boolean |
addAll(java.util.Collection<? extends E> arg0)
|
|
boolean |
addAll(int arg0,
java.util.Collection<? extends E> arg1)
|
|
void |
clear()
|
|
void |
close()
|
|
boolean |
contains(java.lang.Object object)
|
|
boolean |
containsAll(java.util.Collection<?> collection)
|
|
E |
get(int location)
|
|
int |
getLoadedCount()
|
|
int |
indexOf(java.lang.Object object)
|
|
boolean |
isClosed()
|
|
boolean |
isEmpty()
|
|
boolean |
isLoadedCompletely()
|
|
java.util.Iterator<E> |
iterator()
|
|
int |
lastIndexOf(java.lang.Object object)
|
|
CloseableListIterator<E> |
listIterator()
|
|
java.util.ListIterator<E> |
listIterator(int location)
|
|
CloseableListIterator<E> |
listIteratorAutoClose()
Closes this list's cursor once the iterator is fully iterated through. |
|
void |
loadRemaining()
Loads the remaining entities (if any) that were not loaded before. |
|
E |
peak(int location)
Like get but does not load the entity if it was not loaded before. |
|
E |
remove(int location)
|
|
boolean |
remove(java.lang.Object object)
|
|
boolean |
removeAll(java.util.Collection<?> arg0)
|
|
boolean |
retainAll(java.util.Collection<?> arg0)
|
|
E |
set(int location,
E object)
|
|
int |
size()
|
|
java.util.List<E> |
subList(int start,
int end)
|
|
java.lang.Object[] |
toArray()
|
|
|
toArray(T[] array)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
equals, hashCode |
Method Detail |
---|
public void loadRemaining()
public E peak(int location)
public void close()
close
in interface java.io.Closeable
public boolean isClosed()
public int getLoadedCount()
public boolean isLoadedCompletely()
public boolean add(E object)
add
in interface java.util.Collection<E>
add
in interface java.util.List<E>
public void add(int location, E object)
add
in interface java.util.List<E>
public boolean addAll(java.util.Collection<? extends E> arg0)
addAll
in interface java.util.Collection<E>
addAll
in interface java.util.List<E>
public boolean addAll(int arg0, java.util.Collection<? extends E> arg1)
addAll
in interface java.util.List<E>
public void clear()
clear
in interface java.util.Collection<E>
clear
in interface java.util.List<E>
public boolean contains(java.lang.Object object)
contains
in interface java.util.Collection<E>
contains
in interface java.util.List<E>
public boolean containsAll(java.util.Collection<?> collection)
containsAll
in interface java.util.Collection<E>
containsAll
in interface java.util.List<E>
public E get(int location)
get
in interface java.util.List<E>
public int indexOf(java.lang.Object object)
indexOf
in interface java.util.List<E>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<E>
isEmpty
in interface java.util.List<E>
public java.util.Iterator<E> iterator()
iterator
in interface java.lang.Iterable<E>
iterator
in interface java.util.Collection<E>
iterator
in interface java.util.List<E>
public int lastIndexOf(java.lang.Object object)
lastIndexOf
in interface java.util.List<E>
public CloseableListIterator<E> listIterator()
listIterator
in interface java.util.List<E>
public CloseableListIterator<E> listIteratorAutoClose()
public java.util.ListIterator<E> listIterator(int location)
listIterator
in interface java.util.List<E>
public E remove(int location)
remove
in interface java.util.List<E>
public boolean remove(java.lang.Object object)
remove
in interface java.util.Collection<E>
remove
in interface java.util.List<E>
public boolean removeAll(java.util.Collection<?> arg0)
removeAll
in interface java.util.Collection<E>
removeAll
in interface java.util.List<E>
public boolean retainAll(java.util.Collection<?> arg0)
retainAll
in interface java.util.Collection<E>
retainAll
in interface java.util.List<E>
public E set(int location, E object)
set
in interface java.util.List<E>
public int size()
size
in interface java.util.Collection<E>
size
in interface java.util.List<E>
public java.util.List<E> subList(int start, int end)
subList
in interface java.util.List<E>
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<E>
toArray
in interface java.util.List<E>
public <T> T[] toArray(T[] array)
toArray
in interface java.util.Collection<E>
toArray
in interface java.util.List<E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |