Java Code Examples for java.util.Collections#checkedSortedMap()

The following examples show how to use java.util.Collections#checkedSortedMap() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractRuntimeObjectSchemaTest.java    From protostuff with Apache License 2.0 6 votes vote down vote up
PojoWithObjectMapFields fill()
{
    TreeMap<String, String> tm = new TreeMap<String, String>();
    tm.put("foo", "bar");

    EnumMap<GuitarPickup, Size> em = new EnumMap<GuitarPickup, Size>(
            GuitarPickup.class);
    em.put(GuitarPickup.CONTACT, Size.SMALL);

    emptyMap = Collections.emptyMap();
    singletonMap = Collections.singletonMap("key", "value");

    unmodifiableMap = Collections.unmodifiableMap(Collections
            .emptyMap());
    unmodifiableSortedMap = Collections.unmodifiableSortedMap(tm);

    synchronizedMap = Collections.synchronizedMap(em);
    synchronizedSortedMap = Collections.synchronizedSortedMap(tm);

    checkedMap = Collections.checkedMap(em, GuitarPickup.class,
            Size.class);
    checkedSortedMap = Collections.checkedSortedMap(tm, String.class,
            String.class);

    return this;
}
 
Example 2
Source File: java_util_Collections_CheckedSortedMap.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getAnotherObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    return Collections.checkedSortedMap(map, String.class, String.class);
}
 
Example 3
Source File: java_util_Collections_CheckedSortedMap.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    map.put("key", "value");
    return Collections.checkedSortedMap(map, String.class, String.class);
}
 
Example 4
Source File: java_util_Collections_CheckedSortedMap.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    map.put("key", "value");
    return Collections.checkedSortedMap(map, String.class, String.class);
}
 
Example 5
Source File: java_util_Collections_CheckedSortedMap.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getAnotherObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    return Collections.checkedSortedMap(map, String.class, String.class);
}
 
Example 6
Source File: java_util_Collections_CheckedSortedMap.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    map.put("key", "value");
    return Collections.checkedSortedMap(map, String.class, String.class);
}
 
Example 7
Source File: java_util_Collections_CheckedSortedMap.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getAnotherObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    return Collections.checkedSortedMap(map, String.class, String.class);
}
 
Example 8
Source File: java_util_Collections_CheckedSortedMap.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    map.put("key", "value");
    return Collections.checkedSortedMap(map, String.class, String.class);
}
 
Example 9
Source File: java_util_Collections_CheckedSortedMap.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getAnotherObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    return Collections.checkedSortedMap(map, String.class, String.class);
}
 
Example 10
Source File: java_util_Collections_CheckedSortedMap.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    map.put("key", "value");
    return Collections.checkedSortedMap(map, String.class, String.class);
}
 
Example 11
Source File: Collections2Test.java    From j2objc with Apache License 2.0 4 votes vote down vote up
public void test_checkedSortedMapSerializationCompatability() throws Exception {
    SortedMap<String, String> c = new TreeMap<String, String>();
    c = Collections.checkedSortedMap(c, String.class, String.class);
    SerializationTester.assertCompabilityEquals(c, "serialization/org/apache/harmony/tests/java/util/Collections_CheckedSortedMap.golden.ser");
}
 
Example 12
Source File: java_util_Collections_CheckedSortedMap.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    map.put("key", "value");
    return Collections.checkedSortedMap(map, String.class, String.class);
}
 
Example 13
Source File: java_util_Collections_CheckedSortedMap.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    map.put("key", "value");
    return Collections.checkedSortedMap(map, String.class, String.class);
}
 
Example 14
Source File: java_util_Collections_CheckedSortedMap.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getAnotherObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    return Collections.checkedSortedMap(map, String.class, String.class);
}
 
Example 15
Source File: java_util_Collections_CheckedSortedMap.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    map.put("key", "value");
    return Collections.checkedSortedMap(map, String.class, String.class);
}
 
Example 16
Source File: java_util_Collections_CheckedSortedMap.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getAnotherObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    return Collections.checkedSortedMap(map, String.class, String.class);
}
 
Example 17
Source File: java_util_Collections_CheckedSortedMap.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    map.put("key", "value");
    return Collections.checkedSortedMap(map, String.class, String.class);
}
 
Example 18
Source File: java_util_Collections_CheckedSortedMap.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getAnotherObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    return Collections.checkedSortedMap(map, String.class, String.class);
}
 
Example 19
Source File: java_util_Collections_CheckedSortedMap.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getAnotherObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    return Collections.checkedSortedMap(map, String.class, String.class);
}
 
Example 20
Source File: java_util_Collections_CheckedSortedMap.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
protected SortedMap<String, String> getAnotherObject() {
    SortedMap<String, String> map = new TreeMap<String, String>();
    return Collections.checkedSortedMap(map, String.class, String.class);
}