Home | History | Annotate | Download | only in util

Lines Matching defs:Collections

24 import java.util.Collections;
53 * java.util.Collections#binarySearch(java.util.List,
60 Collections.sort(lst, null);
61 int index = Collections.binarySearch(lst, new Integer(2), null);
73 Collections.binarySearch(ll, new Integer(10), null);
81 * java.util.Collections#binarySearch(java.util.List,
88 assertEquals(-1, Collections.binarySearch(localList, new Object()));
91 Collections.binarySearch(localList, new Integer(1));
106 Collections.binarySearch(ll, new Integer(10));
114 * java.util.Collections#rotate(java.util.List, int)
118 Collections.rotate(new ArrayList<Object>(), 25);
128 Collections.rotate(list, Integer.MIN_VALUE);
142 * java.util.Collections#synchronizedCollection(java.util.Collection)
147 Collections.synchronizedCollection(null);
155 * java.util.Collections#synchronizedSortedMap(java.util.SortedMap)
160 Collections.synchronizedSortedMap(null);
168 * java.util.Collections#synchronizedMap(java.util.Map)
173 Collections.synchronizedMap(null);
181 * java.util.Collections#synchronizedSet(java.util.Set)
186 Collections.synchronizedSet(null);
194 * java.util.Collections#synchronizedSortedSet(java.util.SortedSet)
199 Collections.synchronizedSortedSet(null);
207 * java.util.Collections#unmodifiableCollection(java.util.Collection)
212 Collections.unmodifiableCollection(null);
220 * java.util.Collections#unmodifiableMap(java.util.Map)
225 Collections.unmodifiableMap(null);
233 * java.util.Collections#unmodifiableSet(java.util.Set)
238 Collections.unmodifiableSet(null);
246 * java.util.Collections#unmodifiableSortedMap(java.util.SortedMap)
251 Collections.unmodifiableSortedMap(null);
259 * java.util.Collections#unmodifiableSortedSet(java.util.SortedSet)
264 Collections.unmodifiableSortedSet(null);
272 * java.util.Collections#frequency(java.util.Collection,Object)
276 Collections.frequency(null, null);
283 Collections.frequency(strings, "1"));
285 assertEquals("Assert 2: did not find one \"2\" strings", 1, Collections
289 Collections.frequency(strings, "3"));
292 Collections.frequency(strings, null));
297 assertEquals("Assert 5: did not find one Integer(1)", 1, Collections
300 assertEquals("Assert 6: did not find one Long(1)", 1, Collections
304 Collections.frequency(objects, null));
308 * java.util.Collections#reverseOrder()
311 Comparator<String> roc = Collections.reverseOrder();
325 * java.util.Collections#reverseOrder(java.util.Comparator)
328 Comparator<String> roc = Collections
341 roc = Collections.reverseOrder(null);
464 assertFalse(Collections.addAll(l, new Object[] {}));
466 assertTrue(Collections.addAll(l, new Object[] { new Integer(1),
473 Collections.addAll(null,new Object[] { new Integer(1),
482 Collections.addAll(c, new Object[] { new Integer(1),
492 Collections.addAll(c, new String[] { "String",
500 Collections.addAll(c, new String[] { "String",
507 Collections.addAll(c, new String[] { "String",
521 Collections.addAll(c1, arr1);
522 Collections.addAll(c2, arr2);
523 assertTrue(Collections.disjoint(c1, c2));
525 assertFalse(Collections.disjoint(c1, c2));
529 Collections.addAll(c1, arr1);
530 Collections.addAll(c2, arr2);
531 assertTrue(Collections.disjoint(c1, c2));
533 assertFalse(Collections.disjoint(c1, c2));
537 Collections.addAll(c1, arr1);
538 Collections.addAll(c2, arr2);
539 assertTrue(Collections.disjoint(c1, c2));
541 assertFalse(Collections.disjoint(c1, c2));
545 Collections.addAll(c1, arr1);
546 Collections.addAll(c2, arr2);
547 assertTrue(Collections.disjoint(c1, c2));
549 assertFalse(Collections.disjoint(c1, c2));
553 Collections.addAll(c1, arr1);
554 Collections.addAll(c2, arr2);
555 assertTrue(Collections.disjoint(c1, c2));
557 assertFalse(Collections.disjoint(c1, c2));
561 Collections.addAll(c1, arr1);
562 Collections.addAll(c2, arr2);
563 assertTrue(Collections.disjoint(c1, c2));
565 assertFalse(Collections.disjoint(c1, c2));
568 Collections.disjoint(c1, null);
575 Collections.disjoint(null, c2);
583 * java.util.Collections.EmptyList#readResolve()
586 SerializationTest.verifySelf(Collections.EMPTY_LIST, comparator);
590 * java.util.Collections.EmptyMap#readResolve()
593 SerializationTest.verifySelf(Collections.EMPTY_MAP, comparator);
597 * java.util.Collections.EmptySet#readResolve()
600 SerializationTest.verifySelf(Collections.EMPTY_SET, comparator);
612 assertSerialized(Collections.checkedCollection(
613 Collections.<String>emptySet(), String.class), s, false);
628 assertSerialized(Collections.checkedList(new ArrayList<String>(), String.class), s, true);
641 assertSerialized(Collections.checkedList(new LinkedList<String>(), String.class), s, true);
654 assertSerialized(Collections.checkedSet(new HashSet<String>(), String.class), s, true);
667 assertSerialized(Collections.checkedMap(
683 assertSerialized(Collections.checkedSortedSet(new TreeSet<String>(), String.class), s, true);
699 assertSerialized(Collections.checkedSortedMap(
749 Collection c = Collections.checkedCollection(al, Integer.class);
764 List l = Collections.checkedList(al, Integer.class);
779 Map m = Collections.checkedMap(hm, Integer.class, String.class);
802 Set s = Collections.checkedSet(hs, Integer.class);
817 SortedMap sm = Collections.checkedSortedMap(tm, Integer.class, String.class);
840 SortedSet ss = Collections.checkedSortedSet(ts, Integer.class);
853 List<String> ls = Collections.emptyList();
854 List<Integer> li = Collections.emptyList();
857 assertTrue(li.equals(Collections.EMPTY_LIST));
861 Map<Integer, String> mis = Collections.emptyMap();
862 Map<String, Integer> msi = Collections.emptyMap();
865 assertTrue(msi.equals(Collections.EMPTY_MAP));
869 Set<String> ss = Collections.emptySet();
870 Set<Integer> si = Collections.emptySet();
873 assertTrue(si.equals(Collections.EMPTY_SET));