|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.ejtools.beans.Sort
Utility class that provides different kind of sort strategies for Iterator.
Method Summary | |
static java.util.Iterator |
getChildrenByClass(java.util.Iterator iterator,
java.lang.Class clazz)
Extract the elements of the specified class from the Iterator. |
static java.util.Iterator |
sortByClass(java.util.Iterator iterator)
Sort the iterator by class name |
static java.util.Iterator |
sortByClassAndName(java.util.Iterator iterator)
Sort the iterator by class name and by toString method |
static java.util.Iterator |
sortByName(java.util.Iterator iterator)
Sort the iterator by toString method |
static java.util.Iterator |
sortByProperty(java.util.Iterator iterator,
java.lang.Class clazz,
java.lang.String propertyName)
Sort and iterator of JavaBeans by comparing the given property |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.util.Iterator getChildrenByClass(java.util.Iterator iterator, java.lang.Class clazz)
iterator
- Iterator to scanclazz
- Class used for the extraction
public static java.util.Iterator sortByClass(java.util.Iterator iterator)
iterator
- Iterator to sort
public static java.util.Iterator sortByClassAndName(java.util.Iterator iterator)
iterator
- Iterator to sort
public static java.util.Iterator sortByName(java.util.Iterator iterator)
iterator
- Iterator to sort
public static java.util.Iterator sortByProperty(java.util.Iterator iterator, java.lang.Class clazz, java.lang.String propertyName)
iterator
- Iterator to sortclazz
- The class of the JavaBeanpropertyName
- The property used for sorting
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |