|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.beanutils.BeanPredicate
public class BeanPredicate
Predicate implementation that applies the given Predicate
to the result of calling the given property getter.
Field Summary | |
---|---|
private Log |
log
|
private Predicate |
predicate
Predicate to be applied to the property value |
private java.lang.String |
propertyName
Name of the property whose value will be predicated |
Constructor Summary | |
---|---|
BeanPredicate(java.lang.String propertyName,
Predicate predicate)
Constructs a BeanPredicate that applies the given
Predicate to the named property value. |
Method Summary | |
---|---|
boolean |
evaluate(java.lang.Object object)
Evaluates the given object by applying the getPredicate()
to a property value named by getPropertyName() . |
Predicate |
getPredicate()
Gets the Predicate to be applied to the value of the named property
during evaluate(java.lang.Object) . |
java.lang.String |
getPropertyName()
Gets the name of the property whose value is to be predicated. |
void |
setPredicate(Predicate predicate)
Sets the Predicate to be applied to the value of the named property
during evaluate . |
void |
setPropertyName(java.lang.String propertyName)
Sets the name of the property whose value is to be predicated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Log log
private java.lang.String propertyName
private Predicate predicate
Predicate
to be applied to the property value
Constructor Detail |
---|
public BeanPredicate(java.lang.String propertyName, Predicate predicate)
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 nullMethod Detail |
---|
public boolean evaluate(java.lang.Object object)
getPredicate()
to a property value named by getPropertyName()
.
java.lang.IllegalAccessException
- when the property cannot be evaluatedpublic java.lang.String getPropertyName()
public void setPropertyName(java.lang.String propertyName)
propertyName
- the name of the property whose value is to be predicated,
not nullpublic Predicate getPredicate()
Predicate
to be applied to the value of the named property
during evaluate(java.lang.Object)
.
Predicate
, not nullpublic void setPredicate(Predicate predicate)
Predicate
to be applied to the value of the named property
during evaluate
.
predicate
- Predicate
, not null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |