jdk/test/java/util/Collections/CheckedSetBash.java
author darcy
Wed, 29 Apr 2015 10:25:53 -0700
changeset 30046 cf2c86e1819e
parent 23010 6dadb192ad81
child 32991 b27c76b82713
permissions -rw-r--r--
8078334: Mark regression tests using randomness Reviewed-by: xuelei, alanb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
23010
6dadb192ad81 8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents: 18818
diff changeset
     2
 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
 * @test
18818
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    26
 * @bug     4904067 7129185
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 * @summary Unit test for Collections.checkedSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 * @author  Josh Bloch
18818
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    29
 * @run testng CheckedSetBash
30046
cf2c86e1819e 8078334: Mark regression tests using randomness
darcy
parents: 23010
diff changeset
    30
 * @key randomness
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
import java.util.*;
18818
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    34
import java.util.function.Supplier;
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    35
import org.testng.annotations.Test;
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    36
import org.testng.annotations.DataProvider;
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    37
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    38
import static org.testng.Assert.fail;
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    39
import static org.testng.Assert.assertTrue;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
public class CheckedSetBash {
18818
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    42
    static final int numItr = 100;
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    43
    static final int setSize = 100;
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    44
    static final Random rnd = new Random();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
18818
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    46
    @Test(dataProvider = "Supplier<Set<Integer>>")
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    47
    public static void testCheckedSet(String description, Supplier<Set<Integer>> supplier) {
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    48
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    49
        Set<Integer> s1 = supplier.get();
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    50
        assertTrue(s1.isEmpty());
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    51
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    52
        AddRandoms(s1, setSize);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
18818
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    54
        Set<Integer> s2 = supplier.get();
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    55
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    56
        assertTrue(s2.isEmpty());
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    57
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    58
        AddRandoms(s2, setSize);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
18818
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    60
        Set<Integer> intersection = clone(s1, supplier);
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    61
        intersection.retainAll(s2);
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    62
        Set<Integer> diff1 = clone(s1, supplier); diff1.removeAll(s2);
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    63
        Set<Integer> diff2 = clone(s2, supplier); diff2.removeAll(s1);
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    64
        Set<Integer> union = clone(s1, supplier); union.addAll(s2);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
18818
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    66
        if (diff1.removeAll(diff2))
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    67
            fail("Set algebra identity 2 failed");
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    68
        if (diff1.removeAll(intersection))
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    69
            fail("Set algebra identity 3 failed");
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    70
        if (diff2.removeAll(diff1))
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    71
            fail("Set algebra identity 4 failed");
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    72
        if (diff2.removeAll(intersection))
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    73
            fail("Set algebra identity 5 failed");
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    74
        if (intersection.removeAll(diff1))
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    75
            fail("Set algebra identity 6 failed");
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    76
        if (intersection.removeAll(diff1))
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    77
            fail("Set algebra identity 7 failed");
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
18818
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    79
        intersection.addAll(diff1); intersection.addAll(diff2);
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    80
        if (!intersection.equals(union))
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    81
            fail("Set algebra identity 1 failed");
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
18818
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    83
        if (new HashSet(union).hashCode() != union.hashCode())
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    84
            fail("Incorrect hashCode computation.");
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
18818
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    86
        Iterator e = union.iterator();
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    87
        while (e.hasNext())
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    88
            if (!intersection.remove(e.next()))
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    89
                fail("Couldn't remove element from copy.");
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    90
        if (!intersection.isEmpty())
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    91
            fail("Copy nonempty after deleting all elements.");
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
18818
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    93
        e = union.iterator();
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    94
        while (e.hasNext()) {
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    95
            Object o = e.next();
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    96
            if (!union.contains(o))
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    97
                fail("Set doesn't contain one of its elements.");
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    98
            e.remove();
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
    99
            if (union.contains(o))
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   100
                fail("Set contains element after deletion.");
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   101
        }
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   102
        if (!union.isEmpty())
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   103
            fail("Set nonempty after deleting all elements.");
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
18818
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   105
        s1.clear();
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   106
        if (!s1.isEmpty())
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   107
            fail("Set nonempty after clear.");
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
    // Done inefficiently so as to exercise toArray
18818
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   111
    static <T> Set<T> clone(Set<T> s, Supplier<Set<T>> supplier) {
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   112
        Set<T> clone = supplier.get();
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   113
        List<T> arrayList = Arrays.asList((T[]) s.toArray());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        clone.addAll(arrayList);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
        if (!s.equals(clone))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
            fail("Set not equal to copy.");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
        if (!s.containsAll(clone))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
            fail("Set does not contain copy.");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
        if (!clone.containsAll(s))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
            fail("Copy does not contain set.");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
        return clone;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
    static void AddRandoms(Set s, int n) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
        for (int i=0; i<n; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
            int r = rnd.nextInt() % n;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
            Integer e = new Integer(r < 0 ? -r : r);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
            int preSize = s.size();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
            boolean prePresent = s.contains(e);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
            boolean added = s.add(e);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
            if (!s.contains(e))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
                fail ("Element not present after addition.");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
            if (added == prePresent)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
                fail ("added == alreadyPresent");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
            int postSize = s.size();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
            if (added && preSize == postSize)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
                fail ("Add returned true, but size didn't change.");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
            if (!added && preSize != postSize)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
                fail ("Add returned false, but size changed.");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
18818
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   144
    @DataProvider(name = "Supplier<Set<Integer>>", parallel = true)
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   145
    public static Iterator<Object[]> navigableSetsProvider() {
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   146
        ArrayList<Object[]> iters = new ArrayList<>(makeCheckedSets());
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   147
        iters.ensureCapacity(numItr * iters.size());
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   148
        for(int each=1; each < numItr; each++) {
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   149
            iters.addAll( makeCheckedSets());
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   150
        }
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   151
        return iters.iterator();
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   152
    }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
18818
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   154
    public static Collection<Object[]> makeCheckedSets() {
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   155
        return Arrays.asList(
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   156
            new Object[]{"Collections.checkedSet(HashSet)",
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   157
                (Supplier) () -> {return Collections.checkedSet(new HashSet(), Integer.class);}},
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   158
            new Object[]{"Collections.checkedSet(TreeSet(reverseOrder)",
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   159
                (Supplier) () -> {return Collections.checkedSet(new TreeSet(Collections.reverseOrder()), Integer.class);}},
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   160
            new Object[]{"Collections.checkedSet(TreeSet).descendingSet()",
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   161
                (Supplier) () -> {return Collections.checkedSet(new TreeSet().descendingSet(), Integer.class);}},
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   162
            new Object[]{"Collections.checkedNavigableSet(TreeSet)",
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   163
                (Supplier) () -> {return Collections.checkedNavigableSet(new TreeSet(), Integer.class);}},
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   164
            new Object[]{"Collections.checkedNavigableSet(TreeSet(reverseOrder)",
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   165
                (Supplier) () -> {return Collections.checkedNavigableSet(new TreeSet(Collections.reverseOrder()), Integer.class);}},
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   166
            new Object[]{"Collections.checkedNavigableSet().descendingSet()",
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   167
                (Supplier) () -> {return Collections.checkedNavigableSet(new TreeSet().descendingSet(), Integer.class);}}
a9ceff754226 7129185: Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}
mduigou
parents: 5506
diff changeset
   168
            );
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
}