Package repast.simphony.query
Class AbstractPropertyQuery<T>
- java.lang.Object
-
- repast.simphony.query.AbstractPropertyQuery<T>
-
- All Implemented Interfaces:
Query<T>
- Direct Known Subclasses:
PropertyEquals
,PropertyGreaterThan
,PropertyGreaterThanEquals
,PropertyLessThan
,PropertyLessThanEquals
,PropertyNotEquals
public abstract class AbstractPropertyQuery<T> extends Object implements Query<T>
Deprecated.UseContext.getObjectsAsStream(Class)
and the Java 8+ streaming APIStream
instead.Abstact implementation of a query that queries based on an object's property. A property is defined in the standard java bean way as a getter or setter, such that the presence of a getFoo or setFoo method defines a "foo" property.- Version:
- $Revision$ $Date$
- Author:
- Nick Collier
-
-
Constructor Summary
Constructors Constructor Description AbstractPropertyQuery(Context<T> context, String propertyName, Object propertyValue)
Deprecated.Creates an AbstractProperty query to query the specified contexts using the specified property name and value.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract org.apache.commons.collections15.Predicate<T>
createPredicate(Context<T> context, String propertyName)
Deprecated.Implemented by subclasses to return the appropriate Predicate.org.apache.commons.collections15.Predicate<T>
getQueryPredicate()
Deprecated.Gets the Predicate that will be used in this Predicate's next call to query().protected void
propertyNotFound(String propertyName)
Deprecated.Iterable<T>
query()
Deprecated.Returns the result of the query.Iterable<T>
query(Iterable<T> iter)
Deprecated.Returns an iterable over the objects that are the result of the query and are in the passed in iterable.
-
-
-
Method Detail
-
getQueryPredicate
public org.apache.commons.collections15.Predicate<T> getQueryPredicate()
Deprecated.Gets the Predicate that will be used in this Predicate's next call to query().- Returns:
- the Predicate that will be used in this Predicate's next call to query().
-
createPredicate
protected abstract org.apache.commons.collections15.Predicate<T> createPredicate(Context<T> context, String propertyName)
Deprecated.Implemented by subclasses to return the appropriate Predicate. For example, a property equals query predicate will return true if an object has that property and its value is equal to the value specified in the constructor.- Parameters:
context
-propertyName
-- Returns:
- the Predicate appropriate to the implementing sub class.
-
propertyNotFound
protected void propertyNotFound(String propertyName)
Deprecated.
-
-