Package com.thoughtworks.xstream.core.util

Examples of com.thoughtworks.xstream.core.util.PresortedMap$ArraySet


        TreeMap result, Comparator comparator) {
        boolean inFirstElement = comparator == NULL_MARKER;
        if (inFirstElement) {
            comparator = null;
        }
        SortedMap sortedMap = new PresortedMap(comparator != null && JVM.hasOptimizedTreeMapPutAll() ? comparator : null);
        if (inFirstElement) {
            // we are already within the first entry
            putCurrentEntryIntoMap(reader, context, result, sortedMap);
            reader.moveUp();
        }
        populateMap(reader, context, result, sortedMap);
        try {
            if (JVM.hasOptimizedTreeMapPutAll()) {
                if (comparator != null && comparatorField != null) {
                    comparatorField.set(result, comparator);
                }
                result.putAll(sortedMap); // internal optimization will not call comparator
            } else if (comparatorField != null) {
                comparatorField.set(result, sortedMap.comparator());
                result.putAll(sortedMap); // "sort" by index
                comparatorField.set(result, comparator);
            } else {
                result.putAll(sortedMap); // will use comparator for already sorted map
            }
View Full Code Here

TOP

Related Classes of com.thoughtworks.xstream.core.util.PresortedMap$ArraySet

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.