Package org.sf.bee.commons.util.comparators

Examples of org.sf.bee.commons.util.comparators.JSONComparator


     * Sort a list of objects
     * @param data List to sort
     * @param fields Array of names to order to.
     */
    public void sort(final List<JSONObject> data, final String[] fields) {
        Collections.sort(data, new JSONComparator(fields));
    }
View Full Code Here


                // get filtered data
                final List<JSONObject> data = this.find(conditions);
                // order data
                final String[] fieldNames = treeExpression.getGroupByFields();
                if (!CollectionUtils.isEmpty(fieldNames)) {
                    Collections.sort(result, new JSONComparator(fieldNames));
                }
                // loop on all data
                for (final JSONObject obj : data) {
                    try {
                        // add item to tree (list must be ordered)
View Full Code Here

TOP

Related Classes of org.sf.bee.commons.util.comparators.JSONComparator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.