equal
deleted
inserted
replaced
27 * @summary Test empty iterators, enumerations, and collections |
27 * @summary Test empty iterators, enumerations, and collections |
28 */ |
28 */ |
29 |
29 |
30 import static java.util.Collections.*; |
30 import static java.util.Collections.*; |
31 import java.util.*; |
31 import java.util.*; |
|
32 import java.util.concurrent.SynchronousQueue; |
32 |
33 |
33 public class EmptyIterator { |
34 public class EmptyIterator { |
34 |
35 |
35 void test(String[] args) throws Throwable { |
36 void test(String[] args) throws Throwable { |
36 testEmptyCollection(emptyList()); |
37 testEmptyCollection(emptyList()); |
37 testEmptyCollection(emptySet()); |
38 testEmptyCollection(emptySet()); |
38 |
39 testEmptyCollection(new SynchronousQueue<Object>()); |
39 testEmptyMap(emptyMap()); |
40 testEmptyMap(emptyMap()); |
40 |
41 |
41 Hashtable<?,?> emptyTable = new Hashtable<>(); |
42 Hashtable<?,?> emptyTable = new Hashtable<>(); |
42 testEmptyEnumeration(emptyTable.keys()); |
43 testEmptyEnumeration(emptyTable.keys()); |
43 testEmptyEnumeration(emptyTable.elements()); |
44 testEmptyEnumeration(emptyTable.elements()); |