Women in Technology

Hear us Roar



Article:
  Making Java Objects Comparable
Subject:   Apache Jakarta Commons BeanUtils/Collections
Date:   2003-03-17 07:54:15
From:   anonymous2
The org.apache.commons packages help a great
deal with property based sorting:


ArrayList sortFields = new ArrayList();
sortFields.add(new BeanComparator("lastName"));
sortFields.add(new BeanComparator("firstName"));
ComparatorChain multiSort = new
ComparatorChain(sortFields);
java.util.Collections.sort(rows,multiSort);


See the Collections and BeanUtils packages at
http://jakarta.apache.org/commons/

Full Threads Newest First

Showing messages 1 through 2 of 2.

  • Apache Jakarta Commons BeanUtils/Collections
    2003-10-23 20:53:02  anonymous2 [View]

    hi,
    Can you provide me more details on this?

    Thanks,
    DN
  • Apache Jakarta Commons BeanUtils/Collections
    2003-10-23 20:53:07  anonymous2 [View]

    hi,
    Can you provide me more details on this?

    Thanks,
    DN