Class InstanceOfQuery<T>

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

public class InstanceOfQuery<T> extends Object implements Query<T>
Deprecated.
Use Context.getObjectsAsStream(Class) and the Java 8+ streaming API Stream instead.
Query that returns objects in a given context that are instances of the specified type.
Author:
Nick Collier
  • Constructor Details

    • InstanceOfQuery

      public InstanceOfQuery(Context<T> context, Class type)
      Deprecated.
      Creates an InstanceofQuery to query the specified context for objects of the specified type.
      Parameters:
      context - the context to query
      type - the type to query for
  • Method Details

    • query

      public Iterable<T> query()
      Deprecated.
      Returns the result of the query.
      Specified by:
      query in interface Query<T>
      Returns:
      an iterable over the objects that are the result of the query.
    • query

      public Iterable<T> query(Iterable set)
      Deprecated.
      Returns an iterable over the objects that are the result of the query and are in the passed in iterable. This allows queries to be chained together where the result of one query is passed into another.
      Specified by:
      query in interface Query<T>
      Parameters:
      set -
      Returns:
      an iterable over the objects that are the result of the query and are in the passed in iterable.