com.atlassian.jira.ofbiz
Class DatabaseIterable
java.lang.Object
com.atlassian.jira.ofbiz.DatabaseIterable
- All Implemented Interfaces:
- CloseableIterable, Sized
public abstract class DatabaseIterable
- extends Object
- implements CloseableIterable
A abstract implementation of CloseableIterable
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 resolver)
iterator
public CloseableIterator iterator()
- Specified by:
iterator
in interface CloseableIterable
- Returns:
- a
CloseableIterator
that can be closed once finished with
size
public final int size()
- Specified by:
size
in interface CloseableIterable
- Specified by:
size
in interface Sized
- Returns:
- the likely size of the objects returned by the
CloseableIterable.iterator()
. Be careful depending on this size being exact, as in many cases
its best efforts value or may be stable due to concurrent changes.
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface CloseableIterable
- Returns:
- true if the there is no data behind it. In this case the
CloseableIterable.iterator()
.hasNext() will return false;
createListIterator
protected abstract OfBizListIterator createListIterator()
- Create a new iterator.
- Returns:
- an instance of OfBizListIterator
Copyright © 2002-2009 Atlassian. All Rights Reserved.