|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.graph.ObjectFieldPredicate
public class ObjectFieldPredicate
Predicate that evaluates based on objectClass
instance, if
specified, as well as field=value inspection, also if specified.
Constructor Summary | |
---|---|
ObjectFieldPredicate()
|
|
ObjectFieldPredicate(java.lang.Class objectClass)
|
|
ObjectFieldPredicate(java.lang.Class objectClass,
java.lang.String field,
java.lang.Object value)
|
|
ObjectFieldPredicate(java.lang.String field,
java.lang.Object value)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
boolean |
evaluate(java.lang.Object node)
Returns true if the specified node is of type objectClass and/or its value matches
that which is define in the value and >code>field
members. |
java.lang.String |
getFieldName()
Returns the field name for this predicate. |
java.lang.Class |
getObjectClass()
Returns the class for this predicate. |
java.lang.Object |
getValue()
Returns the value associated with the field of this predicate. |
int |
hashCode()
|
void |
setFieldName(java.lang.String field)
Sets the field name for this predicate. |
void |
setObjectClass(java.lang.Class c)
Sets the class for this predicate. |
void |
setValue(java.lang.Object value)
Sets the value associated with the field of this predicate. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ObjectFieldPredicate()
public ObjectFieldPredicate(java.lang.Class objectClass)
public ObjectFieldPredicate(java.lang.String field, java.lang.Object value)
public ObjectFieldPredicate(java.lang.Class objectClass, java.lang.String field, java.lang.Object value)
Method Detail |
---|
public java.lang.Class getObjectClass()
public void setObjectClass(java.lang.Class c)
public java.lang.String getFieldName()
public void setFieldName(java.lang.String field)
public java.lang.Object getValue()
public void setValue(java.lang.Object value)
public boolean evaluate(java.lang.Object node)
objectClass
and/or its value matches
that which is define in the value
and >code>field
members.objectClass
:
If this is set, the object will
be evaluated on the basis that it is
an instance of the objectClass
type.
field
:
If this is set, and provided the object to be
evaluated has this property, the data contained
in value
will be used as a final
determinent of the evaluation.
null
is considered valid data
in the value
member.
value
:
If this is set and field
is not set, then
the passed in node is equals()
compared
with the value.
evaluate
in interface org.apache.commons.collections.Predicate
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |