Interface IQueryResult<T>

  • All Superinterfaces:
    IQueryable<T>, java.lang.Iterable<T>
    All Known Implementing Classes:
    CollectionResult, Collector

    public interface IQueryResult<T>
    extends IQueryable<T>, java.lang.Iterable<T>
    An IQueryResult represents the results of a query.
    Since:
    2.0
    • Method Summary

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

        query
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Method Detail

      • isEmpty

        boolean isEmpty()
        Returns whether this QueryResult is empty.
        Returns:
        true if this QueryResult has accepted any results, and false otherwise.
      • iterator

        java.util.Iterator<T> iterator()
        Returns an iterator on the collected objects.
        Specified by:
        iterator in interface java.lang.Iterable<T>
        Returns:
        an iterator of the collected objects.
      • toArray

        T[] toArray​(java.lang.Class<T> clazz)
        Returns the collected objects as an array
        Parameters:
        clazz - The type of array to return
        Returns:
        The array of results
        Throws:
        java.lang.ArrayStoreException - the runtime type of the specified array is not a super-type of the runtime type of every collected object
      • toSet

        java.util.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

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