Eclipse Platform
Release 3.6

org.eclipse.equinox.p2.query
Interface IQueryResult<T>

All Superinterfaces:
IQueryable<T>
All Known Implementing Classes:
CollectionResult, Collector

public interface IQueryResult<T>
extends IQueryable<T>

An IQueryResult represents the results of a query.

Since:
2.0

Method Summary
 boolean isEmpty()
          Returns whether this QueryResult is empty.
 Iterator<T> iterator()
          Returns an iterator on the collected objects.
 T[] toArray(Class<T> clazz)
          Returns the collected objects as an array
 Set<T> toSet()
          Creates a new Set copy with the contents of this query result.
 Set<T> toUnmodifiableSet()
          Returns a Set backed by this query result.
 
Methods inherited from interface org.eclipse.equinox.p2.query.IQueryable
query
 

Method Detail

isEmpty

boolean isEmpty()
Returns whether this QueryResult is empty.

Returns:
true if this QueryResult has accepted any results, and false otherwise.

iterator

Iterator<T> iterator()
Returns an iterator on the collected objects.

Returns:
an iterator of the collected objects.

toArray

T[] toArray(Class<T> clazz)
Returns the collected objects as an array

Parameters:
clazz - The type of array to return
Returns:
The array of results
Throws:
ArrayStoreException - the runtime type of the specified array is not a super-type of the runtime type of every collected object

toSet

Set<T> toSet()
Creates a new Set copy with the contents of this query result. The copy can be altered without any side effects on its origin.

Returns:
A detached copy of the result.

toUnmodifiableSet

Set<T> toUnmodifiableSet()
Returns a Set backed by this query result. The set is immutable.

Returns:
A Set backed by this query result.

Eclipse Platform
Release 3.6

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.