Package org.teavm.classlib.java.util
Class TCollections
java.lang.Object
org.teavm.classlib.java.lang.TObject
org.teavm.classlib.java.util.TCollections
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> boolean
addAll(TCollection<? super T> c, T... elements)
static <T> int
binarySearch(TList<? extends TComparable<? super T>> list, T key)
static <T> int
binarySearch(TList<? extends T> list, T key, TComparator<? super T> c)
static <E> TCollection<E>
checkedCollection(TCollection<E> c, Class<E> type)
static <E> TList<E>
checkedList(TList<E> list, Class<E> type)
static <K, V> TMap<K,V>
checkedMap(TMap<K,V> m, Class<K> keyType, Class<V> valueType)
static <E> TSet<E>
checkedSet(TSet<E> s, Class<E> type)
static <T> void
static boolean
disjoint(TCollection<?> c1, TCollection<?> c2)
static <T> TEnumeration<T>
static <T> TIterator<T>
static <T> TList<T>
static <T> TListIterator<T>
static <K, V> TMap<K,V>
emptyMap()
static <T> TSet<T>
emptySet()
static <T> TEnumeration<T>
enumeration(TCollection<T> c)
static <T> void
static int
frequency(TCollection<?> c, Object o)
static int
indexOfSubList(TList<?> source, TList<?> target)
static int
lastIndexOfSubList(TList<?> source, TList<?> target)
static <T> TArrayList<T>
list(TEnumeration<T> e)
static <T extends Object & TComparable<? super T>>
Tmax(TCollection<? extends T> coll)
static <T> T
max(TCollection<? extends T> coll, TComparator<? super T> comp)
static <T extends Object & TComparable<? super T>>
Tmin(TCollection<? extends T> coll)
static <T> T
min(TCollection<? extends T> coll, TComparator<? super T> comp)
static <T> TList<T>
nCopies(int n, T o)
static <E> TSet<E>
newSetFromMap(TMap<E,TBoolean> map)
static <T> boolean
replaceAll(TList<T> list, T oldVal, T newVal)
static void
static <T> TComparator<T>
static <T> TComparator<T>
reverseOrder(TComparator<T> cmp)
static void
static void
static void
static <T> TSet<T>
singleton(T o)
static <T> TList<T>
singletonList(T o)
static <K, V> TMap<K,V>
singletonMap(K key, V value)
static <T extends TComparable<? super T>>
voidstatic <T> void
sort(TList<T> list, TComparator<? super T> c)
static void
static <T> TCollection<T>
static <T> TList<T>
synchronizedList(TList<T> list)
static <K, V> TMap<K,V>
synchronizedMap(TMap<K,V> m)
static <T> TSet<T>
synchronizedSet(TSet<T> s)
static <T> TCollection<T>
unmodifiableCollection(TCollection<? extends T> c)
static <T> TList<T>
unmodifiableList(TList<? extends T> list)
static <K, V> TMap<K,V>
unmodifiableMap(TMap<? extends K,? extends V> m)
static <T> TSet<T>
unmodifiableSet(TSet<? extends T> s)
-
Field Details
-
EMPTY_SET
-
EMPTY_MAP
-
EMPTY_LIST
-
-
Constructor Details
-
TCollections
public TCollections()
-
-
Method Details
-
emptyIterator
-
emptyListIterator
-
emptyList
-
emptyEnumeration
-
emptySet
-
emptyMap
-
singletonList
-
singleton
-
singletonMap
-
unmodifiableList
-
nCopies
-
swap
-
sort
-
sort
-
reverse
-
binarySearch
-
binarySearch
-
shuffle
-
shuffle
-
fill
-
copy
-
min
-
min
-
max
-
max
-
rotate
-
replaceAll
-
indexOfSubList
-
lastIndexOfSubList
-
unmodifiableCollection
-
unmodifiableSet
-
unmodifiableMap
-
synchronizedCollection
-
synchronizedSet
-
synchronizedList
-
synchronizedMap
-
reverseOrder
-
reverseOrder
-
enumeration
-
list
-
checkedCollection
-
checkedSet
-
checkedList
-
checkedMap
-
frequency
-
disjoint
-
addAll
-
newSetFromMap
-