|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.acorn.util.PropertyComparator
org.norther.tammi.core.rt.util.AttributeComparator
public class AttributeComparator
A comparator for attributes.
| Constructor Summary | |
|---|---|
AttributeComparator(String attr)
Constructs a new comparator. |
|
AttributeComparator(String[] attrs)
Constructs a new comparator for multiple attributes. |
|
AttributeComparator(String[] attrs,
Comparator comp)
Constructs a new comparator for multiple attributes with a value comparator. |
|
AttributeComparator(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 AttributeComparator(String attr)
attr - the attribute to compare.
public AttributeComparator(String attr,
Comparator comp)
attr - the attribute to compare.comp - the attribute value comparator.public AttributeComparator(String[] attrs)
attrs - the attributes to compare.
public AttributeComparator(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 Comparatorcompare in class PropertyComparatorvar1 - 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 PropertyComparatorobj - the object.prop - the property.
Exception - on errors.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||