Package repast.simphony.query
Class PropertyEquals<T>
- java.lang.Object
-
- repast.simphony.query.AbstractPropertyQuery<T>
-
- repast.simphony.query.PropertyEquals<T>
-
- All Implemented Interfaces:
Query<T>
@Deprecated public class PropertyEquals<T> extends AbstractPropertyQuery<T>
Deprecated.UseContext.getObjectsAsStream(Class)
and the Java 8+ streaming APIStream
instead.Query that returns any objects in a context with a specified property whose value is equal to some specified value.- Version:
- $Revision$ $Date$
- Author:
- Nick Collier
-
-
Field Summary
-
Fields inherited from class repast.simphony.query.AbstractPropertyQuery
EMPTY, msgCenter, primNums, propertyValue
-
-
Constructor Summary
Constructors Constructor Description PropertyEquals(Context<T> context, String propertyName, Object propertyValue)
Deprecated.Creates a PropertyEquals query to query the specified context for objects with the specified property where that property is equal to the specified value.PropertyEquals(Context<T> context, String propertyName, Object propertyValue, PropertyEqualsPredicate predicate)
Deprecated.Creates a PropertyEquals query to query the specified context for objects with the specified property where that property is equal to the specified value.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected org.apache.commons.collections15.Predicate<T>
createPredicate(Context<T> context, String propertyName)
Deprecated.Creates a Predicate that tests for property equality.-
Methods inherited from class repast.simphony.query.AbstractPropertyQuery
getQueryPredicate, propertyNotFound, query, query
-
-
-
-
Constructor Detail
-
PropertyEquals
public PropertyEquals(Context<T> context, String propertyName, Object propertyValue)
Deprecated.Creates a PropertyEquals query to query the specified context for objects with the specified property where that property is equal to the specified value.- Parameters:
context
-propertyName
-propertyValue
-
-
PropertyEquals
public PropertyEquals(Context<T> context, String propertyName, Object propertyValue, PropertyEqualsPredicate predicate)
Deprecated.Creates a PropertyEquals query to query the specified context for objects with the specified property where that property is equal to the specified value.- Parameters:
context
-propertyName
-propertyValue
-predicate
- a custom predicate used to do the equals evaluation
-
-
Method Detail
-
createPredicate
protected org.apache.commons.collections15.Predicate<T> createPredicate(Context<T> context, String propertyName)
Deprecated.Creates a Predicate that tests for property equality.- Specified by:
createPredicate
in classAbstractPropertyQuery<T>
- Parameters:
context
-propertyName
-- Returns:
- a Predicate that tests for property equality.
-
-