|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.graph.MetaObjectRangePredicate
public class MetaObjectRangePredicate
Predicate that evaluates a value to determine if it falls
within a min and a max range ( inclusive, for now ).
Upper and lower ranges are not necessarily required. Evaluation is
handled as follow:
true
metaClass
and metaClassName
are optional parameters, but
are mutually exclusive.fieldName
is a required parameter.
TODO:
- re-evaluate fieldName
being required since other Meta*
predicates don't.
Field Summary | |
---|---|
static int |
EXCLUSIVE
Flag to specify the min and max value should be exclusive. |
static int |
MAX_EXCLUSIVE
Flag to specify if the max value should be exclusive. |
static int |
MIN_EXCLUSIVE
Flag to specify if the min value should be exclusive. |
Constructor Summary | |
---|---|
MetaObjectRangePredicate()
|
|
MetaObjectRangePredicate(MetaClass metaClass,
java.lang.String field,
java.lang.Comparable maxValue,
java.lang.Comparable minValue)
|
|
MetaObjectRangePredicate(MetaClass metaClass,
java.lang.String field,
java.lang.Comparable maxValue,
java.lang.Comparable minValue,
int inclusiveFlags)
|
|
MetaObjectRangePredicate(java.lang.String metaClassName,
java.lang.String field,
java.lang.Comparable maxValue,
java.lang.Comparable minValue)
|
|
MetaObjectRangePredicate(java.lang.String metaClassName,
java.lang.String field,
java.lang.Comparable maxValue,
java.lang.Comparable minValue,
int inclusiveFlags)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
boolean |
evaluate(java.lang.Object obj)
Returns true if the specified node is a meta-object whose field value fall within min and max range. |
int |
getExclusiveFlags()
Gets the inclusive flags. |
java.lang.String |
getFieldName()
Returns the field name for which we are checking. |
java.lang.Comparable |
getMaxValue()
|
MetaClass |
getMetaClass()
Returns the meta-class for which we are searching. |
java.lang.String |
getMetaClassName()
Returns the meta-class name for which we are searching. |
java.lang.Comparable |
getMinValue()
|
int |
hashCode()
|
void |
setExclusiveFlags(int exclusiveFlags)
Sets the inclusive flags |
void |
setFieldName(java.lang.String field)
Sets the field name for this predicate. |
void |
setMaxValue(java.lang.Comparable maxValue)
Set the maximum acceptable value in the range. |
void |
setMetaClass(MetaClass metaClass)
Sets the meta-class to be searched later. |
void |
setMetaClassName(java.lang.String metaClassName)
Sets the metaClassName for this predicate. |
void |
setMinValue(java.lang.Comparable minValue)
Set the minimum acceptable value in the range. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MIN_EXCLUSIVE
public static final int MAX_EXCLUSIVE
public static final int EXCLUSIVE
Constructor Detail |
---|
public MetaObjectRangePredicate()
public MetaObjectRangePredicate(java.lang.String metaClassName, java.lang.String field, java.lang.Comparable maxValue, java.lang.Comparable minValue)
public MetaObjectRangePredicate(java.lang.String metaClassName, java.lang.String field, java.lang.Comparable maxValue, java.lang.Comparable minValue, int inclusiveFlags)
public MetaObjectRangePredicate(MetaClass metaClass, java.lang.String field, java.lang.Comparable maxValue, java.lang.Comparable minValue)
public MetaObjectRangePredicate(MetaClass metaClass, java.lang.String field, java.lang.Comparable maxValue, java.lang.Comparable minValue, int inclusiveFlags)
Method Detail |
---|
public MetaClass getMetaClass()
public void setMetaClass(MetaClass metaClass)
public java.lang.String getMetaClassName()
public void setMetaClassName(java.lang.String metaClassName)
public java.lang.String getFieldName()
public void setFieldName(java.lang.String field)
public void setMaxValue(java.lang.Comparable maxValue)
public java.lang.Comparable getMaxValue()
public void setMinValue(java.lang.Comparable minValue)
public java.lang.Comparable getMinValue()
public int getExclusiveFlags()
public void setExclusiveFlags(int exclusiveFlags)
public boolean evaluate(java.lang.Object obj)
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 |