com.atlassian.jira.util.collect
Interface EnclosedIterable<T>

All Superinterfaces:
Sized
All Known Subinterfaces:
IssuesIterable
All Known Implementing Classes:
CollectionEnclosedIterable, DatabaseIssuesIterable, DatabaseIterable, IssueGVsIssueIterable, IssueIdsIssueIterable, IssueObjectIssuesIterable, PagedDatabaseIterable, SharedEntitySearchResult

public interface EnclosedIterable<T>
extends Sized

A limited collection view that may be backed by the something that needs closing, for example a connection to a database.

You can access all elements using the foreach(Consumer) method.

Since:
v3.13

Nested Class Summary
static class EnclosedIterable.Functions
           
static class EnclosedIterable.ListResolver<T>
          Utility class for transforming a EnclosedIterable into a List.
 
Method Summary
 void foreach(Consumer<T> sink)
          Apply the sink to all elements in the Collection.
 boolean isEmpty()
           
 int size()
           
 

Method Detail

foreach

void foreach(Consumer<T> sink)
Apply the sink to all elements in the Collection.


size

int size()
Specified by:
size in interface Sized
Returns:
the likely size of the objects passed into the sink in foreach(Consumer). 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

boolean isEmpty()
Specified by:
isEmpty in interface Sized
Returns:
true if the there is no data behind it.


Copyright © 2002-2009 Atlassian. All Rights Reserved.