Package com.atlassian.jira.ofbiz
Class DatabaseIterable<E>
java.lang.Object
com.atlassian.jira.ofbiz.DatabaseIterable<E>
- All Implemented Interfaces:
EnclosedIterable<E>,Sized
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.jira.util.collect.EnclosedIterable
EnclosedIterable.Functions, EnclosedIterable.ListResolver<T> -
Constructor Summary
ConstructorsConstructorDescriptionDatabaseIterable(int size, Resolver<org.ofbiz.core.entity.GenericValue, E> resolver) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract OfBizListIteratorCreate a new iterator.final voidApply the sink to all elements in the Collection.booleanisEmpty()final intsize()
-
Constructor Details
-
DatabaseIterable
-
-
Method Details
-
foreach
Description copied from interface:EnclosedIterableApply the sink to all elements in the Collection.- Specified by:
foreachin interfaceEnclosedIterable<E>
-
size
public final int size()- Specified by:
sizein interfaceEnclosedIterable<E>- Specified by:
sizein interfaceSized- 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:
isEmptyin interfaceEnclosedIterable<E>- Specified by:
isEmptyin interfaceSized- Returns:
- true if the there is no data behind it.
-
createListIterator
Create a new iterator.- Returns:
- an instance of OfBizListIterator
-