com.atlassian.jira.ofbiz
Class DatabaseIterable<E>
java.lang.Object
com.atlassian.jira.ofbiz.DatabaseIterable<E>
- All Implemented Interfaces:
- EnclosedIterable<E>, Sized
public abstract class DatabaseIterable<E>
- extends Object
- implements EnclosedIterable<E>
A abstract implementation of EnclosedIterable
that defers to an OfBizListIterator
.
Note that the iteration order is up to the query that creates the OfBizListIterator
.
This implementation is unbounded.
- Since:
- v3.13
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DatabaseIterable
public DatabaseIterable(int size,
Resolver<org.ofbiz.core.entity.GenericValue,E> resolver)
foreach
public final void foreach(Consumer<E> consumer)
- Description copied from interface:
EnclosedIterable
- Apply the sink to all elements in the Collection.
- Specified by:
foreach
in interface EnclosedIterable<E>
size
public final int size()
- Specified by:
size
in interface EnclosedIterable<E>
- Specified by:
size
in interface Sized
- Returns:
- the likely size of the objects passed into the sink in
EnclosedIterable.foreach(Consumer)
. Be careful depending on this size
being exact, as in many cases its best efforts value or may be unstable due to concurrent changes.
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface EnclosedIterable<E>
- Specified by:
isEmpty
in interface Sized
- Returns:
- true if the there is no data behind it.
createListIterator
protected abstract OfBizListIterator createListIterator()
- Create a new iterator.
- Returns:
- an instance of OfBizListIterator
Copyright © 2002-2013 Atlassian. All Rights Reserved.