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 OfBizListIterator
Create a new iterator.final void
Apply the sink to all elements in the Collection.boolean
isEmpty()
final int
size()
-
Constructor Details
-
DatabaseIterable
-
-
Method Details
-
foreach
Description copied from interface:EnclosedIterable
Apply the sink to all elements in the Collection.- Specified by:
foreach
in interfaceEnclosedIterable<E>
-
size
public final int size()- Specified by:
size
in interfaceEnclosedIterable<E>
- Specified by:
size
in 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:
isEmpty
in interfaceEnclosedIterable<E>
- Specified by:
isEmpty
in interfaceSized
- Returns:
- true if the there is no data behind it.
-
createListIterator
Create a new iterator.- Returns:
- an instance of OfBizListIterator
-