|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norther.tammi.acorn.util.PropertyComparator org.norther.tammi.core.rt.util.VariableComparator
public class VariableComparator
A comparator for named attributes of variables.
Constructor Summary | |
---|---|
VariableComparator(String attr)
Constructs a new comparator. |
|
VariableComparator(String[] attrs)
Constructs a new comparator for multiple attributes. |
|
VariableComparator(String[] attrs,
Comparator<?> comp)
Constructs a new comparator for multiple attributes with a value comparator. |
|
VariableComparator(String attr,
Comparator<?> comp)
Constructs a new comparator with a value comparator. |
Method Summary | |
---|---|
int |
compare(Object var1,
Object var2)
Compares two variables. |
protected Object |
getProperty(Object obj,
String prop)
Gets the named property value. |
Methods inherited from class org.norther.tammi.acorn.util.PropertyComparator |
---|
compare, getNestedProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Constructor Detail |
---|
public VariableComparator(String attr)
attr
- the attribute to compare.public VariableComparator(String attr, Comparator<?> comp)
attr
- the attribute to compare.comp
- the attribute value comparator.public VariableComparator(String[] attrs)
attrs
- the attributes to compare.public VariableComparator(String[] attrs, Comparator<?> comp)
attrs
- the attributes to compare.comp
- the attribute value comparator.Method Detail |
---|
public int compare(Object var1, Object var2)
compare
in interface Comparator<Object>
compare
in class PropertyComparator
var1
- the first variable to be compared.var2
- the second variable to be compared.
protected Object getProperty(Object obj, String prop) throws Exception
PropertyComparator
getProperty
in class PropertyComparator
obj
- the object.prop
- the property.
Exception
- on errors.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |