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
Deprecated.
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
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAbstractPropertyQuery
(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
Modifier and TypeMethodDescriptionprotected 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>
Deprecated.Gets the Predicate that will be used in this Predicate's next call to query().protected void
propertyNotFound
(String propertyName) Deprecated.query()
Deprecated.Returns the result of the query.Deprecated.Returns an iterable over the objects that are the result of the query and are in the passed in iterable.
-
Field Details
-
msgCenter
protected static final simphony.util.messages.MessageCenter msgCenterDeprecated. -
EMPTY
Deprecated. -
primNums
Deprecated. -
propertyValue
Deprecated.
-
-
Constructor Details
-
AbstractPropertyQuery
Deprecated.Creates an AbstractProperty query to query the specified contexts using the specified property name and value.- Parameters:
context
-propertyName
-propertyValue
-
-
-
Method Details
-
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.
-
query
Deprecated.Returns the result of the query. -
propertyNotFound
Deprecated. -
query
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.
-
Context.getObjectsAsStream(Class)
and the Java 8+ streaming APIStream
instead.