org.apache.commons.beanutils
Class BeanPredicate
java.lang.Object
org.apache.commons.beanutils.BeanPredicate
- Predicate
public class BeanPredicate
extends java.lang.Object
implements Predicate
Predicate implementation that applies the given Predicate
to the result of calling the given property getter.
private Log | log
|
private Predicate | predicate Predicate to be applied to the property value
|
private String | propertyName - Name of the property whose value will be predicated
|
BeanPredicate(String propertyName, Predicate predicate) - Constructs a
BeanPredicate that applies the given
Predicate to the named property value.
|
predicate
private Predicate predicate
Predicate
to be applied to the property value
propertyName
private String propertyName
Name of the property whose value will be predicated
BeanPredicate
public BeanPredicate(String propertyName,
Predicate predicate)
Constructs a BeanPredicate
that applies the given
Predicate
to the named property value.
propertyName
- the name of the property whose value is to be predicated,
not nullpredicate
- the Predicate
to be applied,
not null
evaluate
public boolean evaluate(Object object)
object
- The object being evaluated
- the result of the predicate evaluation
getPredicate
public Predicate getPredicate()
Gets the
Predicate
to be applied to the value of the named property
during
evaluate(Object)
.
getPropertyName
public String getPropertyName()
Gets the name of the property whose value is to be predicated.
in the evaluation.
- the property name, not null
setPredicate
public void setPredicate(Predicate predicate)
Sets the
Predicate
to be applied to the value of the named property
during
evaluate(Object)
.
predicate
- Predicate
, not null
setPropertyName
public void setPropertyName(String propertyName)
Sets the name of the property whose value is to be predicated.
propertyName
- the name of the property whose value is to be predicated,
not null
Copyright (c) 2001-2007 - Apache Software Foundation