public final class CollectionUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <E> FastCollection<E> |
emptyFastCollection()
Deprecated.
Just use a standard empty collection.
|
static <E> Iterable<E> |
fast(Iterable<E> iter)
Deprecated.
Fast iteration has gone away. This method now does nothing.
|
static <E> FastIterable<E> |
fastFilterAndLimit(Iterable<E> iter,
Predicate<? super E> pred,
int limit)
Deprecated.
Fast iteration has gone away.
|
static IntList |
interval(int from,
int to)
Create an
IntList that contains all numbers in a specified interval. |
static <E> ObjectCollection<E> |
objectCollection(Collection<E> objects)
Wrap a
Collection in an ObjectCollection. |
static <T> List<T> |
repeat(T obj,
int n)
Return a list that repeats a single object multiple times.
|
@Deprecated public static <E> Iterable<E> fast(Iterable<E> iter)
E - The type of object to iterate.iter - An iterable to wrapfastIterator()
method, like is present in Long2DoubleMap.FastEntrySet.@Deprecated public static <E> FastIterable<E> fastFilterAndLimit(Iterable<E> iter, Predicate<? super E> pred, int limit)
E - The type of data in the iterable.iter - The iterable to filter and limit.pred - The predicate for filtering.limit - The maximum number of items to return (negative for unlimited).public static <E> ObjectCollection<E> objectCollection(Collection<E> objects)
Collection in an ObjectCollection.E - The type of objects.objects - The collection of objects.ObjectCollection.public static <T> List<T> repeat(T obj, int n)
T - The type of list elements.obj - The object.n - The size of the list.@Deprecated public static <E> FastCollection<E> emptyFastCollection()
E - The type of fast collection.