Class NotQuery<T>

  • All Implemented Interfaces:
    Query<T>

    public class NotQuery<T>
    extends Object
    implements Query<T>
    Deprecated.
    Use Context.getObjectsAsStream(Class) and the Java 8+ streaming API Stream instead.
    A query whose results are the negation of its sub-query. In practice, this means the results of a NotQuery are those items in a context that are not members of the the sub-query results.
    Version:
    $Revision$ $Date$
    Author:
    Nick Collier
    • Constructor Detail

      • NotQuery

        public NotQuery​(Context<T> context,
                        Query<T> query)
        Deprecated.
        Creates a NotQuery whose results will contain all the members of the specified context that are not in the specified query's results.
        Parameters:
        context -
        query -
    • Method Detail

      • query

        public Iterable<T> query()
        Deprecated.
        Gets an iterable over all the objects in the context that are not in the results of the sub-query specified in the constructor.
        Specified by:
        query in interface Query<T>
        Returns:
        an iterable over all the objects in the context that are not in the results of the sub-query specified in the constructor.
      • query

        public Iterable<T> query​(Iterable<T> set)
        Deprecated.
        Gets an iterable over all the objects in the context that are not in the results of the sub-query specified in the constructor AND are in the iterable parameter.
        Specified by:
        query in interface Query<T>
        Parameters:
        set -
        Returns:
        an iterable over all the objects in the context that are not in the results of the sub-query specified in the constructor AND are in the iterable parameter.