Package org.openstreetmap.josm.data.osm

Examples of org.openstreetmap.josm.data.osm.OsmPrimitiveComparator


         * Sorts the current elements in the selection
         */
        public void sort() {
            if (this.selection.size() <= Main.pref.getInteger("selection.no_sort_above", 100000)) {
                boolean quick = this.selection.size() > Main.pref.getInteger("selection.fast_sort_above", 10000);
                Collections.sort(this.selection, new OsmPrimitiveComparator(quick, false));
            }
        }
View Full Code Here


        return p;
    }

    protected String buildDataText() {
        DataText dt = new DataText();
        Collections.sort(primitives, new OsmPrimitiveComparator());
        for (OsmPrimitive o : primitives) {
            dt.addPrimitive(o);
        }
        return dt.toString();
    }
View Full Code Here

                toUpdate.add(osm);
            } else if (osm.isDeleted() && !osm.isNew() && osm.isModified() && osm.isVisible()) {
                toDelete.add(osm);
            }
        }
        OsmPrimitiveComparator c = new OsmPrimitiveComparator(false, true);
        Collections.sort(toDelete, c);
        Collections.sort(toAdd, c);
        Collections.sort(toUpdate, c);
    }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.data.osm.OsmPrimitiveComparator

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.