1 /*
2 * Copyright (C) 2014 The Android Open Source Project
3 * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. Oracle designates this
9 * particular file as subject to the "Classpath" exception as provided
10 * by Oracle in the LICENSE file that accompanied this code.
11 *
12 * This code is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * version 2 for more details (a copy is included in the LICENSE file that
16 * accompanied this code).
17 *
18 * You should have received a copy of the GNU General Public License version
19 * 2 along with this work; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 * or visit www.oracle.com if you need additional information or have any
24 * questions.
25 */
26
27
28 package java.util;
29
30 @SuppressWarnings({"unchecked", "deprecation", "all"})
31 public class Collections {
32
Collections()33 Collections() { throw new RuntimeException("Stub!"); }
34
sort(java.util.List<T> list)35 public static <T extends java.lang.Comparable<? super T>> void sort(java.util.List<T> list) { throw new RuntimeException("Stub!"); }
36
sort(java.util.List<T> list, java.util.Comparator<? super T> c)37 public static <T> void sort(java.util.List<T> list, java.util.Comparator<? super T> c) { throw new RuntimeException("Stub!"); }
38
binarySearch(java.util.List<? extends java.lang.Comparable<? super T>> list, T key)39 public static <T> int binarySearch(java.util.List<? extends java.lang.Comparable<? super T>> list, T key) { throw new RuntimeException("Stub!"); }
40
binarySearch(java.util.List<? extends T> list, T key, java.util.Comparator<? super T> c)41 public static <T> int binarySearch(java.util.List<? extends T> list, T key, java.util.Comparator<? super T> c) { throw new RuntimeException("Stub!"); }
42
reverse(java.util.List<?> list)43 public static void reverse(java.util.List<?> list) { throw new RuntimeException("Stub!"); }
44
shuffle(java.util.List<?> list)45 public static void shuffle(java.util.List<?> list) { throw new RuntimeException("Stub!"); }
46
shuffle(java.util.List<?> list, java.util.Random rnd)47 public static void shuffle(java.util.List<?> list, java.util.Random rnd) { throw new RuntimeException("Stub!"); }
48
49 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
shuffle(java.util.List<?> list, java.util.random.RandomGenerator rnd)50 public static void shuffle(java.util.List<?> list, java.util.random.RandomGenerator rnd) { throw new RuntimeException("Stub!"); }
51
swap(java.util.List<?> list, int i, int j)52 public static void swap(java.util.List<?> list, int i, int j) { throw new RuntimeException("Stub!"); }
53
fill(java.util.List<? super T> list, T obj)54 public static <T> void fill(java.util.List<? super T> list, T obj) { throw new RuntimeException("Stub!"); }
55
copy(java.util.List<? super T> dest, java.util.List<? extends T> src)56 public static <T> void copy(java.util.List<? super T> dest, java.util.List<? extends T> src) { throw new RuntimeException("Stub!"); }
57
min(java.util.Collection<? extends T> coll)58 public static <T extends java.lang.Object & java.lang.Comparable<? super T>> T min(java.util.Collection<? extends T> coll) { throw new RuntimeException("Stub!"); }
59
min(java.util.Collection<? extends T> coll, java.util.Comparator<? super T> comp)60 public static <T> T min(java.util.Collection<? extends T> coll, java.util.Comparator<? super T> comp) { throw new RuntimeException("Stub!"); }
61
max(java.util.Collection<? extends T> coll)62 public static <T extends java.lang.Object & java.lang.Comparable<? super T>> T max(java.util.Collection<? extends T> coll) { throw new RuntimeException("Stub!"); }
63
max(java.util.Collection<? extends T> coll, java.util.Comparator<? super T> comp)64 public static <T> T max(java.util.Collection<? extends T> coll, java.util.Comparator<? super T> comp) { throw new RuntimeException("Stub!"); }
65
rotate(java.util.List<?> list, int distance)66 public static void rotate(java.util.List<?> list, int distance) { throw new RuntimeException("Stub!"); }
67
replaceAll(java.util.List<T> list, T oldVal, T newVal)68 public static <T> boolean replaceAll(java.util.List<T> list, T oldVal, T newVal) { throw new RuntimeException("Stub!"); }
69
indexOfSubList(java.util.List<?> source, java.util.List<?> target)70 public static int indexOfSubList(java.util.List<?> source, java.util.List<?> target) { throw new RuntimeException("Stub!"); }
71
lastIndexOfSubList(java.util.List<?> source, java.util.List<?> target)72 public static int lastIndexOfSubList(java.util.List<?> source, java.util.List<?> target) { throw new RuntimeException("Stub!"); }
73
unmodifiableCollection(java.util.Collection<? extends T> c)74 public static <T> java.util.Collection<T> unmodifiableCollection(java.util.Collection<? extends T> c) { throw new RuntimeException("Stub!"); }
75
76 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
unmodifiableSequencedCollection(java.util.SequencedCollection<? extends T> c)77 public static <T> java.util.SequencedCollection<T> unmodifiableSequencedCollection(java.util.SequencedCollection<? extends T> c) { throw new RuntimeException("Stub!"); }
78
unmodifiableSet(java.util.Set<? extends T> s)79 public static <T> java.util.Set<T> unmodifiableSet(java.util.Set<? extends T> s) { throw new RuntimeException("Stub!"); }
80
81 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
unmodifiableSequencedSet(java.util.SequencedSet<? extends T> s)82 public static <T> java.util.SequencedSet<T> unmodifiableSequencedSet(java.util.SequencedSet<? extends T> s) { throw new RuntimeException("Stub!"); }
83
unmodifiableSortedSet(java.util.SortedSet<T> s)84 public static <T> java.util.SortedSet<T> unmodifiableSortedSet(java.util.SortedSet<T> s) { throw new RuntimeException("Stub!"); }
85
unmodifiableNavigableSet(java.util.NavigableSet<T> s)86 public static <T> java.util.NavigableSet<T> unmodifiableNavigableSet(java.util.NavigableSet<T> s) { throw new RuntimeException("Stub!"); }
87
unmodifiableList(java.util.List<? extends T> list)88 public static <T> java.util.List<T> unmodifiableList(java.util.List<? extends T> list) { throw new RuntimeException("Stub!"); }
89
unmodifiableMap(java.util.Map<? extends K,? extends V> m)90 public static <K, V> java.util.Map<K,V> unmodifiableMap(java.util.Map<? extends K,? extends V> m) { throw new RuntimeException("Stub!"); }
91
92 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
unmodifiableSequencedMap(java.util.SequencedMap<? extends K,? extends V> m)93 public static <K, V> java.util.SequencedMap<K,V> unmodifiableSequencedMap(java.util.SequencedMap<? extends K,? extends V> m) { throw new RuntimeException("Stub!"); }
94
unmodifiableSortedMap(java.util.SortedMap<K,? extends V> m)95 public static <K, V> java.util.SortedMap<K,V> unmodifiableSortedMap(java.util.SortedMap<K,? extends V> m) { throw new RuntimeException("Stub!"); }
96
unmodifiableNavigableMap(java.util.NavigableMap<K,? extends V> m)97 public static <K, V> java.util.NavigableMap<K,V> unmodifiableNavigableMap(java.util.NavigableMap<K,? extends V> m) { throw new RuntimeException("Stub!"); }
98
synchronizedCollection(java.util.Collection<T> c)99 public static <T> java.util.Collection<T> synchronizedCollection(java.util.Collection<T> c) { throw new RuntimeException("Stub!"); }
100
synchronizedSet(java.util.Set<T> s)101 public static <T> java.util.Set<T> synchronizedSet(java.util.Set<T> s) { throw new RuntimeException("Stub!"); }
102
synchronizedSortedSet(java.util.SortedSet<T> s)103 public static <T> java.util.SortedSet<T> synchronizedSortedSet(java.util.SortedSet<T> s) { throw new RuntimeException("Stub!"); }
104
synchronizedNavigableSet(java.util.NavigableSet<T> s)105 public static <T> java.util.NavigableSet<T> synchronizedNavigableSet(java.util.NavigableSet<T> s) { throw new RuntimeException("Stub!"); }
106
synchronizedList(java.util.List<T> list)107 public static <T> java.util.List<T> synchronizedList(java.util.List<T> list) { throw new RuntimeException("Stub!"); }
108
synchronizedMap(java.util.Map<K,V> m)109 public static <K, V> java.util.Map<K,V> synchronizedMap(java.util.Map<K,V> m) { throw new RuntimeException("Stub!"); }
110
synchronizedSortedMap(java.util.SortedMap<K,V> m)111 public static <K, V> java.util.SortedMap<K,V> synchronizedSortedMap(java.util.SortedMap<K,V> m) { throw new RuntimeException("Stub!"); }
112
synchronizedNavigableMap(java.util.NavigableMap<K,V> m)113 public static <K, V> java.util.NavigableMap<K,V> synchronizedNavigableMap(java.util.NavigableMap<K,V> m) { throw new RuntimeException("Stub!"); }
114
checkedCollection(java.util.Collection<E> c, java.lang.Class<E> type)115 public static <E> java.util.Collection<E> checkedCollection(java.util.Collection<E> c, java.lang.Class<E> type) { throw new RuntimeException("Stub!"); }
116
checkedQueue(java.util.Queue<E> queue, java.lang.Class<E> type)117 public static <E> java.util.Queue<E> checkedQueue(java.util.Queue<E> queue, java.lang.Class<E> type) { throw new RuntimeException("Stub!"); }
118
checkedSet(java.util.Set<E> s, java.lang.Class<E> type)119 public static <E> java.util.Set<E> checkedSet(java.util.Set<E> s, java.lang.Class<E> type) { throw new RuntimeException("Stub!"); }
120
checkedSortedSet(java.util.SortedSet<E> s, java.lang.Class<E> type)121 public static <E> java.util.SortedSet<E> checkedSortedSet(java.util.SortedSet<E> s, java.lang.Class<E> type) { throw new RuntimeException("Stub!"); }
122
checkedNavigableSet(java.util.NavigableSet<E> s, java.lang.Class<E> type)123 public static <E> java.util.NavigableSet<E> checkedNavigableSet(java.util.NavigableSet<E> s, java.lang.Class<E> type) { throw new RuntimeException("Stub!"); }
124
checkedList(java.util.List<E> list, java.lang.Class<E> type)125 public static <E> java.util.List<E> checkedList(java.util.List<E> list, java.lang.Class<E> type) { throw new RuntimeException("Stub!"); }
126
checkedMap(java.util.Map<K,V> m, java.lang.Class<K> keyType, java.lang.Class<V> valueType)127 public static <K, V> java.util.Map<K,V> checkedMap(java.util.Map<K,V> m, java.lang.Class<K> keyType, java.lang.Class<V> valueType) { throw new RuntimeException("Stub!"); }
128
checkedSortedMap(java.util.SortedMap<K,V> m, java.lang.Class<K> keyType, java.lang.Class<V> valueType)129 public static <K, V> java.util.SortedMap<K,V> checkedSortedMap(java.util.SortedMap<K,V> m, java.lang.Class<K> keyType, java.lang.Class<V> valueType) { throw new RuntimeException("Stub!"); }
130
checkedNavigableMap(java.util.NavigableMap<K,V> m, java.lang.Class<K> keyType, java.lang.Class<V> valueType)131 public static <K, V> java.util.NavigableMap<K,V> checkedNavigableMap(java.util.NavigableMap<K,V> m, java.lang.Class<K> keyType, java.lang.Class<V> valueType) { throw new RuntimeException("Stub!"); }
132
emptyIterator()133 public static <T> java.util.Iterator<T> emptyIterator() { throw new RuntimeException("Stub!"); }
134
emptyListIterator()135 public static <T> java.util.ListIterator<T> emptyListIterator() { throw new RuntimeException("Stub!"); }
136
emptyEnumeration()137 public static <T> java.util.Enumeration<T> emptyEnumeration() { throw new RuntimeException("Stub!"); }
138
emptySet()139 public static final <T> java.util.Set<T> emptySet() { throw new RuntimeException("Stub!"); }
140
emptySortedSet()141 public static <E> java.util.SortedSet<E> emptySortedSet() { throw new RuntimeException("Stub!"); }
142
emptyNavigableSet()143 public static <E> java.util.NavigableSet<E> emptyNavigableSet() { throw new RuntimeException("Stub!"); }
144
emptyList()145 public static final <T> java.util.List<T> emptyList() { throw new RuntimeException("Stub!"); }
146
emptyMap()147 public static final <K, V> java.util.Map<K,V> emptyMap() { throw new RuntimeException("Stub!"); }
148
emptySortedMap()149 public static final <K, V> java.util.SortedMap<K,V> emptySortedMap() { throw new RuntimeException("Stub!"); }
150
emptyNavigableMap()151 public static final <K, V> java.util.NavigableMap<K,V> emptyNavigableMap() { throw new RuntimeException("Stub!"); }
152
singleton(T o)153 public static <T> java.util.Set<T> singleton(T o) { throw new RuntimeException("Stub!"); }
154
singletonList(T o)155 public static <T> java.util.List<T> singletonList(T o) { throw new RuntimeException("Stub!"); }
156
singletonMap(K key, V value)157 public static <K, V> java.util.Map<K,V> singletonMap(K key, V value) { throw new RuntimeException("Stub!"); }
158
nCopies(int n, T o)159 public static <T> java.util.List<T> nCopies(int n, T o) { throw new RuntimeException("Stub!"); }
160
reverseOrder()161 public static <T> java.util.Comparator<T> reverseOrder() { throw new RuntimeException("Stub!"); }
162
reverseOrder(java.util.Comparator<T> cmp)163 public static <T> java.util.Comparator<T> reverseOrder(java.util.Comparator<T> cmp) { throw new RuntimeException("Stub!"); }
164
enumeration(java.util.Collection<T> c)165 public static <T> java.util.Enumeration<T> enumeration(java.util.Collection<T> c) { throw new RuntimeException("Stub!"); }
166
list(java.util.Enumeration<T> e)167 public static <T> java.util.ArrayList<T> list(java.util.Enumeration<T> e) { throw new RuntimeException("Stub!"); }
168
frequency(java.util.Collection<?> c, java.lang.Object o)169 public static int frequency(java.util.Collection<?> c, java.lang.Object o) { throw new RuntimeException("Stub!"); }
170
disjoint(java.util.Collection<?> c1, java.util.Collection<?> c2)171 public static boolean disjoint(java.util.Collection<?> c1, java.util.Collection<?> c2) { throw new RuntimeException("Stub!"); }
172
173 @java.lang.SafeVarargs
addAll(java.util.Collection<? super T> c, T... elements)174 public static <T> boolean addAll(java.util.Collection<? super T> c, T... elements) { throw new RuntimeException("Stub!"); }
175
newSetFromMap(java.util.Map<E,java.lang.Boolean> map)176 public static <E> java.util.Set<E> newSetFromMap(java.util.Map<E,java.lang.Boolean> map) { throw new RuntimeException("Stub!"); }
177
178 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
newSequencedSetFromMap(java.util.SequencedMap<E,java.lang.Boolean> map)179 public static <E> java.util.SequencedSet<E> newSequencedSetFromMap(java.util.SequencedMap<E,java.lang.Boolean> map) { throw new RuntimeException("Stub!"); }
180
asLifoQueue(java.util.Deque<T> deque)181 public static <T> java.util.Queue<T> asLifoQueue(java.util.Deque<T> deque) { throw new RuntimeException("Stub!"); }
182
183 public static final java.util.List EMPTY_LIST;
184 static { EMPTY_LIST = null; }
185
186 public static final java.util.Map EMPTY_MAP;
187 static { EMPTY_MAP = null; }
188
189 public static final java.util.Set EMPTY_SET;
190 static { EMPTY_SET = null; }
191 }
192
193