Class AndQuery<T>

java.lang.Object
repast.simphony.query.AndQuery<T>
All Implemented Interfaces:
Query<T>

public class AndQuery<T> extends Object implements Query<T>
Deprecated.
Use Context.getObjectsAsStream(Class) and the Java 8+ streaming API Stream instead.
A query whose result is the intersection of its sub queries.
Version:
$Revision$ $Date$
Author:
Nick Collier
  • Constructor Summary

    Constructors
    Constructor
    Description
    AndQuery(Query<T> query1, Query<T> query2)
    Deprecated.
    Creates an AndQuery from the two sub-queries.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
    Gets the intersection of the two queries specified in the constructor.
    Deprecated.
    Returns an iterable over the intersection of the two queries specified in the constructor where the results of that intersection are in the iterable parameter.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AndQuery

      public AndQuery(Query<T> query1, Query<T> query2)
      Deprecated.
      Creates an AndQuery from the two sub-queries.
      Parameters:
      query1 -
      query2 -
  • Method Details

    • query

      public Iterable<T> query()
      Deprecated.
      Gets the intersection of the two queries specified in the constructor.
      Specified by:
      query in interface Query<T>
      Returns:
      an iterable over the objects in the intersection of the two queries specified in the constructor.
    • query

      public Iterable<T> query(Iterable<T> set)
      Deprecated.
      Returns an iterable over the intersection of the two queries specified in the constructor where the results of that intersection are in the iterable parameter.
      Specified by:
      query in interface Query<T>
      Parameters:
      set -
      Returns:
      an iterable over the intersection of the two queries specified in the constructor where the results of that intersection are in the iterable parameter.