public enum CollectionUtils extends Enum<CollectionUtils>
Modifier and Type | Method and Description |
---|---|
static boolean |
isEmpty(Object[] array)
Checks if the given array contains any elements.
|
static <T> List<T> |
rotate(List<T> list,
int distance)
Return a rotated view of the given list with the given distance.
|
static void |
sort(org.apache.lucene.util.BytesRefArray bytes,
int[] indices) |
static void |
sort(double[] array,
int len) |
static void |
sort(com.carrotsearch.hppc.DoubleArrayList list) |
static void |
sort(float[] array,
int len) |
static void |
sort(com.carrotsearch.hppc.FloatArrayList list) |
static void |
sort(long[] array,
int len) |
static void |
sort(com.carrotsearch.hppc.LongArrayList list) |
static void |
sort(com.carrotsearch.hppc.ObjectArrayList<byte[]> array) |
static int |
sortAndDedup(org.apache.lucene.util.BytesRefArray bytes,
int[] indices) |
static int |
sortAndDedup(double[] array,
int len)
Sort and deduplicate values in-place, then return the unique element count.
|
static void |
sortAndDedup(com.carrotsearch.hppc.DoubleArrayList list) |
static int |
sortAndDedup(float[] array,
int len)
Sort and deduplicate values in-place, then return the unique element count.
|
static void |
sortAndDedup(com.carrotsearch.hppc.FloatArrayList list) |
static int |
sortAndDedup(long[] array,
int len)
Sort and deduplicate values in-place, then return the unique element count.
|
static void |
sortAndDedup(com.carrotsearch.hppc.LongArrayList list) |
static void |
sortAndDedup(com.carrotsearch.hppc.ObjectArrayList<byte[]> array) |
static CollectionUtils |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CollectionUtils[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static CollectionUtils[] values()
for (CollectionUtils c : CollectionUtils.values()) System.out.println(c);
public static CollectionUtils valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static void sort(com.carrotsearch.hppc.LongArrayList list)
public static void sort(long[] array, int len)
public static void sortAndDedup(com.carrotsearch.hppc.LongArrayList list)
public static int sortAndDedup(long[] array, int len)
public static void sort(com.carrotsearch.hppc.FloatArrayList list)
public static void sort(float[] array, int len)
public static void sortAndDedup(com.carrotsearch.hppc.FloatArrayList list)
public static int sortAndDedup(float[] array, int len)
public static void sort(com.carrotsearch.hppc.DoubleArrayList list)
public static void sort(double[] array, int len)
public static void sortAndDedup(com.carrotsearch.hppc.DoubleArrayList list)
public static int sortAndDedup(double[] array, int len)
public static boolean isEmpty(Object[] array)
array
- The array to checkpublic static <T> List<T> rotate(List<T> list, int distance)
public static void sortAndDedup(com.carrotsearch.hppc.ObjectArrayList<byte[]> array)
public static void sort(com.carrotsearch.hppc.ObjectArrayList<byte[]> array)
public static void sort(org.apache.lucene.util.BytesRefArray bytes, int[] indices)
public static int sortAndDedup(org.apache.lucene.util.BytesRefArray bytes, int[] indices)
Copyright © 2009–2015. All rights reserved.