Package com.sun.syndication.feed.module

Examples of com.sun.syndication.feed.module.Extendable


       
        /**
         * performs a selection sort on all the beans in the List
         */
        public synchronized void sortOnProperty(Object value, boolean ascending, ValueStrategy strat) {
            Extendable temp = null;
           
            for (int i = 0; i < (this.size() - 1); i++) {
                for (int j = i + 1; j < this.size(); j++) {
                    Extendable o1 = (Extendable) this.get(i);
                    Comparable oc1 = strat.getValue(o1, value);
                   
                    Extendable o2 = (Extendable) this.get(j);
                    Comparable oc2 = strat.getValue(o2, value);
                    System.out.println(oc1 +" < "+oc2);
                    if (ascending) {
                        if ((oc1 != oc2) && ((oc2 == null) || ((oc1 != null) && (oc2 != null) && (oc2.compareTo(oc1) < 0)))) { //swap
                            this.set(i, o2);
View Full Code Here

TOP

Related Classes of com.sun.syndication.feed.module.Extendable

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.