public final class N extends Object
Note: This class includes codes copied from Apache Commons Lang, Google Guava and other open source projects under the Apache License 2.0. The methods copied from other libraries/frameworks/projects may be modified in this class.
ClassN is a general java utility class. It provides the most daily used operations for Object/primitive types/String/Array/Collection/Map/Entity...:
When to throw exception? It's designed to avoid throwing any unnecessary
exception if the contract defined by method is not broken. for example, if
user tries to reverse a null or empty String. the input String will be
returned. But exception will be thrown if trying to repeat/swap a null or
empty string or operate Array/Collection by adding/removing... | Modifier and Type | Field and Description |
|---|---|
static int |
CPU_CORES |
static String |
ELEMENT_SEPARATOR |
static char[] |
ELEMENT_SEPARATOR_CHAR_ARRAY |
static boolean[] |
EMPTY_BOOLEAN_ARRAY
An empty immutable
boolean array. |
static Boolean[] |
EMPTY_BOOLEAN_OBJ_ARRAY
An empty immutable
Boolean array. |
static byte[] |
EMPTY_BYTE_ARRAY
An empty immutable
byte array. |
static Byte[] |
EMPTY_BYTE_OBJ_ARRAY
An empty immutable
Byte array. |
static char[] |
EMPTY_CHAR_ARRAY
An empty immutable
char array. |
static Character[] |
EMPTY_CHAR_OBJ_ARRAY
An empty immutable
Character array. |
static double[] |
EMPTY_DOUBLE_ARRAY
An empty immutable
double array. |
static Double[] |
EMPTY_DOUBLE_OBJ_ARRAY
An empty immutable
Double array. |
static float[] |
EMPTY_FLOAT_ARRAY
An empty immutable
float array. |
static Float[] |
EMPTY_FLOAT_OBJ_ARRAY
An empty immutable
Float array. |
static int[] |
EMPTY_INT_ARRAY
An empty immutable
int array. |
static Integer[] |
EMPTY_INT_OBJ_ARRAY
An empty immutable
Integer array. |
static long[] |
EMPTY_LONG_ARRAY
An empty immutable
long array. |
static Long[] |
EMPTY_LONG_OBJ_ARRAY
An empty immutable
Long array. |
static Object[] |
EMPTY_OBJECT_ARRAY
An empty immutable
Object array. |
static short[] |
EMPTY_SHORT_ARRAY
An empty immutable
short array. |
static Short[] |
EMPTY_SHORT_OBJ_ARRAY
An empty immutable
Short array. |
static String |
EMPTY_STRING |
static String[] |
EMPTY_STRING_ARRAY
An empty immutable
String array. |
static int |
INDEX_NOT_FOUND
The index value when an element is not found in a list or array:
-1. |
| Modifier and Type | Method and Description |
|---|---|
static boolean[] |
add(boolean[] a,
boolean elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new
array.
|
static byte[] |
add(byte[] a,
byte elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new
array.
|
static char[] |
add(char[] a,
char elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new
array.
|
static double[] |
add(double[] a,
double elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new
array.
|
static float[] |
add(float[] a,
float elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new
array.
|
static int[] |
add(int[] a,
int elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new
array.
|
static long[] |
add(long[] a,
long elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new
array.
|
static short[] |
add(short[] a,
short elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new
array.
|
static String[] |
add(String[] a,
String elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new
array.
|
static <T> T[] |
add(T[] a,
T elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new
array.
|
static boolean[] |
addAll(boolean[] a,
boolean... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
|
static byte[] |
addAll(byte[] a,
byte... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
|
static char[] |
addAll(char[] a,
char... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
|
static <T> boolean |
addAll(Collection<T> c,
Iterator<? extends T> elementsToAdd) |
static double[] |
addAll(double[] a,
double... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
|
static float[] |
addAll(float[] a,
float... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
|
static int[] |
addAll(int[] a,
int... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
|
static long[] |
addAll(long[] a,
long... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
|
static short[] |
addAll(short[] a,
short... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
|
static String[] |
addAll(String[] a,
String... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
|
static <T> T[] |
addAll(T[] a,
T... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
|
static <T,E extends Exception> |
allMatch(Collection<? extends T> c,
Throwables.Predicate<? super T,E> filter) |
static <T,E extends Exception> |
allMatch(Iterator<? extends T> iter,
Throwables.Predicate<? super T,E> filter) |
static <T,E extends Exception> |
allMatch(T[] a,
Throwables.Predicate<? super T,E> filter) |
static <T> boolean |
allNull(Collection<T> c) |
static <T> boolean |
allNull(T... a) |
static <T> boolean |
allNull(T a,
T b) |
static <T> boolean |
allNull(T a,
T b,
T c) |
static boolean |
allNullOrEmpty(CharSequence... css)
All null or empty.
|
static boolean |
allNullOrEmpty(CharSequence cs1,
CharSequence cs2)
All null or empty.
|
static boolean |
allNullOrEmpty(CharSequence cs1,
CharSequence cs2,
CharSequence cs3)
All null or empty.
|
static boolean |
allNullOrEmpty(Collection<? extends CharSequence> css)
All null or empty.
|
static <T> boolean |
allNullOrEmpty(T[] a,
T[] b) |
static <T> boolean |
allNullOrEmpty(T[] a,
T[] b,
T[] c) |
static <T extends Collection<?>> |
allNullOrEmpty(T a,
T b) |
static <T extends Collection<?>> |
allNullOrEmpty(T a,
T b,
T c) |
static <T,E extends Exception> |
anyMatch(Collection<? extends T> c,
Throwables.Predicate<? super T,E> filter) |
static <T,E extends Exception> |
anyMatch(Iterator<? extends T> iter,
Throwables.Predicate<? super T,E> filter) |
static <T,E extends Exception> |
anyMatch(T[] a,
Throwables.Predicate<? super T,E> filter) |
static <T> boolean |
anyNull(Collection<T> c) |
static <T> boolean |
anyNull(T... a) |
static <T> boolean |
anyNull(T a,
T b) |
static <T> boolean |
anyNull(T a,
T b,
T c) |
static boolean |
anyNullOrEmpty(CharSequence... css)
Any null or empty.
|
static boolean |
anyNullOrEmpty(CharSequence a,
CharSequence b)
Any null or empty.
|
static boolean |
anyNullOrEmpty(CharSequence a,
CharSequence b,
CharSequence c)
Any null or empty.
|
static boolean |
anyNullOrEmpty(Collection<? extends CharSequence> css)
Any null or empty.
|
static <T> boolean |
anyNullOrEmpty(T[] a,
T[] b) |
static <T> boolean |
anyNullOrEmpty(T[] a,
T[] b,
T[] c) |
static <T extends Collection<?>> |
anyNullOrEmpty(T a,
T b) |
static <T extends Collection<?>> |
anyNullOrEmpty(T a,
T b,
T c) |
static <T,E extends Exception> |
applyToEach(List<T> c,
Throwables.Function<? super T,? extends T,E> converter) |
static <T,E extends Exception> |
applyToEach(T[] a,
Throwables.Function<? super T,? extends T,E> converter)
Updates each element in the specified array
a with specified function converter. |
static <T> T[] |
asArray(T... a)
The input array is returned.
|
static <T> ArrayBlockingQueue<T> |
asArrayBlockingQueue(T... a)
As array blocking queue.
|
static <T> ArrayDeque<T> |
asArrayDeque(T... a)
As array deque.
|
static <T> ConcurrentLinkedDeque<T> |
asConcurrentLinkedDeque(T... a)
As concurrent linked deque.
|
static <T> ConcurrentLinkedQueue<T> |
asConcurrentLinkedQueue(T... a)
As concurrent linked queue.
|
static <T extends Delayed> |
asDelayQueue(T... a)
As delay queue.
|
static <T> Deque<T> |
asDeque(T... a) |
static <T> LinkedBlockingDeque<T> |
asLinkedBlockingDeque(T... a)
As linked blocking deque.
|
static <T> LinkedBlockingQueue<T> |
asLinkedBlockingQueue(T... a)
As linked blocking queue.
|
static <K,V> Map<K,V> |
asLinkedHashMap(K k1,
V v1)
As linked hash map.
|
static <K,V> Map<K,V> |
asLinkedHashMap(K k1,
V v1,
K k2,
V v2)
As linked hash map.
|
static <K,V> Map<K,V> |
asLinkedHashMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3)
As linked hash map.
|
static <K,V> Map<K,V> |
asLinkedHashMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4)
As linked hash map.
|
static <K,V> Map<K,V> |
asLinkedHashMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5)
As linked hash map.
|
static <K,V> Map<K,V> |
asLinkedHashMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6)
As linked hash map.
|
static <K,V> Map<K,V> |
asLinkedHashMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6,
K k7,
V v7)
As linked hash map.
|
static <K,V> Map<K,V> |
asLinkedHashMap(Object... a)
Deprecated.
|
static <T> Set<T> |
asLinkedHashSet(T... a)
As linked hash set.
|
static <T> Set<T> |
asLinkedHashSet(T e)
As linked linked hash set.
|
static <T> Set<T> |
asLinkedHashSet(T e1,
T e2)
As linked linked hash set.
|
static <T> Set<T> |
asLinkedHashSet(T e1,
T e2,
T e3)
As linked linked hash set.
|
static <T> Set<T> |
asLinkedHashSet(T e1,
T e2,
T e3,
T e4)
As linked linked hash set.
|
static <T> Set<T> |
asLinkedHashSet(T e1,
T e2,
T e3,
T e4,
T e5)
As linked linked hash set.
|
static <T> Set<T> |
asLinkedHashSet(T e1,
T e2,
T e3,
T e4,
T e5,
T e6)
As linked linked hash set.
|
static <T> Set<T> |
asLinkedHashSet(T e1,
T e2,
T e3,
T e4,
T e5,
T e6,
T e7)
As linked linked hash set.
|
static <T> LinkedList<T> |
asLinkedList(T... a)
As linked list.
|
static <T> LinkedList<T> |
asLinkedList(T e)
As linked list.
|
static <T> LinkedList<T> |
asLinkedList(T e1,
T e2)
As linked list.
|
static <T> LinkedList<T> |
asLinkedList(T e1,
T e2,
T e3)
As linked list.
|
static <T> LinkedList<T> |
asLinkedList(T e1,
T e2,
T e3,
T e4)
As linked list.
|
static <T> LinkedList<T> |
asLinkedList(T e1,
T e2,
T e3,
T e4,
T e5)
As linked list.
|
static <T> LinkedList<T> |
asLinkedList(T e1,
T e2,
T e3,
T e4,
T e5,
T e6)
As linked list.
|
static <T> LinkedList<T> |
asLinkedList(T e1,
T e2,
T e3,
T e4,
T e5,
T e6,
T e7)
As linked list.
|
static <T> List<T> |
asList(T... a) |
static <T> List<T> |
asList(T e) |
static <T> List<T> |
asList(T e1,
T e2) |
static <T> List<T> |
asList(T e1,
T e2,
T e3) |
static <T> List<T> |
asList(T e1,
T e2,
T e3,
T e4) |
static <T> List<T> |
asList(T e1,
T e2,
T e3,
T e4,
T e5) |
static <T> List<T> |
asList(T e1,
T e2,
T e3,
T e4,
T e5,
T e6) |
static <T> List<T> |
asList(T e1,
T e2,
T e3,
T e4,
T e5,
T e6,
T e7) |
static <T> List<T> |
asList(T e1,
T e2,
T e3,
T e4,
T e5,
T e6,
T e7,
T e8) |
static <T> List<T> |
asList(T e1,
T e2,
T e3,
T e4,
T e5,
T e6,
T e7,
T e8,
T e9) |
static <K,V> Map<K,V> |
asMap(K k1,
V v1) |
static <K,V> Map<K,V> |
asMap(K k1,
V v1,
K k2,
V v2) |
static <K,V> Map<K,V> |
asMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3) |
static <K,V> Map<K,V> |
asMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4) |
static <K,V> Map<K,V> |
asMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5) |
static <K,V> Map<K,V> |
asMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6) |
static <K,V> Map<K,V> |
asMap(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6,
K k7,
V v7) |
static <K,V> Map<K,V> |
asMap(Object... a)
Deprecated.
|
static <T> Multiset<T> |
asMultiset(T... a) |
static <T> NavigableSet<T> |
asNavigableSet(T... a)
As navigable set.
|
static <T> PriorityQueue<T> |
asPriorityQueue(T... a)
As priority queue.
|
static Map<String,Object> |
asProps(Object... a)
Deprecated.
|
static Map<String,Object> |
asProps(String propName,
Object propValue) |
static Map<String,Object> |
asProps(String propName1,
Object propValue1,
String propName2,
Object propValue2) |
static Map<String,Object> |
asProps(String propName1,
Object propValue1,
String propName2,
Object propValue2,
String propName3,
Object propValue3) |
static Map<String,Object> |
asProps(String propName1,
Object propValue1,
String propName2,
Object propValue2,
String propName3,
Object propValue3,
String propName4,
Object propValue4) |
static Map<String,Object> |
asProps(String propName1,
Object propValue1,
String propName2,
Object propValue2,
String propName3,
Object propValue3,
String propName4,
Object propValue4,
String propName5,
Object propValue5) |
static <T> Queue<T> |
asQueue(T... a) |
static <T> Set<T> |
asSet(T... a) |
static <T> Set<T> |
asSet(T e) |
static <T> Set<T> |
asSet(T e1,
T e2) |
static <T> Set<T> |
asSet(T e1,
T e2,
T e3) |
static <T> Set<T> |
asSet(T e1,
T e2,
T e3,
T e4) |
static <T> Set<T> |
asSet(T e1,
T e2,
T e3,
T e4,
T e5) |
static <T> Set<T> |
asSet(T e1,
T e2,
T e3,
T e4,
T e5,
T e6) |
static <T> Set<T> |
asSet(T e1,
T e2,
T e3,
T e4,
T e5,
T e6,
T e7) |
static <T> Set<T> |
asSet(T e1,
T e2,
T e3,
T e4,
T e5,
T e6,
T e7,
T e8) |
static <T> Set<T> |
asSet(T e1,
T e2,
T e3,
T e4,
T e5,
T e6,
T e7,
T e8,
T e9) |
static <T> List<T> |
asSingletonList(T o)
Wrap the specified value with a singleton list.
|
static <K,V> Map<K,V> |
asSingletonMap(K key,
V value)
Wrap the specified key/value with a singleton map.
|
static <T> Set<T> |
asSingletonSet(T o)
Wrap the specified value with a singleton set.
|
static <T> SortedSet<T> |
asSortedSet(T... a)
As sorted set.
|
static double |
average(byte... a)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static double |
average(byte[] a,
int fromIndex,
int toIndex)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static double |
average(char... a)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static double |
average(char[] a,
int fromIndex,
int toIndex)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static double |
average(double... a)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static double |
average(double[] a,
int fromIndex,
int toIndex)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static double |
average(float... a)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static double |
average(float[] a,
int fromIndex,
int toIndex)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static double |
average(int... a)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static double |
average(int[] a,
int fromIndex,
int toIndex)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static double |
average(long... a)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static double |
average(long[] a,
int fromIndex,
int toIndex)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static double |
average(short... a)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static double |
average(short[] a,
int fromIndex,
int toIndex)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T extends Number> |
averageDouble(Collection<? extends T> c)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T extends Number> |
averageDouble(Collection<? extends T> c,
int fromIndex,
int toIndex)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T,E extends Exception> |
averageDouble(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.ToDoubleFunction<? super T,E> func)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T,E extends Exception> |
averageDouble(Collection<? extends T> c,
Throwables.ToDoubleFunction<? super T,E> func)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T extends Number> |
averageDouble(T[] a)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T extends Number> |
averageDouble(T[] a,
int fromIndex,
int toIndex)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T,E extends Exception> |
averageDouble(T[] a,
int fromIndex,
int toIndex,
Throwables.ToDoubleFunction<? super T,E> func)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T,E extends Exception> |
averageDouble(T[] a,
Throwables.ToDoubleFunction<? super T,E> func)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T extends Number> |
averageInt(Collection<? extends T> c)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T extends Number> |
averageInt(Collection<? extends T> c,
int fromIndex,
int toIndex)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T,E extends Exception> |
averageInt(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.ToIntFunction<? super T,E> func)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T,E extends Exception> |
averageInt(Collection<? extends T> c,
Throwables.ToIntFunction<? super T,E> func)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T extends Number> |
averageInt(T[] a)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T extends Number> |
averageInt(T[] a,
int fromIndex,
int toIndex)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T,E extends Exception> |
averageInt(T[] a,
int fromIndex,
int toIndex,
Throwables.ToIntFunction<? super T,E> func)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T,E extends Exception> |
averageInt(T[] a,
Throwables.ToIntFunction<? super T,E> func)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T extends Number> |
averageLong(Collection<? extends T> c)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T extends Number> |
averageLong(Collection<? extends T> c,
int fromIndex,
int toIndex)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T,E extends Exception> |
averageLong(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.ToLongFunction<? super T,E> func)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T,E extends Exception> |
averageLong(Collection<? extends T> c,
Throwables.ToLongFunction<? super T,E> func)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T extends Number> |
averageLong(T[] a)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T extends Number> |
averageLong(T[] a,
int fromIndex,
int toIndex)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T,E extends Exception> |
averageLong(T[] a,
int fromIndex,
int toIndex,
Throwables.ToLongFunction<? super T,E> func)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static <T,E extends Exception> |
averageLong(T[] a,
Throwables.ToLongFunction<? super T,E> func)
Returns
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex. |
static byte[] |
base64Decode(String base64String)
Base 64 decode.
|
static String |
base64DecodeToString(String base64String)
Base 64 decode to string.
|
static String |
base64DecodeToUtf8String(String base64String) |
static String |
base64Encode(byte[] binaryData)
Base 64 encode.
|
static String |
base64EncodeChunked(byte[] binaryData)
Base 64 encode chunked.
|
static String |
base64EncodeString(String str) |
static String |
base64EncodeUtf8String(String str) |
static byte[] |
base64UrlDecode(String base64String)
Base 64 url decode.
|
static String |
base64UrlDecodeToString(String base64String)
Base 64 url decode to string.
|
static String |
base64UrlDecodeToUtf8String(String base64String) |
static String |
base64UrlEncode(byte[] binaryData)
Base 64 url encode.
|
static int |
binarySearch(byte[] a,
byte valueToFind)
|
static int |
binarySearch(byte[] a,
int fromIndex,
int toIndex,
byte valueToFind)
|
static int |
binarySearch(char[] a,
char valueToFind)
|
static int |
binarySearch(char[] a,
int fromIndex,
int toIndex,
char valueToFind)
|
static int |
binarySearch(double[] a,
double valueToFind)
|
static int |
binarySearch(double[] a,
int fromIndex,
int toIndex,
double valueToFind)
|
static int |
binarySearch(float[] a,
float valueToFind)
|
static int |
binarySearch(float[] a,
int fromIndex,
int toIndex,
float valueToFind)
|
static int |
binarySearch(int[] a,
int valueToFind)
|
static int |
binarySearch(int[] a,
int fromIndex,
int toIndex,
int valueToFind)
|
static <T extends Comparable<? super T>> |
binarySearch(List<? extends T> list,
int fromIndex,
int toIndex,
T valueToFind) |
static <T> int |
binarySearch(List<? extends T> list,
int fromIndex,
int toIndex,
T valueToFind,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
binarySearch(List<? extends T> list,
T valueToFind)
|
static <T> int |
binarySearch(List<? extends T> list,
T valueToFind,
Comparator<? super T> cmp) |
static int |
binarySearch(long[] a,
int fromIndex,
int toIndex,
long valueToFind)
|
static int |
binarySearch(long[] a,
long valueToFind)
|
static int |
binarySearch(Object[] a,
int fromIndex,
int toIndex,
Object valueToFind)
|
static int |
binarySearch(Object[] a,
Object valueToFind)
|
static int |
binarySearch(short[] a,
int fromIndex,
int toIndex,
short valueToFind)
|
static int |
binarySearch(short[] a,
short valueToFind)
|
static <T> int |
binarySearch(T[] a,
int fromIndex,
int toIndex,
T valueToFind,
Comparator<? super T> cmp)
|
static <T> int |
binarySearch(T[] a,
T valueToFind,
Comparator<? super T> cmp)
|
static <T,U extends Comparable<? super U>> |
binarySearchBy(List<? extends T> list,
T valueToFind,
Function<? super T,? extends U> valueToFindMapper)
Binary search by.
|
static <T,U extends Comparable<? super U>> |
binarySearchBy(T[] a,
T valueToFind,
Function<? super T,? extends U> valueToFindMapper)
Binary search by.
|
static <T> T |
callUninterruptibly(long timeoutInMillis,
Throwables.LongFunction<T,InterruptedException> cmd)
Note: Copied from Google Guava under Apache License v2.0
If a thread is interrupted during such a call, the call continues to block until the result is available or the timeout elapses, and only then re-interrupts the thread. |
static <T> T |
callUninterruptibly(long timeout,
TimeUnit unit,
Throwables.BiFunction<Long,TimeUnit,T,InterruptedException> cmd)
Note: Copied from Google Guava under Apache License v2.0
If a thread is interrupted during such a call, the call continues to block until the result is available or the timeout elapses, and only then re-interrupts the thread. |
static <T> T |
callUninterruptibly(Throwables.Callable<T,InterruptedException> cmd)
Note: Copied from Google Guava under Apache License v2.0
If a thread is interrupted during such a call, the call continues to block until the result is available or the timeout elapses, and only then re-interrupts the thread. |
static <T> u.Nullable<T> |
castIfAssignable(Object val,
Class<T> targetType)
Returns an empty
Nullable if val is null while targetType is primitive or can not be assigned to targetType. |
static double |
checkArgNotNegative(double arg,
String argNameOrErrorMsg)
Checks if the specified
arg is not negative, and throws IllegalArgumentException if it is. |
static int |
checkArgNotNegative(int arg,
String argNameOrErrorMsg)
Checks if the specified
arg is not negative, and throws IllegalArgumentException if it is. |
static long |
checkArgNotNegative(long arg,
String argNameOrErrorMsg)
Checks if the specified
arg is not negative, and throws IllegalArgumentException if it is. |
static <T> T |
checkArgNotNull(T obj)
Check arg not null.
|
static <T> T |
checkArgNotNull(T obj,
String errorMessage)
Check arg not null.
|
static boolean[] |
checkArgNotNullOrEmpty(boolean[] arg,
String argNameOrErrorMsg)
Checks if the specified
arg is null or empty, and throws IllegalArgumentException if it is. |
static byte[] |
checkArgNotNullOrEmpty(byte[] arg,
String argNameOrErrorMsg)
Checks if the specified
arg is null or empty, and throws IllegalArgumentException if it is. |
static char[] |
checkArgNotNullOrEmpty(char[] arg,
String argNameOrErrorMsg)
Checks if the specified
arg is null or empty, and throws IllegalArgumentException if it is. |
static double[] |
checkArgNotNullOrEmpty(double[] arg,
String argNameOrErrorMsg)
Checks if the specified
arg is null or empty, and throws IllegalArgumentException if it is. |
static float[] |
checkArgNotNullOrEmpty(float[] arg,
String argNameOrErrorMsg)
Checks if the specified
arg is null or empty, and throws IllegalArgumentException if it is. |
static int[] |
checkArgNotNullOrEmpty(int[] arg,
String argNameOrErrorMsg)
Checks if the specified
arg is null or empty, and throws IllegalArgumentException if it is. |
static long[] |
checkArgNotNullOrEmpty(long[] arg,
String argNameOrErrorMsg)
Checks if the specified
arg is null or empty, and throws IllegalArgumentException if it is. |
static short[] |
checkArgNotNullOrEmpty(short[] arg,
String argNameOrErrorMsg)
Checks if the specified
arg is null or empty, and throws IllegalArgumentException if it is. |
static <T> T[] |
checkArgNotNullOrEmpty(T[] arg,
String argNameOrErrorMsg)
Checks if the specified
arg is null or empty, and throws IllegalArgumentException if it is. |
static <T extends CharSequence> |
checkArgNotNullOrEmpty(T arg,
String argNameOrErrorMsg)
Checks if the specified
arg is null or empty, and throws IllegalArgumentException if it is. |
static <T extends Collection<?>> |
checkArgNotNullOrEmpty(T arg,
String argNameOrErrorMsg)
Checks if the specified
arg is null or empty, and throws IllegalArgumentException if it is. |
static <T extends Map<?,?>> |
checkArgNotNullOrEmpty(T arg,
String argNameOrErrorMsg)
Checks if the specified
arg is null or empty, and throws IllegalArgumentException if it is. |
static <T extends CharSequence> |
checkArgNotNullOrEmptyOrBlank(T arg,
String msg)
Check if the specified parameter is null or empty or blank.
|
static double |
checkArgPositive(double arg,
String argNameOrErrorMsg)
Checks if the specified
arg is positive, and throws IllegalArgumentException if it is not. |
static int |
checkArgPositive(int arg,
String argNameOrErrorMsg)
Checks if the specified
arg is positive, and throws IllegalArgumentException if it is not. |
static long |
checkArgPositive(long arg,
String argNameOrErrorMsg)
Checks if the specified
arg is positive, and throws IllegalArgumentException if it is not. |
static void |
checkArgument(boolean expression)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean expression,
String errorMessage)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
boolean p)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
boolean p1,
boolean p2)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
boolean p1,
boolean p2,
boolean p3)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
byte p)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
char p)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
double p)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
double p1,
double p2)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
double p1,
double p2,
double p3)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
float p)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
float p1,
float p2)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
float p1,
float p2,
float p3)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
int p)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
int p1,
int p2)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
int p1,
int p2,
int p3)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
long p)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
long p1,
long p2)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
long p1,
long p2,
long p3)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
Object p)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
Object p1,
Object p2)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
Object p1,
Object p2,
Object p3)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
String errorMessageTemplate,
short p)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean b,
Supplier<String> errorMessageSupplier) |
static void |
checkFromIndexSize(int fromIndex,
int size,
int length)
Check from index size.
|
static void |
checkFromToIndex(int fromIndex,
int toIndex,
int length)
Check from to index.
|
static void |
checkIndex(int index,
int length) |
static void |
checkState(boolean expression)
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.
|
static void |
checkState(boolean expression,
String errorMessage)
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.
|
static void |
checkState(boolean b,
String errorMessageTemplate,
double p)
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.
|
static void |
checkState(boolean b,
String errorMessageTemplate,
double p1,
double p2)
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.
|
static void |
checkState(boolean b,
String errorMessageTemplate,
double p1,
double p2,
double p3)
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.
|
static void |
checkState(boolean b,
String errorMessageTemplate,
float p)
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.
|
static void |
checkState(boolean b,
String errorMessageTemplate,
float p1,
float p2)
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.
|
static void |
checkState(boolean b,
String errorMessageTemplate,
float p1,
float p2,
float p3)
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.
|
static void |
checkState(boolean b,
String errorMessageTemplate,
int p)
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.
|
static void |
checkState(boolean b,
String errorMessageTemplate,
int p1,
int p2)
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.
|
static void |
checkState(boolean b,
String errorMessageTemplate,
int p1,
int p2,
int p3)
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.
|
static void |
checkState(boolean b,
String errorMessageTemplate,
long p)
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.
|
static void |
checkState(boolean b,
String errorMessageTemplate,
long p1,
long p2)
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.
|
static void |
checkState(boolean b,
String errorMessageTemplate,
long p1,
long p2,
long p3)
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.
|
static void |
checkState(boolean b,
String errorMessageTemplate,
Object p)
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.
|
static void |
checkState(boolean b,
String errorMessageTemplate,
Object p1,
Object p2)
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.
|
static void |
checkState(boolean b,
String errorMessageTemplate,
Object p1,
Object p2,
Object p3)
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.
|
static void |
checkState(boolean b,
Supplier<String> errorMessageSupplier) |
static boolean[] |
clone(boolean[] original)
Clone the original array.
|
static boolean[][] |
clone(boolean[][] original)
Clone the original array and its sub arrays.
|
static boolean[][][] |
clone(boolean[][][] original)
Clone the original array and its sub arrays.
|
static byte[] |
clone(byte[] original)
Clone the original array.
|
static byte[][] |
clone(byte[][] original)
Clone the original array and its sub arrays.
|
static byte[][][] |
clone(byte[][][] original)
Clone the original array and its sub arrays.
|
static char[] |
clone(char[] original)
Clone the original array.
|
static char[][] |
clone(char[][] original)
Clone the original array and its sub arrays.
|
static char[][][] |
clone(char[][][] original)
Clone the original array and its sub arrays.
|
static double[] |
clone(double[] original)
Clone the original array.
|
static double[][] |
clone(double[][] original)
Clone the original array and its sub arrays.
|
static double[][][] |
clone(double[][][] original)
Clone the original array and its sub arrays.
|
static float[] |
clone(float[] original)
Clone the original array.
|
static float[][] |
clone(float[][] original)
Clone the original array and its sub arrays.
|
static float[][][] |
clone(float[][][] original)
Clone the original array and its sub arrays.
|
static int[] |
clone(int[] original)
Clone the original array.
|
static int[][] |
clone(int[][] original)
Clone the original array and its sub arrays.
|
static int[][][] |
clone(int[][][] original)
Clone the original array and its sub arrays.
|
static long[] |
clone(long[] original)
Clone the original array.
|
static long[][] |
clone(long[][] original)
Clone the original array and its sub arrays.
|
static long[][][] |
clone(long[][][] original)
Clone the original array and its sub arrays.
|
static short[] |
clone(short[] original)
Clone the original array.
|
static short[][] |
clone(short[][] original)
Clone the original array and its sub arrays.
|
static short[][][] |
clone(short[][][] original)
Clone the original array and its sub arrays.
|
static <T> T[] |
clone(T[] original)
Clone the original array.
|
static <T> T[][] |
clone(T[][] original)
Clone the original array and its sub arrays.
|
static <T> T[][][] |
clone(T[][][] original)
Clone the original array and its sub arrays.
|
static <T> Set<T> |
commonSet(Collection<? extends Collection<? extends T>> c)
Common set.
|
static <T> Set<T> |
commonSet(Collection<? extends T> a,
Collection<?> b)
Common set.
|
static int |
compare(boolean[] a,
boolean[] b) |
static int |
compare(boolean[] a,
int fromIndexA,
boolean[] b,
int fromIndexB,
int len) |
static int |
compare(boolean a,
boolean b) |
static int |
compare(byte[] a,
byte[] b) |
static int |
compare(byte[] a,
int fromIndexA,
byte[] b,
int fromIndexB,
int len) |
static int |
compare(byte a,
byte b) |
static int |
compare(char[] a,
char[] b) |
static int |
compare(char[] a,
int fromIndexA,
char[] b,
int fromIndexB,
int len) |
static <T extends Comparable<? super T>> |
compare(Collection<T> a,
Collection<T> b) |
static <T> int |
compare(Collection<T> a,
Collection<T> b,
Comparator<? super T> cmp) |
static <T> int |
compare(Collection<T> a,
int fromIndexA,
Collection<T> b,
int fromIndexB,
int len) |
static <T> int |
compare(Collection<T> a,
int fromIndexA,
Collection<T> b,
int fromIndexB,
int len,
Comparator<? super T> cmp) |
static int |
compare(double[] a,
double[] b) |
static int |
compare(double[] a,
int fromIndexA,
double[] b,
int fromIndexB,
int len) |
static int |
compare(double a,
double b) |
static int |
compare(float[] a,
float[] b) |
static int |
compare(float[] a,
int fromIndexA,
float[] b,
int fromIndexB,
int len) |
static int |
compare(float a,
float b) |
static int |
compare(int[] a,
int[] b) |
static int |
compare(int[] a,
int fromIndexA,
int[] b,
int fromIndexB,
int len) |
static int |
compare(int a,
int b) |
static int |
compare(long[] a,
int fromIndexA,
long[] b,
int fromIndexB,
int len) |
static int |
compare(long[] a,
long[] b) |
static int |
compare(long a,
long b) |
static int |
compare(short[] a,
int fromIndexA,
short[] b,
int fromIndexB,
int len) |
static int |
compare(short[] a,
short[] b) |
static int |
compare(short a,
short b) |
static <T extends Comparable<? super T>> |
compare(T[] a,
int fromIndexA,
T[] b,
int fromIndexB,
int len) |
static <T> int |
compare(T[] a,
int fromIndexA,
T[] b,
int fromIndexB,
int len,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
compare(T[] a,
T[] b) |
static <T> int |
compare(T[] a,
T[] b,
Comparator<? super T> cmp) |
static <T1 extends Comparable<T1>,T2 extends Comparable<T2>> |
compare(T1 a1,
T1 b1,
T2 a2,
T2 b2)
Continue to compare the pairs of values
(a1, b1), (a2, b2) until they're not equal. |
static <T1 extends Comparable<T1>,T2 extends Comparable<T2>,T3 extends Comparable<T3>> |
compare(T1 a1,
T1 b1,
T2 a2,
T2 b2,
T3 a3,
T3 b3)
Continue to compare the pairs of values
(a1, b1), (a2, b2), (a3, b3) until they're not equal. |
static <T1 extends Comparable<T1>,T2 extends Comparable<T2>,T3 extends Comparable<T3>,T4 extends Comparable<T4>> |
compare(T1 a1,
T1 b1,
T2 a2,
T2 b2,
T3 a3,
T3 b3,
T4 a4,
T4 b4)
Continue to compare the pairs of values
(a1, b1), (a2, b2), (a3, b3), (a4, b4) until they're not equal. |
static <T1 extends Comparable<T1>,T2 extends Comparable<T2>,T3 extends Comparable<T3>,T4 extends Comparable<T4>,T5 extends Comparable<T5>> |
compare(T1 a1,
T1 b1,
T2 a2,
T2 b2,
T3 a3,
T3 b3,
T4 a4,
T4 b4,
T5 a5,
T5 b5)
Continue to compare the pairs of values
(a1, b1), (a2, b2), (a3, b3), (a4, b4), (a5, b5) until they're not equal. |
static <T1 extends Comparable<T1>,T2 extends Comparable<T2>,T3 extends Comparable<T3>,T4 extends Comparable<T4>,T5 extends Comparable<T5>,T6 extends Comparable<T6>> |
compare(T1 a1,
T1 b1,
T2 a2,
T2 b2,
T3 a3,
T3 b3,
T4 a4,
T4 b4,
T5 a5,
T5 b5,
T6 a6,
T6 b6)
Continue to compare the pairs of values
(a1, b1), (a2, b2), (a3, b3), (a4, b4), (a5, b5), (a6, b6) until they're not equal. |
static <T1 extends Comparable<T1>,T2 extends Comparable<T2>,T3 extends Comparable<T3>,T4 extends Comparable<T4>,T5 extends Comparable<T5>,T6 extends Comparable<T6>,T7 extends Comparable<T7>> |
compare(T1 a1,
T1 b1,
T2 a2,
T2 b2,
T3 a3,
T3 b3,
T4 a4,
T4 b4,
T5 a5,
T5 b5,
T6 a6,
T6 b6,
T7 a7,
T7 b7)
Continue to compare the pairs of values
(a1, b1), (a2, b2), (a3, b3), (a4, b4), (a5, b5), (a6, b6), (a7, b7) until they're not equal. |
static <T extends Comparable<? super T>> |
compare(T a,
T b) |
static <T> int |
compare(T a,
T b,
Comparator<? super T> cmp)
Returns 0 if the arguments are identical and
c.compare(a, b)
otherwise. |
static int |
compareIgnoreCase(String a,
String b)
Compare ignore case.
|
static boolean[] |
concat(boolean[]... aa) |
static boolean[] |
concat(boolean[] a,
boolean[] b) |
static byte[] |
concat(byte[]... aa) |
static byte[] |
concat(byte[] a,
byte[] b) |
static char[] |
concat(char[]... aa) |
static char[] |
concat(char[] a,
char[] b) |
static <T> List<T> |
concat(Collection<? extends Collection<? extends T>> c) |
static <T,C extends Collection<T>> |
concat(Collection<? extends Collection<? extends T>> c,
IntFunction<? extends C> supplier) |
static <T> List<T> |
concat(Collection<? extends T>... a) |
static <T> List<T> |
concat(Collection<? extends T> a,
Collection<? extends T> b) |
static double[] |
concat(double[]... aa) |
static double[] |
concat(double[] a,
double[] b) |
static float[] |
concat(float[]... aa) |
static float[] |
concat(float[] a,
float[] b) |
static int[] |
concat(int[]... aa) |
static int[] |
concat(int[] a,
int[] b) |
static <T> ObjIterator<T> |
concat(Iterator<? extends T>... a) |
static <T> ObjIterator<T> |
concat(Iterator<? extends T> a,
Iterator<? extends T> b) |
static long[] |
concat(long[]... aa) |
static long[] |
concat(long[] a,
long[] b) |
static short[] |
concat(short[]... aa) |
static short[] |
concat(short[] a,
short[] b) |
static <T> T[] |
concat(T[]... aa) |
static <T> T[] |
concat(T[] a,
T[] b) |
static boolean |
contains(boolean[] a,
boolean valueToFind) |
static boolean |
contains(byte[] a,
byte valueToFind) |
static boolean |
contains(char[] a,
char valueToFind) |
static boolean |
contains(Collection<?> c,
Object valueToFind) |
static boolean |
contains(double[] a,
double valueToFind) |
static boolean |
contains(float[] a,
float valueToFind) |
static boolean |
contains(int[] a,
int valueToFind) |
static boolean |
contains(Iterator<?> iter,
Object valueToFind) |
static boolean |
contains(long[] a,
long valueToFind) |
static boolean |
contains(Object[] a,
Object valueToFind) |
static boolean |
contains(short[] a,
short valueToFind) |
static boolean |
containsAll(Collection<?> c,
Collection<?> valuesToFind)
Contains all.
|
static boolean |
containsAll(Collection<?> c,
Object[] valuesToFind)
Contains all.
|
static boolean |
containsAll(Iterator<?> iter,
Collection<?> valuesToFind) |
static boolean |
containsAny(Collection<?> c,
Collection<?> valuesToFind)
Contains any.
|
static boolean |
containsAny(Collection<?> c,
Object[] valuesToFind)
Contains any.
|
static boolean |
containsAny(Iterator<?> iter,
Set<?> valuesToFind) |
static <T> T |
convert(Object obj,
Class<? extends T> targetClass)
Try to convert the specified
obj to the specified
targetClass. |
static <T> T |
convert(Object obj,
com.landawn.abacus.type.Type<? extends T> targetType) |
static void |
copy(boolean[] src,
int srcPos,
boolean[] dest,
int destPos,
int length) |
static void |
copy(byte[] src,
int srcPos,
byte[] dest,
int destPos,
int length) |
static void |
copy(char[] src,
int srcPos,
char[] dest,
int destPos,
int length) |
static <T> T |
copy(Class<? extends T> targetClass,
Object entity) |
static <T> T |
copy(Class<? extends T> targetClass,
Object entity,
boolean ignoreUnmatchedProperty,
Set<String> ignorePropNames) |
static <T> T |
copy(Class<? extends T> targetClass,
Object entity,
Collection<String> selectPropNames)
Returns a new created instance of the specified
cls and set with
same properties retrieved by 'getXXX' method in the specified
entity. |
static <T> T[][][] |
copy(Class<T[][][]> newType,
Object[][][] a) |
static <T> T[][] |
copy(Class<T[][]> newType,
Object[][] a) |
static <T> T[] |
copy(Class<T[]> newType,
Object[] a) |
static void |
copy(double[] src,
int srcPos,
double[] dest,
int destPos,
int length) |
static void |
copy(float[] src,
int srcPos,
float[] dest,
int destPos,
int length) |
static void |
copy(int[] src,
int srcPos,
int[] dest,
int destPos,
int length) |
static <T> void |
copy(List<? extends T> src,
int srcPos,
List<? super T> dest,
int destPos,
int length) |
static <T> void |
copy(List<? extends T> src,
List<? super T> dest)
Copies all of the elements from one list into another.
|
static void |
copy(long[] src,
int srcPos,
long[] dest,
int destPos,
int length) |
static void |
copy(Object[] src,
int srcPos,
Object[] dest,
int destPos,
int length) |
static void |
copy(Object src,
int srcPos,
Object dest,
int destPos,
int length) |
static void |
copy(short[] src,
int srcPos,
short[] dest,
int destPos,
int length) |
static <T> T |
copy(T entity)
Returns a new created instance of the same class and set with same
properties retrieved by 'getXXX' method in the specified
entity. |
static <T> T |
copy(T entity,
Collection<String> selectPropNames) |
static boolean[] |
copyOf(boolean[] original,
int newLength) |
static byte[] |
copyOf(byte[] original,
int newLength) |
static char[] |
copyOf(char[] original,
int newLength) |
static double[] |
copyOf(double[] original,
int newLength) |
static float[] |
copyOf(float[] original,
int newLength) |
static int[] |
copyOf(int[] original,
int newLength) |
static long[] |
copyOf(long[] original,
int newLength) |
static short[] |
copyOf(short[] original,
int newLength) |
static <T> T[] |
copyOf(T[] original,
int newLength) |
static <T,U> T[] |
copyOf(U[] original,
int newLength,
Class<? extends T[]> newType) |
static boolean[] |
copyOfRange(boolean[] original,
int fromIndex,
int toIndex)
Copy of range.
|
static boolean[] |
copyOfRange(boolean[] original,
int fromIndex,
int toIndex,
int step)
Copy all the elements in
original, through to-from, by step. |
static byte[] |
copyOfRange(byte[] original,
int fromIndex,
int toIndex)
Copy of range.
|
static byte[] |
copyOfRange(byte[] original,
int fromIndex,
int toIndex,
int step)
Copy all the elements in
original, through to-from, by step. |
static char[] |
copyOfRange(char[] original,
int fromIndex,
int toIndex)
Copy of range.
|
static char[] |
copyOfRange(char[] original,
int fromIndex,
int toIndex,
int step)
Copy all the elements in
original, through to-from, by step. |
static double[] |
copyOfRange(double[] original,
int fromIndex,
int toIndex)
Copy of range.
|
static double[] |
copyOfRange(double[] original,
int fromIndex,
int toIndex,
int step)
Copy all the elements in
original, through to-from, by step. |
static float[] |
copyOfRange(float[] original,
int fromIndex,
int toIndex)
Copy of range.
|
static float[] |
copyOfRange(float[] original,
int fromIndex,
int toIndex,
int step)
Copy all the elements in
original, through to-from, by step. |
static int[] |
copyOfRange(int[] original,
int fromIndex,
int toIndex)
Copy of range.
|
static int[] |
copyOfRange(int[] original,
int fromIndex,
int toIndex,
int step)
Copy all the elements in
original, through to-from, by step. |
static <T> List<T> |
copyOfRange(List<T> c,
int fromIndex,
int toIndex)
Copy of range.
|
static <T> List<T> |
copyOfRange(List<T> c,
int fromIndex,
int toIndex,
int step)
Copy all the elements in
original, through to-from, by step. |
static long[] |
copyOfRange(long[] original,
int fromIndex,
int toIndex)
Copy of range.
|
static long[] |
copyOfRange(long[] original,
int fromIndex,
int toIndex,
int step)
Copy all the elements in
original, through to-from, by step. |
static short[] |
copyOfRange(short[] original,
int fromIndex,
int toIndex)
Copy of range.
|
static short[] |
copyOfRange(short[] original,
int fromIndex,
int toIndex,
int step)
Copy all the elements in
original, through to-from, by step. |
static String |
copyOfRange(String str,
int fromIndex,
int toIndex)
Copy of range.
|
static String |
copyOfRange(String str,
int fromIndex,
int toIndex,
int step)
Copy of range.
|
static <T> T[] |
copyOfRange(T[] original,
int fromIndex,
int toIndex)
Copy of range.
|
static <T> T[] |
copyOfRange(T[] original,
int fromIndex,
int toIndex,
int step)
Copy all the elements in
original, through to-from, by step. |
static <T> T[] |
copyOfRange(T[] original,
int fromIndex,
int toIndex,
int step,
Class<? extends T[]> newType)
Copy all the elements in
original, through to-from, by step. |
static <T,U> T[] |
copyOfRange(U[] original,
int fromIndex,
int toIndex,
Class<? extends T[]> newType)
|
static <T,E extends Exception> |
copyThenApply(T[] a,
Throwables.Function<? super T,? extends T,E> converter)
Copy the specified array
a first, then call converter on the copy. |
static <E extends Exception> |
count(boolean[] a,
int fromIndex,
int toIndex,
Throwables.BooleanPredicate<E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
count(boolean[] a,
Throwables.BooleanPredicate<E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
count(byte[] a,
int fromIndex,
int toIndex,
Throwables.BytePredicate<E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
count(byte[] a,
Throwables.BytePredicate<E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
count(char[] a,
int fromIndex,
int toIndex,
Throwables.CharPredicate<E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
count(char[] a,
Throwables.CharPredicate<E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
count(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.Predicate<? super T,E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
count(Collection<? extends T> c,
Throwables.Predicate<? super T,E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
count(double[] a,
int fromIndex,
int toIndex,
Throwables.DoublePredicate<E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
count(double[] a,
Throwables.DoublePredicate<E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
count(float[] a,
int fromIndex,
int toIndex,
Throwables.FloatPredicate<E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
count(float[] a,
Throwables.FloatPredicate<E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
count(int[] a,
int fromIndex,
int toIndex,
Throwables.IntPredicate<E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
count(int[] a,
Throwables.IntPredicate<E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static int |
count(Iterator<?> iter) |
static <T,E extends Exception> |
count(Iterator<? extends T> iter,
Throwables.Predicate<? super T,E> filter) |
static <E extends Exception> |
count(long[] a,
int fromIndex,
int toIndex,
Throwables.LongPredicate<E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
count(long[] a,
Throwables.LongPredicate<E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
count(short[] a,
int fromIndex,
int toIndex,
Throwables.ShortPredicate<E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
count(short[] a,
Throwables.ShortPredicate<E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
count(T[] a,
int fromIndex,
int toIndex,
Throwables.Predicate<? super T,E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
count(T[] a,
Throwables.Predicate<? super T,E> filter)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static boolean |
deepEquals(Object[] a,
int fromIndexA,
Object[] b,
int fromIndexB,
int len) |
static boolean |
deepEquals(Object[] a,
Object[] b) |
static boolean |
deepEquals(Object a,
Object b)
|
static int |
deepHashCode(Object obj) |
static int |
deepHashCode(Object[] a)
Deep hash code.
|
static int |
deepHashCode(Object[] a,
int fromIndex,
int toIndex)
Deep hash code.
|
static String |
deepToString(Object obj) |
static String |
deepToString(Object[] a)
Deep to string.
|
static String |
deepToString(Object[] a,
int fromIndex,
int toIndex)
Deep to string.
|
static String |
deepToString(Object[] a,
String defaultIfNull)
Deep to string.
|
static boolean |
defaultIfNull(Boolean b)
Default if null.
|
static boolean |
defaultIfNull(Boolean b,
boolean defaultForNull)
Default if null.
|
static byte |
defaultIfNull(Byte b)
Default if null.
|
static byte |
defaultIfNull(Byte b,
byte defaultForNull)
Default if null.
|
static char |
defaultIfNull(Character c)
Default if null.
|
static char |
defaultIfNull(Character c,
char defaultForNull)
Default if null.
|
static double |
defaultIfNull(Double b)
Default if null.
|
static double |
defaultIfNull(Double b,
double defaultForNull)
Default if null.
|
static float |
defaultIfNull(Float b)
Default if null.
|
static float |
defaultIfNull(Float b,
float defaultForNull)
Default if null.
|
static int |
defaultIfNull(Integer b)
Default if null.
|
static int |
defaultIfNull(Integer b,
int defaultForNull)
Default if null.
|
static long |
defaultIfNull(Long b)
Default if null.
|
static long |
defaultIfNull(Long b,
long defaultForNull)
Default if null.
|
static short |
defaultIfNull(Short b)
Default if null.
|
static short |
defaultIfNull(Short b,
short defaultForNull)
Default if null.
|
static <T> T |
defaultIfNull(T obj,
T defaultForNull)
Default if null.
|
static <T extends CharSequence> |
defaultIfNullOrEmpty(T str,
T defaultStr) |
static <T extends CharSequence> |
defaultIfNullOrEmptyOrBlank(T str,
T defaultStr) |
static <T> T |
defaultValueOf(Class<T> cls)
Default value of.
|
static boolean[] |
delete(boolean[] a,
int index)
Removes the element at the specified position from the specified array.
|
static byte[] |
delete(byte[] a,
int index)
Removes the element at the specified position from the specified array.
|
static char[] |
delete(char[] a,
int index)
Removes the element at the specified position from the specified array.
|
static double[] |
delete(double[] a,
int index)
Removes the element at the specified position from the specified array.
|
static float[] |
delete(float[] a,
int index)
Removes the element at the specified position from the specified array.
|
static int[] |
delete(int[] a,
int index)
Removes the element at the specified position from the specified array.
|
static long[] |
delete(long[] a,
int index)
Removes the element at the specified position from the specified array.
|
static short[] |
delete(short[] a,
int index)
Removes the element at the specified position from the specified array.
|
static <T> T[] |
delete(T[] a,
int index)
Removes the element at the specified position from the specified array.
|
static boolean[] |
deleteAll(boolean[] a,
int... indices)
Removes the elements at the specified positions from the specified array.
|
static byte[] |
deleteAll(byte[] a,
int... indices)
Removes the elements at the specified positions from the specified array.
|
static char[] |
deleteAll(char[] a,
int... indices)
Removes the elements at the specified positions from the specified array.
|
static double[] |
deleteAll(double[] a,
int... indices)
Removes the elements at the specified positions from the specified array.
|
static float[] |
deleteAll(float[] a,
int... indices)
Removes the elements at the specified positions from the specified array.
|
static int[] |
deleteAll(int[] a,
int... indices)
Removes the elements at the specified positions from the specified array.
|
static boolean |
deleteAll(List<?> list,
int... indices)
Removes the elements at the specified positions from the specified List.
|
static long[] |
deleteAll(long[] a,
int... indices)
Removes the elements at the specified positions from the specified array.
|
static short[] |
deleteAll(short[] a,
int... indices)
Removes the elements at the specified positions from the specified array.
|
static String[] |
deleteAll(String[] a,
int... indices) |
static <T> T[] |
deleteAll(T[] a,
int... indices)
Removes the elements at the specified positions from the specified array.
|
static boolean[] |
deleteRange(boolean[] a,
int fromIndex,
int toIndex)
Deletes the values from
fromIndex to toIndex. |
static byte[] |
deleteRange(byte[] a,
int fromIndex,
int toIndex)
Deletes the values from
fromIndex to toIndex. |
static char[] |
deleteRange(char[] a,
int fromIndex,
int toIndex)
Deletes the values from
fromIndex to toIndex. |
static double[] |
deleteRange(double[] a,
int fromIndex,
int toIndex)
Deletes the values from
fromIndex to toIndex. |
static float[] |
deleteRange(float[] a,
int fromIndex,
int toIndex)
Deletes the values from
fromIndex to toIndex. |
static int[] |
deleteRange(int[] a,
int fromIndex,
int toIndex)
Deletes the values from
fromIndex to toIndex. |
static <T> boolean |
deleteRange(List<T> c,
int fromIndex,
int toIndex)
Returns
true if the List is updated when fromIndex < toIndex, otherwise false is returned when fromIndex == toIndex. |
static long[] |
deleteRange(long[] a,
int fromIndex,
int toIndex)
Deletes the values from
fromIndex to toIndex. |
static short[] |
deleteRange(short[] a,
int fromIndex,
int toIndex)
Deletes the values from
fromIndex to toIndex. |
static String[] |
deleteRange(String[] a,
int fromIndex,
int toIndex) |
static String |
deleteRange(String str,
int fromIndex,
int toIndex) |
static <T> T[] |
deleteRange(T[] a,
int fromIndex,
int toIndex)
Deletes the values from
fromIndex to toIndex. |
static <T> List<T> |
difference(Collection<? extends T> a,
Collection<?> b)
Returns the elements from
a, but exclude the elements in b by occurrences. |
static <T> List<T> |
difference(T[] a,
Object[] b) |
static <T> Set<T> |
differentSet(Collection<? extends T> a,
Collection<?> b)
Different set.
|
static boolean |
disjoint(Collection<?> c1,
Collection<?> c2)
Returns
true if the two specified arrays have no elements in common. |
static boolean |
disjoint(Object[] a,
Object[] b) |
static boolean[] |
distinct(boolean[] a)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static boolean[] |
distinct(boolean[] a,
int fromIndex,
int toIndex)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static byte[] |
distinct(byte[] a)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static byte[] |
distinct(byte[] a,
int fromIndex,
int toIndex)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static char[] |
distinct(char[] a)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static char[] |
distinct(char[] a,
int fromIndex,
int toIndex)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T> List<T> |
distinct(Collection<? extends T> c)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T> List<T> |
distinct(Collection<? extends T> c,
int fromIndex,
int toIndex)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static double[] |
distinct(double[] a)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static double[] |
distinct(double[] a,
int fromIndex,
int toIndex)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static float[] |
distinct(float[] a)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static float[] |
distinct(float[] a,
int fromIndex,
int toIndex)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static int[] |
distinct(int[] a)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static int[] |
distinct(int[] a,
int fromIndex,
int toIndex)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static long[] |
distinct(long[] a)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static long[] |
distinct(long[] a,
int fromIndex,
int toIndex)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static short[] |
distinct(short[] a)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static short[] |
distinct(short[] a,
int fromIndex,
int toIndex)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T> List<T> |
distinct(T[] a)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T> List<T> |
distinct(T[] a,
int fromIndex,
int toIndex)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
distinctBy(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.Function<? super T,?,E> keyMapper)
Distinct by the value mapped from
keyMapper. |
static <T,E extends Exception> |
distinctBy(Collection<? extends T> c,
Throwables.Function<? super T,?,E> keyMapper)
Distinct by the value mapped from
keyMapper. |
static <T,C extends Collection<T>,E extends Exception> |
distinctBy(Collection<? extends T> c,
Throwables.Function<? super T,?,E> keyMapper,
Supplier<C> supplier)
Distinct by the value mapped from
keyMapper. |
static <T,E extends Exception> |
distinctBy(T[] a,
int fromIndex,
int toIndex,
Throwables.Function<? super T,?,E> keyMapper)
Distinct by the value mapped from
keyMapper. |
static <T,E extends Exception> |
distinctBy(T[] a,
Throwables.Function<? super T,?,E> keyMapper)
Distinct by the value mapped from
keyMapper. |
static <T,C extends Collection<T>,E extends Exception> |
distinctBy(T[] a,
Throwables.Function<? super T,?,E> keyMapper,
Supplier<C> supplier)
Distinct by the value mapped from
keyMapper. |
static <T,E extends Exception> |
dropWhile(Collection<? extends T> c,
Throwables.Predicate<? super T,E> filter)
Drop while.
|
static <T,E extends Exception> |
dropWhile(T[] a,
Throwables.Predicate<? super T,E> filter)
Drop while.
|
static InputStream |
emptyInputStream()
Returns an empty immutable
InputStream. |
static <T> Iterator<T> |
emptyIterator()
Returns an empty immutable
Iterator. |
static <T> List<T> |
emptyList()
Returns an empty immutable
List. |
static <T> ListIterator<T> |
emptyListIterator()
Returns an empty immutable
ListIterator. |
static <K,V> Map<K,V> |
emptyMap()
Returns an empty immutable
Map. |
static <T> Set<T> |
emptySet()
Returns an empty immutable
Set. |
static <E extends Enum<E>> |
enumListOf(Class<E> enumClass)
Enum list of.
|
static <E extends Enum<E>> |
enumMapOf(Class<E> enumClass)
Enum map of.
|
static <E extends Enum<E>> |
enumSetOf(Class<E> enumClass)
Enum set of.
|
static boolean |
equals(boolean[] a,
boolean[] b) |
static boolean |
equals(boolean[] a,
int fromIndexA,
boolean[] b,
int fromIndexB,
int len) |
static boolean |
equals(boolean a,
boolean b) |
static boolean |
equals(byte[] a,
byte[] b) |
static boolean |
equals(byte[] a,
int fromIndexA,
byte[] b,
int fromIndexB,
int len) |
static boolean |
equals(byte a,
byte b) |
static boolean |
equals(char[] a,
char[] b) |
static boolean |
equals(char[] a,
int fromIndexA,
char[] b,
int fromIndexB,
int len) |
static boolean |
equals(char a,
char b) |
static boolean |
equals(double[] a,
double[] b) |
static boolean |
equals(double[] a,
int fromIndexA,
double[] b,
int fromIndexB,
int len) |
static boolean |
equals(double a,
double b) |
static boolean |
equals(float[] a,
float[] b) |
static boolean |
equals(float[] a,
int fromIndexA,
float[] b,
int fromIndexB,
int len) |
static boolean |
equals(float a,
float b) |
static boolean |
equals(int[] a,
int[] b) |
static boolean |
equals(int[] a,
int fromIndexA,
int[] b,
int fromIndexB,
int len) |
static boolean |
equals(int a,
int b) |
static boolean |
equals(long[] a,
int fromIndexA,
long[] b,
int fromIndexB,
int len) |
static boolean |
equals(long[] a,
long[] b) |
static boolean |
equals(long a,
long b) |
static boolean |
equals(Object[] a,
int fromIndexA,
Object[] b,
int fromIndexB,
int len) |
static boolean |
equals(Object[] a,
Object[] b) |
static boolean |
equals(Object a,
Object b)
|
static boolean |
equals(short[] a,
int fromIndexA,
short[] b,
int fromIndexB,
int len) |
static boolean |
equals(short[] a,
short[] b) |
static boolean |
equals(short a,
short b) |
static boolean |
equals(String a,
String b) |
static boolean |
equalsIgnoreCase(String[] a,
int fromIndexA,
String[] b,
int fromIndexB,
int len)
Equals ignore case.
|
static boolean |
equalsIgnoreCase(String[] a,
String[] b)
Equals ignore case.
|
static boolean |
equalsIgnoreCase(String a,
String b)
Equals ignore case.
|
static void |
erase(Object entity,
Collection<String> propNames) |
static void |
erase(Object entity,
String... propNames) |
static void |
eraseAll(Object entity) |
static <T> List<T> |
exclude(Collection<T> c,
Object objToExclude)
Returns a new
List with specified objToExclude excluded. |
static <T> List<T> |
excludeAll(Collection<T> c,
Collection<?> objsToExclude)
Returns a new
List with specified objsToExclude excluded. |
static <T> Set<T> |
excludeAllToSet(Collection<T> c,
Collection<?> objsToExclude)
Returns a new
Set with specified objsToExclude excluded. |
static <T> Set<T> |
excludeToSet(Collection<T> c,
Object objToExclude)
Returns a new
Set with specified objToExclude excluded. |
static void |
fill(boolean[] a,
boolean val) |
static void |
fill(boolean[] a,
int fromIndex,
int toIndex,
boolean val) |
static void |
fill(byte[] a,
byte val) |
static void |
fill(byte[] a,
int fromIndex,
int toIndex,
byte val) |
static void |
fill(char[] a,
char val) |
static void |
fill(char[] a,
int fromIndex,
int toIndex,
char val) |
static void |
fill(double[] a,
double val) |
static void |
fill(double[] a,
int fromIndex,
int toIndex,
double val) |
static void |
fill(float[] a,
float val) |
static void |
fill(float[] a,
int fromIndex,
int toIndex,
float val) |
static void |
fill(int[] a,
int val) |
static void |
fill(int[] a,
int fromIndex,
int toIndex,
int val) |
static <T> void |
fill(List<? super T> list,
int fromIndex,
int toIndex,
T val)
The specified value will be added/inserted into the specified List.
|
static <T> void |
fill(List<? super T> list,
T val) |
static void |
fill(long[] a,
int fromIndex,
int toIndex,
long val) |
static void |
fill(long[] a,
long val) |
static void |
fill(Object[] a,
int fromIndex,
int toIndex,
Object val) |
static void |
fill(Object[] a,
Object val) |
static void |
fill(short[] a,
int fromIndex,
int toIndex,
short val) |
static void |
fill(short[] a,
short val) |
static <E extends Exception> |
filter(boolean[] a,
int fromIndex,
int toIndex,
Throwables.BooleanPredicate<E> filter) |
static <E extends Exception> |
filter(boolean[] a,
int fromIndex,
int toIndex,
Throwables.BooleanPredicate<E> filter,
int max)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
filter(boolean[] a,
Throwables.BooleanPredicate<E> filter) |
static <E extends Exception> |
filter(boolean[] a,
Throwables.BooleanPredicate<E> filter,
int max) |
static <E extends Exception> |
filter(byte[] a,
int fromIndex,
int toIndex,
Throwables.BytePredicate<E> filter) |
static <E extends Exception> |
filter(byte[] a,
int fromIndex,
int toIndex,
Throwables.BytePredicate<E> filter,
int max)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
filter(byte[] a,
Throwables.BytePredicate<E> filter) |
static <E extends Exception> |
filter(byte[] a,
Throwables.BytePredicate<E> filter,
int max) |
static <E extends Exception> |
filter(char[] a,
int fromIndex,
int toIndex,
Throwables.CharPredicate<E> filter) |
static <E extends Exception> |
filter(char[] a,
int fromIndex,
int toIndex,
Throwables.CharPredicate<E> filter,
int max)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
filter(char[] a,
Throwables.CharPredicate<E> filter) |
static <E extends Exception> |
filter(char[] a,
Throwables.CharPredicate<E> filter,
int max) |
static <T,E extends Exception> |
filter(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.Predicate<? super T,E> filter) |
static <T,E extends Exception> |
filter(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.Predicate<? super T,E> filter,
int max) |
static <T,R extends Collection<T>,E extends Exception> |
filter(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.Predicate<? super T,E> filter,
IntFunction<R> supplier) |
static <T,R extends Collection<T>,E extends Exception> |
filter(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.Predicate<? super T,E> filter,
int max,
IntFunction<R> supplier) |
static <T,E extends Exception> |
filter(Collection<? extends T> c,
Throwables.Predicate<? super T,E> filter) |
static <T,E extends Exception> |
filter(Collection<? extends T> c,
Throwables.Predicate<? super T,E> filter,
int max) |
static <T,R extends Collection<T>,E extends Exception> |
filter(Collection<? extends T> c,
Throwables.Predicate<? super T,E> filter,
IntFunction<R> supplier) |
static <T,R extends Collection<T>,E extends Exception> |
filter(Collection<? extends T> c,
Throwables.Predicate<? super T,E> filter,
int max,
IntFunction<R> supplier) |
static <E extends Exception> |
filter(double[] a,
int fromIndex,
int toIndex,
Throwables.DoublePredicate<E> filter) |
static <E extends Exception> |
filter(double[] a,
int fromIndex,
int toIndex,
Throwables.DoublePredicate<E> filter,
int max)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
filter(double[] a,
Throwables.DoublePredicate<E> filter) |
static <E extends Exception> |
filter(double[] a,
Throwables.DoublePredicate<E> filter,
int max) |
static <E extends Exception> |
filter(float[] a,
int fromIndex,
int toIndex,
Throwables.FloatPredicate<E> filter) |
static <E extends Exception> |
filter(float[] a,
int fromIndex,
int toIndex,
Throwables.FloatPredicate<E> filter,
int max)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
filter(float[] a,
Throwables.FloatPredicate<E> filter) |
static <E extends Exception> |
filter(float[] a,
Throwables.FloatPredicate<E> filter,
int max) |
static <E extends Exception> |
filter(int[] a,
int fromIndex,
int toIndex,
Throwables.IntPredicate<E> filter) |
static <E extends Exception> |
filter(int[] a,
int fromIndex,
int toIndex,
Throwables.IntPredicate<E> filter,
int max)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
filter(int[] a,
Throwables.IntPredicate<E> filter) |
static <E extends Exception> |
filter(int[] a,
Throwables.IntPredicate<E> filter,
int max) |
static <E extends Exception> |
filter(long[] a,
int fromIndex,
int toIndex,
Throwables.LongPredicate<E> filter) |
static <E extends Exception> |
filter(long[] a,
int fromIndex,
int toIndex,
Throwables.LongPredicate<E> filter,
int max)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
filter(long[] a,
Throwables.LongPredicate<E> filter) |
static <E extends Exception> |
filter(long[] a,
Throwables.LongPredicate<E> filter,
int max) |
static <E extends Exception> |
filter(short[] a,
int fromIndex,
int toIndex,
Throwables.ShortPredicate<E> filter) |
static <E extends Exception> |
filter(short[] a,
int fromIndex,
int toIndex,
Throwables.ShortPredicate<E> filter,
int max)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <E extends Exception> |
filter(short[] a,
Throwables.ShortPredicate<E> filter) |
static <E extends Exception> |
filter(short[] a,
Throwables.ShortPredicate<E> filter,
int max) |
static <T,E extends Exception> |
filter(T[] a,
int fromIndex,
int toIndex,
Throwables.Predicate<? super T,E> filter) |
static <T,E extends Exception> |
filter(T[] a,
int fromIndex,
int toIndex,
Throwables.Predicate<? super T,E> filter,
int max)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,R extends Collection<T>,E extends Exception> |
filter(T[] a,
int fromIndex,
int toIndex,
Throwables.Predicate<? super T,E> filter,
IntFunction<R> supplier) |
static <T,R extends Collection<T>,E extends Exception> |
filter(T[] a,
int fromIndex,
int toIndex,
Throwables.Predicate<? super T,E> filter,
int max,
IntFunction<R> supplier)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
filter(T[] a,
Throwables.Predicate<? super T,E> filter) |
static <T,E extends Exception> |
filter(T[] a,
Throwables.Predicate<? super T,E> filter,
int max) |
static <T,R extends Collection<T>,E extends Exception> |
filter(T[] a,
Throwables.Predicate<? super T,E> filter,
IntFunction<R> supplier) |
static <T,R extends Collection<T>,E extends Exception> |
filter(T[] a,
Throwables.Predicate<? super T,E> filter,
int max,
IntFunction<R> supplier) |
static <T,E extends Exception> |
findFirst(Collection<? extends T> c,
Throwables.Predicate<? super T,E> predicate)
Find first.
|
static <T,E extends Exception> |
findFirst(Iterator<? extends T> iter,
Throwables.Predicate<? super T,E> predicate) |
static <T,E extends Exception> |
findFirst(T[] a,
Throwables.Predicate<? super T,E> predicate)
Find first.
|
static <T,E extends Exception> |
findFirstIndex(Collection<? extends T> c,
Throwables.Predicate<? super T,E> predicate)
Find first index.
|
static <T,E extends Exception> |
findFirstIndex(T[] a,
Throwables.Predicate<? super T,E> predicate)
Find first index.
|
static <T,E extends Exception> |
findFirstNonNull(Collection<? extends T> c,
Throwables.Predicate<? super T,E> predicate)
Find first non null.
|
static <T,E extends Exception> |
findFirstNonNull(Iterator<? extends T> iter,
Throwables.Predicate<? super T,E> predicate) |
static <T,E extends Exception> |
findFirstNonNull(T[] a,
Throwables.Predicate<? super T,E> predicate)
Find first non null.
|
static <T,E extends Exception> |
findLast(Collection<? extends T> c,
Throwables.Predicate<? super T,E> predicate)
Find last.
|
static <T,E extends Exception> |
findLast(T[] a,
Throwables.Predicate<? super T,E> predicate)
Find last.
|
static <T,E extends Exception> |
findLastIndex(Collection<? extends T> c,
Throwables.Predicate<? super T,E> predicate)
Find last index.
|
static <T,E extends Exception> |
findLastIndex(T[] a,
Throwables.Predicate<? super T,E> predicate)
Find last index.
|
static <T,E extends Exception> |
findLastNonNull(Collection<? extends T> c,
Throwables.Predicate<? super T,E> predicate)
Find last non null.
|
static <T,E extends Exception> |
findLastNonNull(T[] a,
Throwables.Predicate<? super T,E> predicate)
Find last non null.
|
static <T> List<T> |
first(Collection<? extends T> c,
int n)
Return at most first
n elements. |
static <T> u.Nullable<T> |
first(Collection<T> c) |
static <T> u.Nullable<T> |
first(Iterator<T> iter) |
static Throwable |
firstCause(Throwable e)
Returns the specified
Throwable e if there is no cause found in it (e.getCause() == null). |
static <K,V> u.Optional<Map.Entry<K,V>> |
firstEntry(Map<K,V> map) |
static <T extends CharSequence> |
firstNonBlank(T a,
T b) |
static <T extends CharSequence> |
firstNonBlank(T a,
T b,
T c) |
static <T> u.Optional<T[]> |
firstNonEmpty(T[] a,
T[] b) |
static <T> u.Optional<T[]> |
firstNonEmpty(T[] a,
T[] b,
T[] c) |
static <T extends CharSequence> |
firstNonEmpty(T a,
T b) |
static <T extends Collection<?>> |
firstNonEmpty(T a,
T b) |
static <T extends CharSequence> |
firstNonEmpty(T a,
T b,
T c) |
static <T extends Collection<?>> |
firstNonEmpty(T a,
T b,
T c) |
static <T> u.Optional<T> |
firstNonNull(Collection<T> c)
First non null.
|
static <T> u.Optional<T> |
firstNonNull(Iterator<T> iter)
First non null.
|
static <T> u.Optional<T> |
firstNonNull(T... a)
First non null.
|
static <T> u.Optional<T> |
firstNonNull(T a,
T b)
First non null.
|
static <T> u.Optional<T> |
firstNonNull(T a,
T b,
T c)
First non null.
|
static <T> T |
firstOrDefaultIfEmpty(Collection<T> c,
T defaultValueForEmpty)
First or default if empty.
|
static <T> T |
firstOrDefaultIfEmpty(Iterator<T> iter,
T defaultValueForEmpty)
First or default if empty.
|
static <T> T |
firstOrDefaultIfEmpty(T[] a,
T defaultValueForEmpty)
First or default if empty.
|
static <T> T |
firstOrNullIfEmpty(Collection<T> c)
First or null if empty.
|
static <T> T |
firstOrNullIfEmpty(Iterator<T> iter)
First or null if empty.
|
static <T> T |
firstOrNullIfEmpty(T[] a)
First or null if empty.
|
static <T,R,E extends Exception> |
flatMap(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.Function<? super T,? extends Collection<? extends R>,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,R,C extends Collection<R>,E extends Exception> |
flatMap(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.Function<? super T,? extends Collection<? extends R>,E> func,
IntFunction<? extends C> supplier)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,R,E extends Exception> |
flatMap(Collection<? extends T> c,
Throwables.Function<? super T,? extends Collection<? extends R>,E> func) |
static <T,R,C extends Collection<R>,E extends Exception> |
flatMap(Collection<? extends T> c,
Throwables.Function<? super T,? extends Collection<? extends R>,E> func,
IntFunction<? extends C> supplier) |
static <T,T2,R,E extends Exception,E2 extends Exception> |
flatMap(Collection<? extends T> c,
Throwables.Function<? super T,? extends Collection<? extends T2>,E> func,
Throwables.Function<? super T2,? extends Collection<? extends R>,E2> func2) |
static <T,T2,R,C extends Collection<R>,E extends Exception,E2 extends Exception> |
flatMap(Collection<? extends T> c,
Throwables.Function<? super T,? extends Collection<? extends T2>,E> func,
Throwables.Function<? super T2,? extends Collection<? extends R>,E2> func2,
IntFunction<? extends C> supplier)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,R,E extends Exception> |
flatMap(T[] a,
int fromIndex,
int toIndex,
Throwables.Function<? super T,? extends Collection<? extends R>,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,R,C extends Collection<R>,E extends Exception> |
flatMap(T[] a,
int fromIndex,
int toIndex,
Throwables.Function<? super T,? extends Collection<? extends R>,E> func,
IntFunction<? extends C> supplier)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,R,E extends Exception> |
flatMap(T[] a,
Throwables.Function<? super T,? extends Collection<? extends R>,E> func) |
static <T,R,C extends Collection<R>,E extends Exception> |
flatMap(T[] a,
Throwables.Function<? super T,? extends Collection<? extends R>,E> func,
IntFunction<? extends C> supplier) |
static <T,T2,R,E extends Exception,E2 extends Exception> |
flatMap(T[] a,
Throwables.Function<? super T,? extends Collection<? extends T2>,E> func,
Throwables.Function<? super T2,? extends Collection<? extends R>,E2> func2) |
static <T,T2,R,C extends Collection<R>,E extends Exception,E2 extends Exception> |
flatMap(T[] a,
Throwables.Function<? super T,? extends Collection<? extends T2>,E> func,
Throwables.Function<? super T2,? extends Collection<? extends R>,E2> func2,
IntFunction<? extends C> supplier)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,R,E extends Exception> |
flattMap(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.Function<? super T,? extends R[],E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,R,C extends Collection<R>,E extends Exception> |
flattMap(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.Function<? super T,? extends R[],E> func,
IntFunction<? extends C> supplier)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,R,E extends Exception> |
flattMap(Collection<? extends T> c,
Throwables.Function<? super T,? extends R[],E> func) |
static <T,R,C extends Collection<R>,E extends Exception> |
flattMap(Collection<? extends T> c,
Throwables.Function<? super T,? extends R[],E> func,
IntFunction<? extends C> supplier) |
static <T,R,E extends Exception> |
flattMap(T[] a,
int fromIndex,
int toIndex,
Throwables.Function<? super T,? extends R[],E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,R,C extends Collection<R>,E extends Exception> |
flattMap(T[] a,
int fromIndex,
int toIndex,
Throwables.Function<? super T,? extends R[],E> func,
IntFunction<? extends C> supplier)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,R,E extends Exception> |
flattMap(T[] a,
Throwables.Function<? super T,? extends R[],E> func) |
static <T,R,C extends Collection<R>,E extends Exception> |
flattMap(T[] a,
Throwables.Function<? super T,? extends R[],E> func,
IntFunction<? extends C> supplier) |
static <A,B,E extends Exception> |
forEach(A[] a,
B[] b,
A valueForNoneA,
B valueForNoneB,
Throwables.BiConsumer<? super A,? super B,E> action) |
static <A,B,C,E extends Exception> |
forEach(A[] a,
B[] b,
C[] c,
A valueForNoneA,
B valueForNoneB,
C valueForNoneC,
Throwables.TriConsumer<? super A,? super B,? super C,E> action) |
static <A,B,C,E extends Exception> |
forEach(A[] a,
B[] b,
C[] c,
Throwables.TriConsumer<? super A,? super B,? super C,E> action) |
static <A,B,E extends Exception> |
forEach(A[] a,
B[] b,
Throwables.BiConsumer<? super A,? super B,E> action) |
static <T,E extends Exception> |
forEach(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.Consumer<? super T,E> action)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
forEach(Collection<? extends T> c,
Throwables.Consumer<? super T,E> action) |
static <A,B,E extends Exception> |
forEach(Collection<A> a,
Collection<B> b,
A valueForNoneA,
B valueForNoneB,
Throwables.BiConsumer<? super A,? super B,E> action) |
static <A,B,C,E extends Exception> |
forEach(Collection<A> a,
Collection<B> b,
Collection<C> c,
A valueForNoneA,
B valueForNoneB,
C valueForNoneC,
Throwables.TriConsumer<? super A,? super B,? super C,E> action) |
static <A,B,C,E extends Exception> |
forEach(Collection<A> a,
Collection<B> b,
Collection<C> c,
Throwables.TriConsumer<? super A,? super B,? super C,E> action) |
static <A,B,E extends Exception> |
forEach(Collection<A> a,
Collection<B> b,
Throwables.BiConsumer<? super A,? super B,E> action) |
static <T,T2,T3,E extends Exception,E2 extends Exception,E3 extends Exception> |
forEach(Collection<T> c,
Throwables.Function<? super T,? extends Collection<T2>,E> flatMapper,
Throwables.Function<? super T2,? extends Collection<T3>,E2> flatMapper2,
Throwables.TriConsumer<? super T,? super T2,? super T3,E3> action) |
static <T,U,E extends Exception,E2 extends Exception> |
forEach(Collection<T> c,
Throwables.Function<? super T,? extends Collection<U>,E> flatMapper,
Throwables.BiConsumer<? super T,? super U,E2> action) |
static <E extends Exception> |
forEach(int startInclusive,
int endExclusive,
int step,
Throwables.IntConsumer<E> action) |
static <E extends Exception> |
forEach(int startInclusive,
int endExclusive,
int step,
Throwables.Runnable<E> action) |
static <T,E extends Exception> |
forEach(int startInclusive,
int endExclusive,
int step,
T a,
Throwables.ObjIntConsumer<? super T,E> action)
Deprecated.
use traditional for-loop
|
static <E extends Exception> |
forEach(int startInclusive,
int endExclusive,
Throwables.IntConsumer<E> action) |
static <E extends Exception> |
forEach(int startInclusive,
int endExclusive,
Throwables.Runnable<E> action) |
static <T,E extends Exception> |
forEach(int startInclusive,
int endExclusive,
T a,
Throwables.ObjIntConsumer<? super T,E> action)
Deprecated.
use traditional for-loop
|
static <T,E extends Exception> |
forEach(Iterator<? extends T> iter,
Throwables.Consumer<? super T,E> action) |
static <T,T2,T3,E extends Exception,E2 extends Exception,E3 extends Exception> |
forEach(Iterator<? extends T> iter,
Throwables.Function<? super T,? extends Collection<T2>,E> flatMapper,
Throwables.Function<? super T2,? extends Collection<T3>,E2> flatMapper2,
Throwables.TriConsumer<? super T,? super T2,? super T3,E3> action) |
static <T,U,E extends Exception,E2 extends Exception> |
forEach(Iterator<? extends T> iter,
Throwables.Function<? super T,? extends Collection<U>,E> flatMapper,
Throwables.BiConsumer<? super T,? super U,E2> action) |
static <A,B,E extends Exception> |
forEach(Iterator<A> a,
Iterator<B> b,
A valueForNoneA,
B valueForNoneB,
Throwables.BiConsumer<? super A,? super B,E> action) |
static <A,B,C,E extends Exception> |
forEach(Iterator<A> a,
Iterator<B> b,
Iterator<C> c,
A valueForNoneA,
B valueForNoneB,
C valueForNoneC,
Throwables.TriConsumer<? super A,? super B,? super C,E> action) |
static <A,B,C,E extends Exception> |
forEach(Iterator<A> a,
Iterator<B> b,
Iterator<C> c,
Throwables.TriConsumer<? super A,? super B,? super C,E> action) |
static <A,B,E extends Exception> |
forEach(Iterator<A> a,
Iterator<B> b,
Throwables.BiConsumer<? super A,? super B,E> action) |
static <K,V,E extends Exception> |
forEach(Map<K,V> map,
Throwables.Consumer<? super Map.Entry<K,V>,E> action) |
static <T,E extends Exception> |
forEach(T[] a,
int fromIndex,
int toIndex,
Throwables.Consumer<? super T,E> action) |
static <T,E extends Exception> |
forEach(T[] a,
Throwables.Consumer<? super T,E> action) |
static <T,T2,T3,E extends Exception,E2 extends Exception,E3 extends Exception> |
forEach(T[] a,
Throwables.Function<? super T,? extends Collection<T2>,E> flatMapper,
Throwables.Function<? super T2,? extends Collection<T3>,E2> flatMapper2,
Throwables.TriConsumer<? super T,? super T2,? super T3,E3> action) |
static <T,U,E extends Exception,E2 extends Exception> |
forEach(T[] a,
Throwables.Function<? super T,? extends Collection<U>,E> flatMapper,
Throwables.BiConsumer<? super T,? super U,E2> action) |
static <T,E extends Exception> |
forEachIndexed(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.IndexedConsumer<? super T,E> action)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
forEachIndexed(Collection<? extends T> c,
Throwables.IndexedConsumer<? super T,E> action) |
static <T,E extends Exception> |
forEachIndexed(Iterator<? extends T> iter,
Throwables.IndexedConsumer<? super T,E> action) |
static <K,V,E extends Exception> |
forEachIndexed(Map<K,V> map,
Throwables.IndexedConsumer<? super Map.Entry<K,V>,E> action) |
static <T,E extends Exception> |
forEachIndexed(T[] a,
int fromIndex,
int toIndex,
Throwables.IndexedConsumer<? super T,E> action) |
static <T,E extends Exception> |
forEachIndexed(T[] a,
Throwables.IndexedConsumer<? super T,E> action) |
static <T,E extends Exception> |
forEachNonNull(Collection<T> c,
Throwables.Consumer<? super T,E> action)
For each non null.
|
static <T,T2,T3,E extends Exception,E2 extends Exception,E3 extends Exception> |
forEachNonNull(Collection<T> c,
Throwables.Function<? super T,? extends Collection<T2>,E> flatMapper,
Throwables.Function<? super T2,? extends Collection<T3>,E2> flatMapper2,
Throwables.TriConsumer<? super T,? super T2,? super T3,E3> action)
For each non null.
|
static <T,U,E extends Exception,E2 extends Exception> |
forEachNonNull(Collection<T> c,
Throwables.Function<? super T,? extends Collection<U>,E> flatMapper,
Throwables.BiConsumer<? super T,? super U,E2> action)
For each non null.
|
static <T,T2,T3,E extends Exception,E2 extends Exception,E3 extends Exception> |
forEachNonNull(Iterator<? extends T> iter,
Throwables.Function<? super T,? extends Collection<T2>,E> flatMapper,
Throwables.Function<? super T2,? extends Collection<T3>,E2> flatMapper2,
Throwables.TriConsumer<? super T,? super T2,? super T3,E3> action)
For each non null.
|
static <T,U,E extends Exception,E2 extends Exception> |
forEachNonNull(Iterator<? extends T> iter,
Throwables.Function<? super T,? extends Collection<U>,E> flatMapper,
Throwables.BiConsumer<? super T,? super U,E2> action)
For each non null.
|
static <T,E extends Exception> |
forEachNonNull(T[] a,
Throwables.Consumer<? super T,E> action)
For each non null.
|
static <T,T2,T3,E extends Exception,E2 extends Exception,E3 extends Exception> |
forEachNonNull(T[] a,
Throwables.Function<? super T,? extends Collection<T2>,E> flatMapper,
Throwables.Function<? super T2,? extends Collection<T3>,E2> flatMapper2,
Throwables.TriConsumer<? super T,? super T2,? super T3,E3> action)
For each non null.
|
static <T,U,E extends Exception,E2 extends Exception> |
forEachNonNull(T[] a,
Throwables.Function<? super T,? extends Collection<U>,E> flatMapper,
Throwables.BiConsumer<? super T,? super U,E2> action)
For each non null.
|
static <T,E extends Exception> |
forEachPair(Collection<? extends T> c,
Throwables.BiConsumer<? super T,? super T,E> action)
For each pair.
|
static <T,E extends Exception> |
forEachPair(Collection<? extends T> c,
Throwables.BiConsumer<? super T,? super T,E> action,
int increment)
For each pair.
|
static <T,E extends Exception> |
forEachPair(Iterator<? extends T> iter,
Throwables.BiConsumer<? super T,? super T,E> action)
For each pair.
|
static <T,E extends Exception> |
forEachPair(Iterator<? extends T> iter,
Throwables.BiConsumer<? super T,? super T,E> action,
int increment)
For each pair.
|
static <T,E extends Exception> |
forEachPair(T[] a,
Throwables.BiConsumer<? super T,? super T,E> action)
For each pair.
|
static <T,E extends Exception> |
forEachPair(T[] a,
Throwables.BiConsumer<? super T,? super T,E> action,
int increment)
For each pair.
|
static <T,E extends Exception> |
forEachTriple(Collection<? extends T> c,
Throwables.TriConsumer<? super T,? super T,? super T,E> action)
For each triple.
|
static <T,E extends Exception> |
forEachTriple(Collection<? extends T> c,
Throwables.TriConsumer<? super T,? super T,? super T,E> action,
int increment)
For each triple.
|
static <T,E extends Exception> |
forEachTriple(Iterator<? extends T> iter,
Throwables.TriConsumer<? super T,? super T,? super T,E> action)
For each triple.
|
static <T,E extends Exception> |
forEachTriple(Iterator<? extends T> iter,
Throwables.TriConsumer<? super T,? super T,? super T,E> action,
int increment)
For each triple.
|
static <T,E extends Exception> |
forEachTriple(T[] a,
Throwables.TriConsumer<? super T,? super T,? super T,E> action)
For each triple.
|
static <T,E extends Exception> |
forEachTriple(T[] a,
Throwables.TriConsumer<? super T,? super T,? super T,E> action,
int increment)
For each triple.
|
static String |
formatJSON(Class<?> type,
String json) |
static String |
formatJSON(String json) |
static String |
formatJSON(com.landawn.abacus.type.Type<?> type,
String json) |
static String |
formatXML(Class<?> type,
String xml) |
static String |
formatXML(String xml) |
static String |
formatXML(com.landawn.abacus.type.Type<?> type,
String xml) |
static <T> T[] |
fprintln(String format,
T... args) |
static <T> T |
fromJSON(Class<? extends T> targetClass,
File json) |
static <T> T |
fromJSON(Class<? extends T> targetClass,
File json,
JSONDeserializationConfig config) |
static <T> T |
fromJSON(Class<? extends T> targetClass,
InputStream json) |
static <T> T |
fromJSON(Class<? extends T> targetClass,
InputStream json,
JSONDeserializationConfig config) |
static <T> T |
fromJSON(Class<? extends T> targetClass,
Reader json) |
static <T> T |
fromJSON(Class<? extends T> targetClass,
Reader json,
JSONDeserializationConfig config) |
static <T> T |
fromJSON(Class<? extends T> targetClass,
String json) |
static <T> T |
fromJSON(Class<? extends T> targetClass,
String json,
int fromIndex,
int toIndex) |
static <T> T |
fromJSON(Class<? extends T> targetClass,
String json,
int fromIndex,
int toIndex,
JSONDeserializationConfig config) |
static <T> T |
fromJSON(Class<? extends T> targetClass,
String json,
JSONDeserializationConfig config) |
static <T> T |
fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
File json) |
static <T> T |
fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
File json,
JSONDeserializationConfig config) |
static <T> T |
fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
InputStream json) |
static <T> T |
fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
InputStream json,
JSONDeserializationConfig config) |
static <T> T |
fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
Reader json) |
static <T> T |
fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
Reader json,
JSONDeserializationConfig config) |
static <T> T |
fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
String json) |
static <T> T |
fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
String json,
int fromIndex,
int toIndex) |
static <T> T |
fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
String json,
int fromIndex,
int toIndex,
JSONDeserializationConfig config) |
static <T> T |
fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
String json,
JSONDeserializationConfig config) |
static <T> T |
fromXML(Class<? extends T> targetClass,
File xml) |
static <T> T |
fromXML(Class<? extends T> targetClass,
File xml,
XMLDeserializationConfig config) |
static <T> T |
fromXML(Class<? extends T> targetClass,
InputStream xml) |
static <T> T |
fromXML(Class<? extends T> targetClass,
InputStream xml,
XMLDeserializationConfig config) |
static <T> T |
fromXML(Class<? extends T> targetClass,
Reader xml) |
static <T> T |
fromXML(Class<? extends T> targetClass,
Reader xml,
XMLDeserializationConfig config) |
static <T> T |
fromXML(Class<? extends T> targetClass,
String xml) |
static <T> T |
fromXML(Class<? extends T> targetClass,
String xml,
XMLDeserializationConfig config) |
static <T> T |
fromXML(com.landawn.abacus.type.Type<? extends T> targetType,
File xml) |
static <T> T |
fromXML(com.landawn.abacus.type.Type<? extends T> targetType,
File xml,
XMLDeserializationConfig config) |
static <T> T |
fromXML(com.landawn.abacus.type.Type<? extends T> targetType,
InputStream xml) |
static <T> T |
fromXML(com.landawn.abacus.type.Type<? extends T> targetType,
InputStream xml,
XMLDeserializationConfig config) |
static <T> T |
fromXML(com.landawn.abacus.type.Type<? extends T> targetType,
Reader xml) |
static <T> T |
fromXML(com.landawn.abacus.type.Type<? extends T> targetType,
Reader xml,
XMLDeserializationConfig config) |
static <T> T |
fromXML(com.landawn.abacus.type.Type<? extends T> targetType,
String xml) |
static <T> T |
fromXML(com.landawn.abacus.type.Type<? extends T> targetType,
String xml,
XMLDeserializationConfig config) |
static <T extends Comparable<? super T>> |
geAndLe(T value,
T min,
T max)
Returns
true is min <= value <= max, otherwise false is returned. |
static <T extends Comparable<? super T>> |
geAndLt(T value,
T min,
T max)
Returns
true is min <= value < max, otherwise false is returned. |
static <T> u.Nullable<T> |
getOnlyElement(Iterable<? extends T> iterable)
Gets the only element.
|
static <T> u.Nullable<T> |
getOnlyElement(Iterator<? extends T> iter)
Gets the only element.
|
static <T extends Comparable<? super T>> |
greaterEqual(T a,
T b)
Returns
true is a >= b, otherwise false is returned. |
static <T extends Comparable<? super T>> |
greaterThan(T a,
T b)
Returns
true is a > b, otherwise false is returned. |
static <T extends Comparable<? super T>> |
gtAndLe(T value,
T min,
T max)
Returns
true is min < value <= max, otherwise false is returned. |
static <T extends Comparable<? super T>> |
gtAndLt(T value,
T min,
T max)
Returns
true is min < value < max, otherwise false is returned. |
static String |
guid()
Returns the UUID without '-'.
|
static boolean |
hasCause(Throwable e,
Class<? extends Throwable> type) |
static boolean |
hasDuplicates(byte[] a)
Checks for duplicates.
|
static boolean |
hasDuplicates(byte[] a,
boolean isSorted)
Checks for duplicates.
|
static boolean |
hasDuplicates(char[] a)
Checks for duplicates.
|
static boolean |
hasDuplicates(char[] a,
boolean isSorted)
Checks for duplicates.
|
static boolean |
hasDuplicates(Collection<?> c)
Checks for duplicates.
|
static boolean |
hasDuplicates(Collection<?> c,
boolean isSorted)
Checks for duplicates.
|
static boolean |
hasDuplicates(double[] a)
Checks for duplicates.
|
static boolean |
hasDuplicates(double[] a,
boolean isSorted)
Checks for duplicates.
|
static boolean |
hasDuplicates(float[] a)
Checks for duplicates.
|
static boolean |
hasDuplicates(float[] a,
boolean isSorted)
Checks for duplicates.
|
static boolean |
hasDuplicates(int[] a)
Checks for duplicates.
|
static boolean |
hasDuplicates(int[] a,
boolean isSorted)
Checks for duplicates.
|
static boolean |
hasDuplicates(long[] a)
Checks for duplicates.
|
static boolean |
hasDuplicates(long[] a,
boolean isSorted)
Checks for duplicates.
|
static boolean |
hasDuplicates(short[] a)
Checks for duplicates.
|
static boolean |
hasDuplicates(short[] a,
boolean isSorted)
Checks for duplicates.
|
static <T> boolean |
hasDuplicates(T[] a)
Checks for duplicates.
|
static <T> boolean |
hasDuplicates(T[] a,
boolean isSorted)
Checks for duplicates.
|
static int |
hashCode(boolean value) |
static int |
hashCode(boolean[] a) |
static int |
hashCode(boolean[] a,
int fromIndex,
int toIndex) |
static int |
hashCode(byte value) |
static int |
hashCode(byte[] a) |
static int |
hashCode(byte[] a,
int fromIndex,
int toIndex) |
static int |
hashCode(char value) |
static int |
hashCode(char[] a) |
static int |
hashCode(char[] a,
int fromIndex,
int toIndex) |
static int |
hashCode(double value) |
static int |
hashCode(double[] a) |
static int |
hashCode(double[] a,
int fromIndex,
int toIndex) |
static int |
hashCode(float value) |
static int |
hashCode(float[] a) |
static int |
hashCode(float[] a,
int fromIndex,
int toIndex) |
static int |
hashCode(int value) |
static int |
hashCode(int[] a) |
static int |
hashCode(int[] a,
int fromIndex,
int toIndex) |
static int |
hashCode(long value) |
static int |
hashCode(long[] a) |
static int |
hashCode(long[] a,
int fromIndex,
int toIndex) |
static int |
hashCode(Object obj) |
static int |
hashCode(Object[] a) |
static int |
hashCode(Object[] a,
int fromIndex,
int toIndex) |
static int |
hashCode(short value) |
static int |
hashCode(short[] a) |
static int |
hashCode(short[] a,
int fromIndex,
int toIndex) |
static <E1 extends Exception,E2 extends Exception> |
ifOrElse(boolean b,
Throwables.Runnable<E1> actionForTrue,
Throwables.Runnable<E2> actionForFalse)
If or else.
|
static <T,E1 extends Exception,E2 extends Exception> |
ifOrElse(boolean b,
T init,
Throwables.Consumer<? super T,E1> actionForTrue,
Throwables.Consumer<? super T,E2> actionForFalse)
If or else.
|
static <R,E extends Exception> |
ifOrEmpty(boolean b,
Throwables.Supplier<R,E> supplier)
Returns a
Nullable with value got from the specified supplier if b is true,
otherwise returns an empty Nullable if b is false. |
static <T,R,E extends Exception> |
ifOrEmpty(boolean b,
T init,
Throwables.Function<? super T,R,E> func)
Returns a
Nullable with value returned by func.apply(init) if b is true,
otherwise returns an empty Nullable if b is false. |
static int |
indexOf(boolean[] a,
boolean valueToFind) |
static int |
indexOf(boolean[] a,
int startIndex,
boolean valueToFind) |
static int |
indexOf(byte[] a,
byte valueToFind) |
static int |
indexOf(byte[] a,
int startIndex,
byte valueToFind) |
static int |
indexOf(char[] a,
char valueToFind) |
static int |
indexOf(char[] a,
int startIndex,
char valueToFind) |
static int |
indexOf(Collection<?> c,
int startIndex,
Object valueToFind) |
static int |
indexOf(Collection<?> c,
Object valueToFind) |
static int |
indexOf(double[] a,
double valueToFind) |
static int |
indexOf(double[] a,
double valueToFind,
double tolerance)
Finds the index of the given value within a given tolerance in the array.
|
static int |
indexOf(double[] a,
int startIndex,
double valueToFind) |
static int |
indexOf(double[] a,
int startIndex,
double valueToFind,
double tolerance)
Finds the index of the given value in the array starting at the given index.
|
static int |
indexOf(float[] a,
float valueToFind) |
static int |
indexOf(float[] a,
int startIndex,
float valueToFind) |
static int |
indexOf(int[] a,
int valueToFind) |
static int |
indexOf(int[] a,
int startIndex,
int valueToFind) |
static int |
indexOf(Iterator<?> iter,
int startIndex,
Object valueToFind) |
static int |
indexOf(Iterator<?> iter,
Object valueToFind) |
static int |
indexOf(long[] a,
int startIndex,
long valueToFind) |
static int |
indexOf(long[] a,
long valueToFind) |
static int |
indexOf(Object[] a,
int startIndex,
Object valueToFind) |
static int |
indexOf(Object[] a,
Object valueToFind) |
static int |
indexOf(short[] a,
int startIndex,
short valueToFind) |
static int |
indexOf(short[] a,
short valueToFind) |
static int |
indexOfSubList(List<?> sourceList,
List<?> subListToFind)
Index of sub list.
|
static boolean[] |
insert(boolean[] a,
int index,
boolean elementToInsert)
Inserts the specified elementToInsert at the specified position in the array.
|
static byte[] |
insert(byte[] a,
int index,
byte elementToInsert)
Inserts the specified elementToInsert at the specified position in the array.
|
static char[] |
insert(char[] a,
int index,
char elementToInsert)
Inserts the specified elementToInsert at the specified position in the array.
|
static double[] |
insert(double[] a,
int index,
double elementToInsert)
Inserts the specified elementToInsert at the specified position in the array.
|
static float[] |
insert(float[] a,
int index,
float elementToInsert)
Inserts the specified elementToInsert at the specified position in the array.
|
static int[] |
insert(int[] a,
int index,
int elementToInsert)
Inserts the specified elementToInsert at the specified position in the array.
|
static long[] |
insert(long[] a,
int index,
long elementToInsert)
Inserts the specified elementToInsert at the specified position in the array.
|
static short[] |
insert(short[] a,
int index,
short elementToInsert)
Inserts the specified elementToInsert at the specified position in the array.
|
static String[] |
insert(String[] a,
int index,
String elementToInsert) |
static String |
insert(String str,
int index,
String strToInsert)
Returns a new String
|
static <T> T[] |
insert(T[] a,
int index,
T elementToInsert)
Inserts the specified elementToInsert at the specified position in the array.
|
static boolean[] |
insertAll(boolean[] a,
int index,
boolean... elementsToInsert)
Inserts the specified elementToInserts at the specified position in the array.
|
static byte[] |
insertAll(byte[] a,
int index,
byte... elementsToInsert)
Inserts the specified elementToInserts at the specified position in the array.
|
static char[] |
insertAll(char[] a,
int index,
char... elementsToInsert)
Inserts the specified elementToInserts at the specified position in the array.
|
static double[] |
insertAll(double[] a,
int index,
double... elementsToInsert)
Inserts the specified elementToInserts at the specified position in the array.
|
static float[] |
insertAll(float[] a,
int index,
float... elementsToInsert)
Inserts the specified elementToInserts at the specified position in the array.
|
static int[] |
insertAll(int[] a,
int index,
int... elementsToInsert)
Inserts the specified elementToInserts at the specified position in the array.
|
static long[] |
insertAll(long[] a,
int index,
long... elementsToInsert)
Inserts the specified elementToInserts at the specified position in the array.
|
static short[] |
insertAll(short[] a,
int index,
short... elementsToInsert)
Inserts the specified elementToInserts at the specified position in the array.
|
static String[] |
insertAll(String[] a,
int index,
String... elementsToInsert) |
static <T> T[] |
insertAll(T[] a,
int index,
T... elementsToInsert)
Inserts the specified elementToInserts at the specified position in the array.
|
static <T> List<T> |
intersection(Collection<? extends Collection<? extends T>> c) |
static <T> List<T> |
intersection(Collection<? extends T> a,
Collection<?> b) |
static <T> List<T> |
intersection(T[] a,
Object[] b) |
static void |
invert(boolean[] a)
Inverts the element from
fromIndex to toIndex: set it to true if it's false, or set it to false if it's true. |
static void |
invert(boolean[] a,
int fromIndex,
int toIndex)
Inverts the element from
fromIndex to toIndex: set it to true if it's false, or set it to false if it's true. |
static boolean |
isDirtyMarker(Class<?> cls)
Deprecated.
replaced by
ClassUtil.isDirtyMarker(Class) |
static boolean |
isEntity(Class<?> cls)
Deprecated.
replaced by
ClassUtil.isEntity(Class) |
static boolean |
isEqualCollection(Collection<?> a,
Collection<?> b)
Returns
true if the given Collections contain
exactly the same elements with exactly the same cardinalities. |
static boolean |
isNullOrEmpty(boolean[] a)
Checks if is null or empty.
|
static boolean |
isNullOrEmpty(byte[] a)
Checks if is null or empty.
|
static boolean |
isNullOrEmpty(char[] a)
Checks if is null or empty.
|
static boolean |
isNullOrEmpty(CharSequence s)
Checks if is null or empty.
|
static boolean |
isNullOrEmpty(Collection<?> c)
Checks if is null or empty.
|
static boolean |
isNullOrEmpty(DataSet rs)
Checks if is null or empty.
|
static boolean |
isNullOrEmpty(double[] a)
Checks if is null or empty.
|
static boolean |
isNullOrEmpty(float[] a)
Checks if is null or empty.
|
static boolean |
isNullOrEmpty(int[] a)
Checks if is null or empty.
|
static boolean |
isNullOrEmpty(long[] a)
Checks if is null or empty.
|
static boolean |
isNullOrEmpty(Map<?,?> m)
Checks if is null or empty.
|
static boolean |
isNullOrEmpty(Multimap<?,?,?> m)
Checks if is null or empty.
|
static boolean |
isNullOrEmpty(Multiset<?> s)
Checks if is null or empty.
|
static boolean |
isNullOrEmpty(Object[] a)
Checks if is null or empty.
|
static boolean |
isNullOrEmpty(short[] a)
Checks if is null or empty.
|
static boolean |
isNullOrEmptyOrBlank(CharSequence s)
Checks if is null or empty or blank.
|
static boolean |
isPrimitiveArrayType(Class<?> cls)
Checks if is primitive array type.
|
static boolean |
isPrimitiveType(Class<?> cls)
Checks if is primitive type.
|
static boolean |
isProperSubCollection(Collection<?> subColl,
Collection<?> coll)
Returns
true if subColl is a proper sub-collection of coll,
that is, if the cardinality of e in subColl is less
than or equal to the cardinality of e in coll,
for each element e in subColl, and there is at least one
element f such that the cardinality of f in coll
is strictly greater than the cardinality of f in subColl. |
static boolean |
isSorted(boolean[] a) |
static boolean |
isSorted(boolean[] a,
int fromIndex,
int toIndex) |
static boolean |
isSorted(byte[] a) |
static boolean |
isSorted(byte[] a,
int fromIndex,
int toIndex) |
static boolean |
isSorted(char[] a) |
static boolean |
isSorted(char[] a,
int fromIndex,
int toIndex) |
static <T extends Comparable<? super T>> |
isSorted(Collection<T> c) |
static <T> boolean |
isSorted(Collection<T> c,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
isSorted(Collection<T> c,
int fromIndex,
int toIndex) |
static <T> boolean |
isSorted(Collection<T> c,
int fromIndex,
int toIndex,
Comparator<? super T> cmp) |
static boolean |
isSorted(double[] a) |
static boolean |
isSorted(double[] a,
int fromIndex,
int toIndex) |
static boolean |
isSorted(float[] a) |
static boolean |
isSorted(float[] a,
int fromIndex,
int toIndex) |
static boolean |
isSorted(int[] a) |
static boolean |
isSorted(int[] a,
int fromIndex,
int toIndex) |
static boolean |
isSorted(long[] a) |
static boolean |
isSorted(long[] a,
int fromIndex,
int toIndex) |
static boolean |
isSorted(short[] a) |
static boolean |
isSorted(short[] a,
int fromIndex,
int toIndex) |
static <T extends Comparable<? super T>> |
isSorted(T[] a) |
static <T> boolean |
isSorted(T[] a,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
isSorted(T[] a,
int fromIndex,
int toIndex) |
static <T> boolean |
isSorted(T[] a,
int fromIndex,
int toIndex,
Comparator<? super T> cmp) |
static boolean |
isSubCollection(Collection<?> subColl,
Collection<?> coll)
Returns
true if subColl is a sub-collection of coll,
that is, if the cardinality of e in subColl is less than or
equal to the cardinality of e in coll, for each element e
in subColl. |
static boolean |
isWrapperType(Class<?> cls)
Checks if is wrapper type.
|
static <T> Iterator<T> |
iterate(Iterable<? extends T> iterable) |
static <T> ObjIterator<T> |
iterate(T[] a) |
static <T> ObjIterator<T> |
iterate(T[] a,
int fromIndex,
int toIndex) |
static String |
json2XML(Class<?> cls,
String json)
Json 2 XML.
|
static String |
json2XML(String json)
Json 2 XML.
|
static byte |
kthLargest(byte[] a,
int k) |
static byte |
kthLargest(byte[] a,
int fromIndex,
int toIndex,
int k) |
static char |
kthLargest(char[] a,
int k) |
static char |
kthLargest(char[] a,
int fromIndex,
int toIndex,
int k) |
static <T extends Comparable<? super T>> |
kthLargest(Collection<? extends T> c,
int k) |
static <T> T |
kthLargest(Collection<? extends T> c,
int k,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
kthLargest(Collection<? extends T> c,
int fromIndex,
int toIndex,
int k) |
static <T> T |
kthLargest(Collection<? extends T> c,
int fromIndex,
int toIndex,
int k,
Comparator<? super T> cmp) |
static double |
kthLargest(double[] a,
int k) |
static double |
kthLargest(double[] a,
int fromIndex,
int toIndex,
int k) |
static float |
kthLargest(float[] a,
int k) |
static float |
kthLargest(float[] a,
int fromIndex,
int toIndex,
int k) |
static int |
kthLargest(int[] a,
int k) |
static int |
kthLargest(int[] a,
int fromIndex,
int toIndex,
int k) |
static long |
kthLargest(long[] a,
int k) |
static long |
kthLargest(long[] a,
int fromIndex,
int toIndex,
int k) |
static short |
kthLargest(short[] a,
int k) |
static short |
kthLargest(short[] a,
int fromIndex,
int toIndex,
int k) |
static <T extends Comparable<? super T>> |
kthLargest(T[] a,
int k) |
static <T> T |
kthLargest(T[] a,
int k,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
kthLargest(T[] a,
int fromIndex,
int toIndex,
int k) |
static <T> T |
kthLargest(T[] a,
int fromIndex,
int toIndex,
int k,
Comparator<? super T> cmp) |
static <T> List<T> |
last(Collection<? extends T> c,
int n)
Return at most last
n elements. |
static <T> u.Nullable<T> |
last(Collection<T> c) |
static <T> u.Nullable<T> |
last(Iterator<T> iter) |
static <K,V> u.Optional<Map.Entry<K,V>> |
lastEntry(Map<K,V> map) |
static int |
lastIndexOf(boolean[] a,
boolean valueToFind)
Last index of.
|
static int |
lastIndexOf(boolean[] a,
int startIndexFromBack,
boolean valueToFind)
Last index of.
|
static int |
lastIndexOf(byte[] a,
byte valueToFind)
Last index of.
|
static int |
lastIndexOf(byte[] a,
int startIndexFromBack,
byte valueToFind)
Last index of.
|
static int |
lastIndexOf(char[] a,
char valueToFind)
Last index of.
|
static int |
lastIndexOf(char[] a,
int startIndexFromBack,
char valueToFind)
Last index of.
|
static int |
lastIndexOf(Collection<?> c,
int startIndexFromBack,
Object valueToFind)
Last index of.
|
static int |
lastIndexOf(Collection<?> c,
Object valueToFind)
Last index of.
|
static int |
lastIndexOf(double[] a,
double valueToFind)
Last index of.
|
static int |
lastIndexOf(double[] a,
double valueToFind,
double tolerance)
Finds the last index of the given value within a given tolerance in the array.
|
static int |
lastIndexOf(double[] a,
int startIndexFromBack,
double valueToFind)
Last index of.
|
static int |
lastIndexOf(double[] a,
int startIndexFromBack,
double valueToFind,
double tolerance)
Finds the last index of the given value in the array starting at the given index.
|
static int |
lastIndexOf(float[] a,
float valueToFind)
Last index of.
|
static int |
lastIndexOf(float[] a,
int startIndexFromBack,
float valueToFind)
Last index of.
|
static int |
lastIndexOf(int[] a,
int valueToFind)
Last index of.
|
static int |
lastIndexOf(int[] a,
int startIndexFromBack,
int valueToFind)
Last index of.
|
static int |
lastIndexOf(long[] a,
int startIndexFromBack,
long valueToFind)
Last index of.
|
static int |
lastIndexOf(long[] a,
long valueToFind)
Last index of.
|
static int |
lastIndexOf(Object[] a,
int startIndexFromBack,
Object valueToFind)
Last index of.
|
static int |
lastIndexOf(Object[] a,
Object valueToFind)
Last index of.
|
static int |
lastIndexOf(short[] a,
int startIndexFromBack,
short valueToFind)
Last index of.
|
static int |
lastIndexOf(short[] a,
short valueToFind)
Last index of.
|
static int |
lastIndexOfSubList(List<?> sourceList,
List<?> subListToFind)
Last index of sub list.
|
static <T> u.Optional<T> |
lastNonNull(Collection<T> c)
Last non null.
|
static <T> u.Optional<T> |
lastNonNull(Iterator<T> iter)
Last non null.
|
static <T> u.Optional<T> |
lastNonNull(T... a)
Last non null.
|
static <T> u.Optional<T> |
lastNonNull(T a,
T b)
Last non null.
|
static <T> u.Optional<T> |
lastNonNull(T a,
T b,
T c)
Last non null.
|
static <T> T |
lastOrDefaultIfEmpty(Collection<T> c,
T defaultValueForEmpty)
Last or default if empty.
|
static <T> T |
lastOrDefaultIfEmpty(Iterator<T> iter,
T defaultValueForEmpty)
Last or default if empty.
|
static <T> T |
lastOrDefaultIfEmpty(T[] a,
T defaultValueForEmpty)
Last or default if empty.
|
static <T> T |
lastOrNullIfEmpty(Collection<T> c)
Last or null if empty.
|
static <T> T |
lastOrNullIfEmpty(Iterator<T> iter)
Last or null if empty.
|
static <T> T |
lastOrNullIfEmpty(T[] a)
Last or null if empty.
|
static <T> LazyInitializer<T> |
lazyInit(Supplier<T> supplier) |
static <T,E extends Exception> |
lazyInitialize(Throwables.Supplier<T,E> supplier) |
static int |
len(boolean[] a)
Returns the length/size of the specified
Array/Collection/Map/CharSequence, or 0 if it's empty or null. |
static int |
len(byte[] a)
Returns the length/size of the specified
Array/Collection/Map/CharSequence, or 0 if it's empty or null. |
static int |
len(char[] a)
Returns the length/size of the specified
Array/Collection/Map/CharSequence, or 0 if it's empty or null. |
static int |
len(CharSequence s)
Returns the length/size of the specified
Array/Collection/Map/CharSequence, or 0 if it's empty or null. |
static int |
len(double[] a)
Returns the length/size of the specified
Array/Collection/Map/CharSequence, or 0 if it's empty or null. |
static int |
len(float[] a)
Returns the length/size of the specified
Array/Collection/Map/CharSequence, or 0 if it's empty or null. |
static int |
len(int[] a)
Returns the length/size of the specified
Array/Collection/Map/CharSequence, or 0 if it's empty or null. |
static int |
len(long[] a)
Returns the length/size of the specified
Array/Collection/Map/CharSequence, or 0 if it's empty or null. |
static int |
len(Object[] a)
Returns the length/size of the specified
Array/Collection/Map/CharSequence, or 0 if it's empty or null. |
static int |
len(short[] a)
Returns the length/size of the specified
Array/Collection/Map/CharSequence, or 0 if it's empty or null. |
static <T extends Comparable<? super T>> |
lessEqual(T a,
T b)
Returns
true is a <= b, otherwise false is returned. |
static <T extends Comparable<? super T>> |
lessThan(T a,
T b)
Returns
true is a < b, otherwise false is returned. |
static <T,R,E extends Exception> |
map(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.Function<? super T,? extends R,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,R,C extends Collection<R>,E extends Exception> |
map(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.Function<? super T,? extends R,E> func,
IntFunction<? extends C> supplier)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,R,E extends Exception> |
map(Collection<? extends T> c,
Throwables.Function<? super T,? extends R,E> func) |
static <T,R,C extends Collection<R>,E extends Exception> |
map(Collection<? extends T> c,
Throwables.Function<? super T,? extends R,E> func,
IntFunction<? extends C> supplier) |
static <T,R,E extends Exception> |
map(T[] a,
int fromIndex,
int toIndex,
Throwables.Function<? super T,? extends R,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,R,C extends Collection<R>,E extends Exception> |
map(T[] a,
int fromIndex,
int toIndex,
Throwables.Function<? super T,? extends R,E> func,
IntFunction<? extends C> supplier)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,R,E extends Exception> |
map(T[] a,
Throwables.Function<? super T,? extends R,E> func) |
static <T,R,C extends Collection<R>,E extends Exception> |
map(T[] a,
Throwables.Function<? super T,? extends R,E> func,
IntFunction<? extends C> supplier) |
static <T,E extends Exception> |
mapToBoolean(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.ToBooleanFunction<? super T,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
mapToBoolean(Collection<? extends T> c,
Throwables.ToBooleanFunction<? super T,E> func)
Map to boolean.
|
static <T,E extends Exception> |
mapToBoolean(T[] a,
int fromIndex,
int toIndex,
Throwables.ToBooleanFunction<? super T,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
mapToBoolean(T[] a,
Throwables.ToBooleanFunction<? super T,E> func)
Map to boolean.
|
static <T,E extends Exception> |
mapToByte(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.ToByteFunction<? super T,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
mapToByte(Collection<? extends T> c,
Throwables.ToByteFunction<? super T,E> func)
Map to byte.
|
static <T,E extends Exception> |
mapToByte(T[] a,
int fromIndex,
int toIndex,
Throwables.ToByteFunction<? super T,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
mapToByte(T[] a,
Throwables.ToByteFunction<? super T,E> func)
Map to byte.
|
static <T,E extends Exception> |
mapToChar(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.ToCharFunction<? super T,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
mapToChar(Collection<? extends T> c,
Throwables.ToCharFunction<? super T,E> func)
Map to char.
|
static <T,E extends Exception> |
mapToChar(T[] a,
int fromIndex,
int toIndex,
Throwables.ToCharFunction<? super T,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
mapToChar(T[] a,
Throwables.ToCharFunction<? super T,E> func)
Map to char.
|
static <T,E extends Exception> |
mapToDouble(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.ToDoubleFunction<? super T,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
mapToDouble(Collection<? extends T> c,
Throwables.ToDoubleFunction<? super T,E> func)
Map to double.
|
static <T,E extends Exception> |
mapToDouble(T[] a,
int fromIndex,
int toIndex,
Throwables.ToDoubleFunction<? super T,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
mapToDouble(T[] a,
Throwables.ToDoubleFunction<? super T,E> func)
Map to double.
|
static <T,E extends Exception> |
mapToFloat(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.ToFloatFunction<? super T,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
mapToFloat(Collection<? extends T> c,
Throwables.ToFloatFunction<? super T,E> func)
Map to float.
|
static <T,E extends Exception> |
mapToFloat(T[] a,
int fromIndex,
int toIndex,
Throwables.ToFloatFunction<? super T,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
mapToFloat(T[] a,
Throwables.ToFloatFunction<? super T,E> func)
Map to float.
|
static <T,E extends Exception> |
mapToInt(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.ToIntFunction<? super T,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
mapToInt(Collection<? extends T> c,
Throwables.ToIntFunction<? super T,E> func)
Map to int.
|
static <T,E extends Exception> |
mapToInt(T[] a,
int fromIndex,
int toIndex,
Throwables.ToIntFunction<? super T,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
mapToInt(T[] a,
Throwables.ToIntFunction<? super T,E> func)
Map to int.
|
static <T,E extends Exception> |
mapToLong(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.ToLongFunction<? super T,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
mapToLong(Collection<? extends T> c,
Throwables.ToLongFunction<? super T,E> func)
Map to long.
|
static <T,E extends Exception> |
mapToLong(T[] a,
int fromIndex,
int toIndex,
Throwables.ToLongFunction<? super T,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
mapToLong(T[] a,
Throwables.ToLongFunction<? super T,E> func)
Map to long.
|
static <T,E extends Exception> |
mapToShort(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.ToShortFunction<? super T,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
mapToShort(Collection<? extends T> c,
Throwables.ToShortFunction<? super T,E> func)
Map to short.
|
static <T,E extends Exception> |
mapToShort(T[] a,
int fromIndex,
int toIndex,
Throwables.ToShortFunction<? super T,E> func)
Mostly it's designed for one-step operation to complete the operation in one step.
|
static <T,E extends Exception> |
mapToShort(T[] a,
Throwables.ToShortFunction<? super T,E> func)
Map to short.
|
static byte |
max(byte... a)
Returns the maximum value in an array.
|
static byte |
max(byte[] a,
int fromIndex,
int toIndex) |
static byte |
max(byte a,
byte b)
Gets the maximum of two
byte values. |
static byte |
max(byte a,
byte b,
byte c)
Gets the maximum of three
byte values. |
static char |
max(char... a)
Returns the maximum value in an array.
|
static char |
max(char[] a,
int fromIndex,
int toIndex) |
static char |
max(char a,
char b)
Gets the maximum of two
char values. |
static char |
max(char a,
char b,
char c)
Gets the maximum of three
char values. |
static <T extends Comparable<? super T>> |
max(Collection<? extends T> c) |
static <T> T |
max(Collection<? extends T> c,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
max(Collection<? extends T> c,
int fromIndex,
int toIndex) |
static <T> T |
max(Collection<? extends T> c,
int fromIndex,
int toIndex,
Comparator<? super T> cmp)
Returns the maximum element in the collection.
|
static double |
max(double... a)
Returns the maximum value in an array.
|
static double |
max(double[] a,
int fromIndex,
int toIndex) |
static double |
max(double a,
double b)
Gets the maximum of two
double values. |
static double |
max(double a,
double b,
double c)
Gets the maximum of three
double values. |
static float |
max(float... a)
Returns the maximum value in an array.
|
static float |
max(float[] a,
int fromIndex,
int toIndex) |
static float |
max(float a,
float b)
Gets the maximum of two
float values. |
static float |
max(float a,
float b,
float c)
Gets the maximum of three
float values. |
static int |
max(int... a)
Returns the maximum value in an array.
|
static int |
max(int[] a,
int fromIndex,
int toIndex) |
static int |
max(int a,
int b)
Gets the maximum of two
int values. |
static int |
max(int a,
int b,
int c)
Gets the maximum of three
int values. |
static long |
max(long... a)
Returns the maximum value in an array.
|
static long |
max(long[] a,
int fromIndex,
int toIndex) |
static long |
max(long a,
long b)
Gets the maximum of two
long values. |
static long |
max(long a,
long b,
long c)
Gets the maximum of three
long values. |
static short |
max(short... a)
Returns the maximum value in an array.
|
static short |
max(short[] a,
int fromIndex,
int toIndex) |
static short |
max(short a,
short b)
Gets the maximum of two
short values. |
static short |
max(short a,
short b,
short c)
Gets the maximum of three
short values. |
static <T extends Comparable<? super T>> |
max(T[] a)
Returns the maximum element in the array.
|
static <T> T |
max(T[] a,
Comparator<? super T> cmp)
Returns the maximum element in the array.
|
static <T extends Comparable<? super T>> |
max(T[] a,
int fromIndex,
int toIndex) |
static <T> T |
max(T[] a,
int fromIndex,
int toIndex,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
max(T a,
T b) |
static <T> T |
max(T a,
T b,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
max(T a,
T b,
T c) |
static <T> T |
max(T a,
T b,
T c,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
maxAll(Collection<? extends T> c) |
static <T> List<T> |
maxAll(Collection<? extends T> c,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
maxAll(Iterator<? extends T> iter) |
static <T> List<T> |
maxAll(Iterator<? extends T> iter,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
maxAll(T[] a) |
static <T> List<T> |
maxAll(T[] a,
Comparator<? super T> cmp) |
static byte |
median(byte... a)
Returns the
length / 2 + 1 largest value in the specified array. |
static byte |
median(byte[] a,
int fromIndex,
int toIndex) |
static byte |
median(byte a,
byte b,
byte c)
Gets the median of three values.
|
static char |
median(char... a)
Returns the
length / 2 + 1 largest value in the specified array. |
static char |
median(char[] a,
int fromIndex,
int toIndex) |
static char |
median(char a,
char b,
char c)
Gets the median of three values.
|
static <T extends Comparable<? super T>> |
median(Collection<? extends T> c)
Returns the
length / 2 + 1 largest value in the specified array. |
static <T> T |
median(Collection<? extends T> c,
Comparator<? super T> cmp)
Returns the
length / 2 + 1 largest value in the specified array. |
static <T extends Comparable<? super T>> |
median(Collection<? extends T> c,
int fromIndex,
int toIndex) |
static <T> T |
median(Collection<? extends T> c,
int fromIndex,
int toIndex,
Comparator<? super T> cmp) |
static double |
median(double... a)
Returns the
length / 2 + 1 largest value in the specified array. |
static double |
median(double[] a,
int fromIndex,
int toIndex) |
static double |
median(double a,
double b,
double c)
Gets the median of three values.
|
static float |
median(float... a)
Returns the
length / 2 + 1 largest value in the specified array. |
static float |
median(float[] a,
int fromIndex,
int toIndex) |
static float |
median(float a,
float b,
float c)
Gets the median of three values.
|
static int |
median(int... a)
Returns the
length / 2 + 1 largest value in the specified array. |
static int |
median(int[] a,
int fromIndex,
int toIndex) |
static int |
median(int a,
int b,
int c)
Gets the median of three values.
|
static long |
median(long... a)
Returns the
length / 2 + 1 largest value in the specified array. |
static long |
median(long[] a,
int fromIndex,
int toIndex) |
static long |
median(long a,
long b,
long c)
Gets the median of three values.
|
static short |
median(short... a)
Returns the
length / 2 + 1 largest value in the specified array. |
static short |
median(short[] a,
int fromIndex,
int toIndex) |
static short |
median(short a,
short b,
short c)
Gets the median of three values.
|
static <T extends Comparable<? super T>> |
median(T[] a)
Returns the
length / 2 + 1 largest value in the specified array. |
static <T> T |
median(T[] a,
Comparator<? super T> cmp)
Returns the
length / 2 + 1 largest value in the specified array. |
static <T extends Comparable<? super T>> |
median(T[] a,
int fromIndex,
int toIndex) |
static <T> T |
median(T[] a,
int fromIndex,
int toIndex,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
median(T a,
T b,
T c)
Gets the median of three values.
|
static <T> T |
median(T a,
T b,
T c,
Comparator<? super T> cmp)
Gets the median of three values.
|
static <T> List<T> |
merge(Collection<? extends Collection<? extends T>> c,
BiFunction<? super T,? super T,MergeResult> nextSelector) |
static <T,C extends Collection<T>> |
merge(Collection<? extends Collection<? extends T>> c,
BiFunction<? super T,? super T,MergeResult> nextSelector,
IntFunction<? extends C> supplier) |
static DataSet |
merge(Collection<? extends DataSet> dss) |
static <T,E extends Exception> |
merge(Collection<? extends T> a,
Collection<? extends T> b,
Throwables.BiFunction<? super T,? super T,MergeResult,E> nextSelector) |
static DataSet |
merge(DataSet a,
DataSet b) |
static DataSet |
merge(DataSet a,
DataSet b,
DataSet c) |
static <T> T |
merge(Object sourceEntity,
T targetEntity) |
static <T> T |
merge(Object sourceEntity,
T targetEntity,
BinaryOperator<?> mergeFunc) |
static <T> T |
merge(Object sourceEntity,
T targetEntity,
BiPredicate<String,?> filter)
Set all the signed properties(including all primitive type properties) in
the specified
sourceEntity to the specified targetEntity. |
static <T> T |
merge(Object sourceEntity,
T targetEntity,
BiPredicate<String,?> filter,
BinaryOperator<?> mergeFunc)
Set all the signed properties(including all primitive type properties) in
the specified
sourceEntity to the specified targetEntity. |
static <T> T |
merge(Object sourceEntity,
T targetEntity,
boolean ignoreUnmatchedProperty,
Set<String> ignorePropNames) |
static <T> T |
merge(Object sourceEntity,
T targetEntity,
boolean ignoreUnmatchedProperty,
Set<String> ignorePropNames,
BinaryOperator<?> mergeFunc) |
static <T> T |
merge(Object sourceEntity,
T targetEntity,
Collection<String> selectPropNames)
Set all the signed properties(including all primitive type properties) in
the specified
sourceEntity to the specified targetEntity. |
static <T> T |
merge(Object sourceEntity,
T targetEntity,
Collection<String> selectPropNames,
BinaryOperator<?> mergeFunc)
Set all the signed properties(including all primitive type properties) in
the specified
sourceEntity to the specified targetEntity. |
static <T,E extends Exception> |
merge(T[] a,
T[] b,
Throwables.BiFunction<? super T,? super T,MergeResult,E> nextSelector) |
static byte |
min(byte... a)
Returns the minimum value in an array.
|
static byte |
min(byte[] a,
int fromIndex,
int toIndex) |
static byte |
min(byte a,
byte b)
Gets the minimum of two
byte values. |
static byte |
min(byte a,
byte b,
byte c)
Gets the minimum of three
byte values. |
static char |
min(char... a)
Returns the minimum value in an array.
|
static char |
min(char[] a,
int fromIndex,
int toIndex) |
static char |
min(char a,
char b)
Gets the minimum of two
char values. |
static char |
min(char a,
char b,
char c)
Gets the minimum of three
char values. |
static <T extends Comparable<? super T>> |
min(Collection<? extends T> c) |
static <T> T |
min(Collection<? extends T> c,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
min(Collection<? extends T> c,
int fromIndex,
int toIndex) |
static <T> T |
min(Collection<? extends T> c,
int fromIndex,
int toIndex,
Comparator<? super T> cmp)
Returns the minimum element in the collection.
|
static double |
min(double... a)
Returns the minimum value in an array.
|
static double |
min(double[] a,
int fromIndex,
int toIndex) |
static double |
min(double a,
double b)
Gets the minimum of two
double values. |
static double |
min(double a,
double b,
double c)
Gets the minimum of three
double values. |
static float |
min(float... a)
Returns the minimum value in an array.
|
static float |
min(float[] a,
int fromIndex,
int toIndex) |
static float |
min(float a,
float b)
Gets the minimum of two
float values. |
static float |
min(float a,
float b,
float c)
Gets the minimum of three
float values. |
static int |
min(int... a)
Returns the minimum value in an array.
|
static int |
min(int[] a,
int fromIndex,
int toIndex) |
static int |
min(int a,
int b)
Gets the minimum of two
int values. |
static int |
min(int a,
int b,
int c)
Gets the minimum of three
int values. |
static long |
min(long... a)
Returns the minimum value in an array.
|
static long |
min(long[] a,
int fromIndex,
int toIndex) |
static long |
min(long a,
long b)
Gets the minimum of two
long values. |
static long |
min(long a,
long b,
long c)
Gets the minimum of three
long values. |
static short |
min(short... a)
Returns the minimum value in an array.
|
static short |
min(short[] a,
int fromIndex,
int toIndex) |
static short |
min(short a,
short b)
Gets the minimum of two
short values. |
static short |
min(short a,
short b,
short c)
Gets the minimum of three
short values. |
static <T extends Comparable<? super T>> |
min(T[] a)
Returns the minimum element in the array.
|
static <T> T |
min(T[] a,
Comparator<? super T> cmp)
Returns the minimum element in the array.
|
static <T extends Comparable<? super T>> |
min(T[] a,
int fromIndex,
int toIndex) |
static <T> T |
min(T[] a,
int fromIndex,
int toIndex,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
min(T a,
T b) |
static <T> T |
min(T a,
T b,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
min(T a,
T b,
T c) |
static <T> T |
min(T a,
T b,
T c,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
minAll(Collection<T> c) |
static <T> List<T> |
minAll(Collection<T> c,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
minAll(Iterator<? extends T> iter) |
static <T> List<T> |
minAll(Iterator<? extends T> iter,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
minAll(T[] a) |
static <T> List<T> |
minAll(T[] a,
Comparator<? super T> cmp) |
static void |
moveRange(boolean[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex) |
static void |
moveRange(byte[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex) |
static void |
moveRange(char[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex) |
static void |
moveRange(double[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex) |
static void |
moveRange(float[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex) |
static void |
moveRange(int[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex) |
static <T> boolean |
moveRange(List<T> c,
int fromIndex,
int toIndex,
int newPositionStartIndex) |
static void |
moveRange(long[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex) |
static void |
moveRange(short[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex) |
static String |
moveRange(String str,
int fromIndex,
int toIndex,
int newPositionStartIndex) |
static <T> void |
moveRange(T[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex) |
static <T> T |
newArray(Class<?> componentType,
int length) |
static <T> ArrayDeque<T> |
newArrayDeque()
New array deque.
|
static <E> ArrayDeque<E> |
newArrayDeque(Collection<? extends E> c)
Constructs a deque containing the elements of the specified collection, in the order they are returned by the collection's iterator.
|
static <T> ArrayDeque<T> |
newArrayDeque(int numElements)
Constructs an empty array deque with an initial capacity sufficient to hold the specified number of elements.
|
static <T> ArrayList<T> |
newArrayList()
New array list.
|
static <T> ArrayList<T> |
newArrayList(Collection<? extends T> c)
New array list.
|
static <T> ArrayList<T> |
newArrayList(int initialCapacity)
New array list.
|
static <K,V> BiMap<K,V> |
newBiMap()
New bi map.
|
static <K,V> BiMap<K,V> |
newBiMap(Class<? extends Map> keyMapType,
Class<? extends Map> valueMapType)
New bi map.
|
static <K,V> BiMap<K,V> |
newBiMap(int initialCapacity)
New bi map.
|
static <K,V> BiMap<K,V> |
newBiMap(int initialCapacity,
float loadFactor)
New bi map.
|
static <K,V> BiMap<K,V> |
newBiMap(Supplier<? extends Map<K,V>> keyMapSupplier,
Supplier<? extends Map<V,K>> valueMapSupplier)
New bi map.
|
static <K,V> ConcurrentHashMap<K,V> |
newConcurrentHashMap()
New concurrent hash map.
|
static <K,V> ConcurrentHashMap<K,V> |
newConcurrentHashMap(int initialCapacity)
New concurrent hash map.
|
static <K,V> ConcurrentHashMap<K,V> |
newConcurrentHashMap(Map<? extends K,? extends V> m)
New concurrent hash map.
|
static <T> DataSet |
newDataSet(Collection<String> columnNames,
Collection<T> rowList)
If the specified
columnNames is null or empty, the first row will be used as column names if its type is array or list,
or obtain the column names from first row if its type is entity or map. |
static DataSet |
newDataSet(Collection<String> columnNames,
Object[][] rowList) |
static <T> DataSet |
newDataSet(Collection<T> rows)
The first row will be used as column names if its type is array or list,
or obtain the column names from first row if its type is entity or map.
|
static <C extends Collection<?>> |
newDataSet(Map<String,C> map)
New data set.
|
static DataSet |
newDataSet(String keyColumnName,
String valueColumnName,
Map<?,?> m)
Convert the specified Map to a two columns
DataSet: one column is for keys and one column is for values. |
static DataSet |
newEmptyDataSet()
New empty data set.
|
static DataSet |
newEmptyDataSet(Collection<String> columnNames)
New empty data set.
|
static <T> T |
newEntity(Class<T> cls) |
static <T> T |
newEntity(Class<T> cls,
String entityName) |
static <K,V> Map.Entry<K,V> |
newEntry(K key,
V value) |
static <K,V> Map<K,V> |
newHashMap()
New hash map.
|
static <K,V,E extends Exception> |
newHashMap(Collection<? extends V> c,
Throwables.Function<? super V,? extends K,E> keyMapper)
New hash map.
|
static <K,V> Map<K,V> |
newHashMap(int initialCapacity)
New hash map.
|
static <K,V> Map<K,V> |
newHashMap(Map<? extends K,? extends V> m)
New hash map.
|
static <T> Set<T> |
newHashSet()
New hash set.
|
static <T> Set<T> |
newHashSet(Collection<? extends T> c)
New hash set.
|
static <T> Set<T> |
newHashSet(int initialCapacity)
New hash set.
|
static <K,V> IdentityHashMap<K,V> |
newIdentityHashMap()
New identity hash map.
|
static <K,V> IdentityHashMap<K,V> |
newIdentityHashMap(int initialCapacity)
New identity hash map.
|
static <K,V> IdentityHashMap<K,V> |
newIdentityHashMap(Map<? extends K,? extends V> m)
New identity hash map.
|
static <K,V> ImmutableEntry<K,V> |
newImmutableEntry(K key,
V value)
New immutable entry.
|
static <T> T |
newInstance(Class<T> cls) |
static <K,V> Map<K,V> |
newLinkedHashMap()
New linked hash map.
|
static <K,V,E extends Exception> |
newLinkedHashMap(Collection<? extends V> c,
Throwables.Function<? super V,? extends K,E> keyMapper)
New linked hash map.
|
static <K,V> Map<K,V> |
newLinkedHashMap(int initialCapacity)
New linked hash map.
|
static <K,V> Map<K,V> |
newLinkedHashMap(Map<? extends K,? extends V> m)
New linked hash map.
|
static <T> Set<T> |
newLinkedHashSet()
New linked hash set.
|
static <T> Set<T> |
newLinkedHashSet(Collection<? extends T> c)
New linked hash set.
|
static <T> Set<T> |
newLinkedHashSet(int initialCapacity)
New linked hash set.
|
static <T> LinkedList<T> |
newLinkedList()
New linked list.
|
static <T> LinkedList<T> |
newLinkedList(Collection<? extends T> c)
New linked list.
|
static <K,E> ListMultimap<K,E> |
newLinkedListMultimap()
Return a
ListMultimap backed by LinkedHashMap. |
static <K,E> ListMultimap<K,E> |
newLinkedListMultimap(int initialCapacity)
Return a
ListMultimap backed by LinkedHashMap. |
static <K,E> ListMultimap<K,E> |
newLinkedListMultimap(Map<? extends K,? extends E> m)
Return a
ListMultimap backed by LinkedHashMap. |
static <K,E> SetMultimap<K,E> |
newLinkedSetMultimap()
Return a
SetMultimap backed by LinkedHashMap. |
static <K,E> SetMultimap<K,E> |
newLinkedSetMultimap(int initialCapacity)
Return a
SetMultimap backed by LinkedHashMap. |
static <K,E> SetMultimap<K,E> |
newLinkedSetMultimap(Map<? extends K,? extends E> m)
Return a
SetMultimap backed by LinkedHashMap. |
static <K,E> ListMultimap<K,E> |
newListMultimap()
New list multimap.
|
static <K,E> ListMultimap<K,E> |
newListMultimap(Class<? extends Map> mapType)
New list multimap.
|
static <K,E> ListMultimap<K,E> |
newListMultimap(Class<? extends Map> mapType,
Class<? extends List> valueType)
New list multimap.
|
static <K,E> ListMultimap<K,E> |
newListMultimap(int initialCapacity)
New list multimap.
|
static <K,E> ListMultimap<K,E> |
newListMultimap(Map<? extends K,? extends E> m)
New list multimap.
|
static <K,E> ListMultimap<K,E> |
newListMultimap(Supplier<? extends Map<K,List<E>>> mapSupplier,
Supplier<? extends List<E>> valueSupplier)
New list multimap.
|
static <K,E,V extends Collection<E>> |
newMultimap(Supplier<? extends Map<K,V>> mapSupplier,
Supplier<? extends V> valueSupplier) |
static <T> Multiset<T> |
newMultiset() |
static <T> Multiset<T> |
newMultiset(Class<? extends Map> valueMapType) |
static <T> Multiset<T> |
newMultiset(Collection<? extends T> c) |
static <T> Multiset<T> |
newMultiset(int initialCapacity) |
static <T> Multiset<T> |
newMultiset(Supplier<? extends Map<T,?>> mapSupplier) |
static <T> T |
newProxyInstance(Class<?>[] interfaceClasses,
InvocationHandler h)
Refer to
java.lang.reflect |
static <T> T |
newProxyInstance(Class<T> interfaceClass,
InvocationHandler h)
New proxy instance.
|
static <E> Set<E> |
newSetFromMap(Map<E,Boolean> map)
Returns a set backed by the specified map.
|
static <K,E> SetMultimap<K,E> |
newSetMultimap()
New set multimap.
|
static <K,E> SetMultimap<K,E> |
newSetMultimap(Class<? extends Map> mapType)
New set multimap.
|
static <K,E> SetMultimap<K,E> |
newSetMultimap(Class<? extends Map> mapType,
Class<? extends Set> valueType)
New set multimap.
|
static <K,E> SetMultimap<K,E> |
newSetMultimap(int initialCapacity)
New set multimap.
|
static <K,E> SetMultimap<K,E> |
newSetMultimap(Map<? extends K,? extends E> m)
New set multimap.
|
static <K,E> SetMultimap<K,E> |
newSetMultimap(Supplier<? extends Map<K,Set<E>>> mapSupplier,
Supplier<? extends Set<E>> valueSupplier)
New set multimap.
|
static <K extends Comparable<? super K>,E> |
newSortedListMultimap()
Return a
ListMultimap backed by SortedMap. |
static <K extends Comparable<? super K>,E> |
newSortedListMultimap(Map<? extends K,? extends E> m)
Return a
ListMultimap backed by SortedMap. |
static <K extends Comparable<? super K>,E> |
newSortedSetMultimap()
Return a
SetMultimap backed by SortedMap. |
static <K extends Comparable<? super K>,E> |
newSortedSetMultimap(Map<? extends K,? extends E> m)
Return a
SetMultimap backed by SortedMap. |
static <K extends Comparable<? super K>,V> |
newTreeMap()
New tree map.
|
static <C,K extends C,V> |
newTreeMap(Comparator<C> comparator)
New tree map.
|
static <K extends Comparable<? super K>,V> |
newTreeMap(Map<? extends K,? extends V> m)
New tree map.
|
static <K,V> TreeMap<K,V> |
newTreeMap(SortedMap<K,? extends V> m)
New tree map.
|
static <T extends Comparable<? super T>> |
newTreeSet()
New tree set.
|
static <T extends Comparable<? super T>> |
newTreeSet(Collection<? extends T> c)
New tree set.
|
static <T> TreeSet<T> |
newTreeSet(Comparator<? super T> comparator)
New tree set.
|
static <T> TreeSet<T> |
newTreeSet(SortedSet<T> c)
New tree set.
|
static <T,E extends Exception> |
nMatch(Collection<? extends T> c,
int atLeast,
int atMost,
Throwables.Predicate<? super T,E> filter) |
static <T,E extends Exception> |
nMatch(Iterator<? extends T> iter,
int atLeast,
int atMost,
Throwables.Predicate<? super T,E> filter) |
static <T,E extends Exception> |
nMatch(T[] a,
int atLeast,
int atMost,
Throwables.Predicate<? super T,E> filter) |
static <T,E extends Exception> |
noneMatch(Collection<? extends T> c,
Throwables.Predicate<? super T,E> filter) |
static <T,E extends Exception> |
noneMatch(Iterator<? extends T> iter,
Throwables.Predicate<? super T,E> filter) |
static <T,E extends Exception> |
noneMatch(T[] a,
Throwables.Predicate<? super T,E> filter) |
static boolean |
notNullOrEmpty(boolean[] a)
Not null or empty.
|
static boolean |
notNullOrEmpty(byte[] a)
Not null or empty.
|
static boolean |
notNullOrEmpty(char[] a)
Not null or empty.
|
static boolean |
notNullOrEmpty(CharSequence s)
Not null or empty.
|
static boolean |
notNullOrEmpty(Collection<?> c)
Not null or empty.
|
static boolean |
notNullOrEmpty(DataSet rs)
Not null or empty.
|
static boolean |
notNullOrEmpty(double[] a)
Not null or empty.
|
static boolean |
notNullOrEmpty(float[] a)
Not null or empty.
|
static boolean |
notNullOrEmpty(int[] a)
Not null or empty.
|
static boolean |
notNullOrEmpty(long[] a)
Not null or empty.
|
static boolean |
notNullOrEmpty(Map<?,?> m)
Not null or empty.
|
static boolean |
notNullOrEmpty(Multimap<?,?,?> m)
Not null or empty.
|
static boolean |
notNullOrEmpty(Multiset<?> s)
Not null or empty.
|
static boolean |
notNullOrEmpty(Object[] a)
Not null or empty.
|
static boolean |
notNullOrEmpty(short[] a)
Not null or empty.
|
static boolean |
notNullOrEmptyOrBlank(CharSequence s)
Not null or empty or blank.
|
static boolean[] |
nullToEmpty(boolean[] a)
Null to empty.
|
static byte[] |
nullToEmpty(byte[] a)
Null to empty.
|
static char[] |
nullToEmpty(char[] a)
Null to empty.
|
static <T> T[] |
nullToEmpty(Class<T[]> arrayType,
T[] a)
Deprecated.
replaced by
CommonUtil.nullToEmpty(Object[], Class) |
static double[] |
nullToEmpty(double[] a)
Null to empty.
|
static float[] |
nullToEmpty(float[] a)
Null to empty.
|
static <K,V> ImmutableBiMap<K,V> |
nullToEmpty(ImmutableBiMap<K,V> map)
Returns an immutable empty map if the specified ImmutableBiMap is
null, otherwise itself is returned. |
static <T> ImmutableCollection<T> |
nullToEmpty(ImmutableCollection<T> c)
Returns an immutable empty Collection if the specified ImmutableCollection is
null, otherwise itself is returned. |
static <T> ImmutableList<T> |
nullToEmpty(ImmutableList<T> list)
Returns an immutable empty list if the specified ImmutableList is
null, otherwise itself is returned. |
static <K,V> ImmutableMap<K,V> |
nullToEmpty(ImmutableMap<K,V> map)
Returns an immutable empty map if the specified ImmutableMap is
null, otherwise itself is returned. |
static <K,V> ImmutableNavigableMap<K,V> |
nullToEmpty(ImmutableNavigableMap<K,V> map)
Returns an immutable empty map if the specified ImmutableNavigableMap is
null, otherwise itself is returned. |
static <T> ImmutableNavigableSet<T> |
nullToEmpty(ImmutableNavigableSet<T> set)
Returns an immutable empty list if the specified ImmutableNavigableSet is
null, otherwise itself is returned. |
static <T> ImmutableSet<T> |
nullToEmpty(ImmutableSet<T> set)
Returns an immutable empty list if the specified ImmutableSet is
null, otherwise itself is returned. |
static <K,V> ImmutableSortedMap<K,V> |
nullToEmpty(ImmutableSortedMap<K,V> map)
Returns an immutable empty map if the specified ImmutableSortedMap is
null, otherwise itself is returned. |
static <T> ImmutableSortedSet<T> |
nullToEmpty(ImmutableSortedSet<T> set)
Returns an immutable empty list if the specified ImmutableSortedSet is
null, otherwise itself is returned. |
static int[] |
nullToEmpty(int[] a)
Null to empty.
|
static <T> Iterator<T> |
nullToEmpty(Iterator<T> iter)
Returns an immutable empty
Iterator if the specified Iterator is null, otherwise itself is returned. |
static <T> List<T> |
nullToEmpty(List<T> list)
Returns an immutable empty list if the specified List is
null, otherwise itself is returned. |
static <T> ListIterator<T> |
nullToEmpty(ListIterator<T> iter)
Returns an immutable empty
ListIterator if the specified ListIterator is null, otherwise itself is returned. |
static long[] |
nullToEmpty(long[] a)
Null to empty.
|
static <K,V> Map<K,V> |
nullToEmpty(Map<K,V> map)
Returns an immutable empty map if the specified Map is
null, otherwise itself is returned. |
static Object[] |
nullToEmpty(Object[] a)
Deprecated.
replaced by
CommonUtil.nullToEmpty(Object[], Class) |
static <T> Set<T> |
nullToEmpty(Set<T> set)
Returns an immutable empty set if the specified Set is
null, otherwise itself is returned. |
static short[] |
nullToEmpty(short[] a)
Null to empty.
|
static String |
nullToEmpty(String str)
Null to empty.
|
static String[] |
nullToEmpty(String[] a)
Null to empty.
|
static <T> T[] |
nullToEmpty(T[] a,
Class<T[]> arrayType)
Null to empty.
|
static int |
occurrencesOf(boolean[] a,
boolean valueToFind) |
static int |
occurrencesOf(byte[] a,
byte valueToFind) |
static int |
occurrencesOf(char[] a,
char valueToFind) |
static int |
occurrencesOf(Collection<?> c,
Object valueToFind) |
static int |
occurrencesOf(double[] a,
double valueToFind) |
static int |
occurrencesOf(float[] a,
float valueToFind) |
static int |
occurrencesOf(int[] a,
int valueToFind) |
static long |
occurrencesOf(Iterator<?> iter,
Object valueToFind) |
static int |
occurrencesOf(long[] a,
long valueToFind) |
static int |
occurrencesOf(Object[] a,
Object valueToFind) |
static int |
occurrencesOf(short[] a,
short valueToFind) |
static int |
occurrencesOf(String str,
String substr) |
static boolean |
parseBoolean(String str)
Returns a
Boolean with a value represented by the specified
string. |
static byte |
parseByte(String str)
Deprecated.
replaced by
Numbers.toByte(String) |
static char |
parseChar(String str)
Parses the char.
|
static double |
parseDouble(String str)
Deprecated.
replaced by
Numbers.toDouble(String) |
static float |
parseFloat(String str)
Deprecated.
replaced by
Numbers.toFloat(String) |
static int |
parseInt(String str)
Deprecated.
replaced by
Numbers.toInt(String) |
static long |
parseLong(String str)
Deprecated.
replaced by
Numbers.toLong(String) |
static short |
parseShort(String str)
Deprecated.
replaced by
Numbers.toShort(String) |
static Map<Percentage,Byte> |
percentiles(byte[] sortedArray)
Returns the elements at:
Percentage * length of the specified array. |
static Map<Percentage,Character> |
percentiles(char[] sortedArray)
Returns the elements at:
Percentage * length of the specified array. |
static Map<Percentage,Double> |
percentiles(double[] sortedArray)
Returns the elements at:
Percentage * length of the specified array. |
static Map<Percentage,Float> |
percentiles(float[] sortedArray)
Returns the elements at:
Percentage * length of the specified array. |
static Map<Percentage,Integer> |
percentiles(int[] sortedArray)
Returns the elements at:
Percentage * length of the specified array. |
static <T> Map<Percentage,T> |
percentiles(List<T> sortedList)
Returns the elements at:
Percentage * length of the specified array. |
static Map<Percentage,Long> |
percentiles(long[] sortedArray)
Returns the elements at:
Percentage * length of the specified array. |
static Map<Percentage,Short> |
percentiles(short[] sortedArray)
Returns the elements at:
Percentage * length of the specified array. |
static <T> Map<Percentage,T> |
percentiles(T[] sortedArray)
Returns the elements at:
Percentage * length of the specified array. |
static <T> T |
println(T obj) |
static boolean[] |
remove(boolean[] a,
boolean elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified
array.
|
static byte[] |
remove(byte[] a,
byte elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified
array.
|
static char[] |
remove(char[] a,
char elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified
array.
|
static <T> boolean |
remove(Collection<T> c,
T elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified
collection.
|
static double[] |
remove(double[] a,
double elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified
array.
|
static float[] |
remove(float[] a,
float elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified
array.
|
static int[] |
remove(int[] a,
int elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified
array.
|
static long[] |
remove(long[] a,
long elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified
array.
|
static short[] |
remove(short[] a,
short elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified
array.
|
static String[] |
remove(String[] a,
String elementToRemove) |
static <T> T[] |
remove(T[] a,
T elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified
array.
|
static <T> boolean |
removeAll(Collection<T> c,
Collection<?> elementsToRemove)
Removes the all.
|
static <T> boolean |
removeAll(Collection<T> c,
Iterator<?> elementsToRemove) |
static <T> boolean |
removeAll(Collection<T> c,
T... elementsToRemove)
Removes the all.
|
static String[] |
removeAll(String[] a,
String... elementsToRemove)
Returns a new array with removes all the occurrences of specified elementsToRemove from
a. |
static <T> T[] |
removeAll(T[] a,
T... elementsToRemove)
Returns a new array with removes all the occurrences of specified elementsToRemove from
a. |
static boolean[] |
removeAllOccurrences(boolean[] a,
boolean elementToRemove)
Removes all the occurrences of the specified elementToRemove from the specified
array.
|
static byte[] |
removeAllOccurrences(byte[] a,
byte elementToRemove)
Removes all the occurrences of the specified elementToRemove from the specified
array.
|
static char[] |
removeAllOccurrences(char[] a,
char elementToRemove)
Removes all the occurrences of the specified elementToRemove from the specified
array.
|
static <T> boolean |
removeAllOccurrences(Collection<T> c,
T elementToRemove)
Removes the all occurrences.
|
static double[] |
removeAllOccurrences(double[] a,
double elementToRemove)
Removes all the occurrences of the specified elementToRemove from the specified
array.
|
static float[] |
removeAllOccurrences(float[] a,
float elementToRemove)
Removes all the occurrences of the specified elementToRemove from the specified
array.
|
static int[] |
removeAllOccurrences(int[] a,
int elementToRemove)
Removes all the occurrences of the specified elementToRemove from the specified
array.
|
static long[] |
removeAllOccurrences(long[] a,
long elementToRemove)
Removes all the occurrences of the specified elementToRemove from the specified
array.
|
static short[] |
removeAllOccurrences(short[] a,
short elementToRemove)
Removes all the occurrences of the specified elementToRemove from the specified
array.
|
static String[] |
removeAllOccurrences(String[] a,
String elementToRemove) |
static <T> T[] |
removeAllOccurrences(T[] a,
T elementToRemove)
Removes all the occurrences of the specified elementToRemove from the specified
array.
|
static boolean[] |
removeDuplicates(boolean[] a)
Removes the duplicates.
|
static boolean[] |
removeDuplicates(boolean[] a,
int fromIndex,
int toIndex)
Removes the duplicates.
|
static byte[] |
removeDuplicates(byte[] a)
Removes the duplicates.
|
static byte[] |
removeDuplicates(byte[] a,
boolean isSorted)
Removes the duplicates.
|
static byte[] |
removeDuplicates(byte[] a,
int fromIndex,
int toIndex,
boolean isSorted)
Removes the duplicates.
|
static char[] |
removeDuplicates(char[] a)
Removes the duplicates.
|
static char[] |
removeDuplicates(char[] a,
boolean isSorted)
Removes the duplicates.
|
static char[] |
removeDuplicates(char[] a,
int fromIndex,
int toIndex,
boolean isSorted)
Removes the duplicates.
|
static boolean |
removeDuplicates(Collection<?> c)
Removes the duplicates.
|
static boolean |
removeDuplicates(Collection<?> c,
boolean isSorted)
Removes the duplicates.
|
static double[] |
removeDuplicates(double[] a)
Removes the duplicates.
|
static double[] |
removeDuplicates(double[] a,
boolean isSorted)
Removes the duplicates.
|
static double[] |
removeDuplicates(double[] a,
int fromIndex,
int toIndex,
boolean isSorted)
Removes the duplicates.
|
static float[] |
removeDuplicates(float[] a)
Removes the duplicates.
|
static float[] |
removeDuplicates(float[] a,
boolean isSorted)
Removes the duplicates.
|
static float[] |
removeDuplicates(float[] a,
int fromIndex,
int toIndex,
boolean isSorted)
Removes the duplicates.
|
static int[] |
removeDuplicates(int[] a)
Removes the duplicates.
|
static int[] |
removeDuplicates(int[] a,
boolean isSorted)
Removes the duplicates.
|
static int[] |
removeDuplicates(int[] a,
int fromIndex,
int toIndex,
boolean isSorted)
Removes the duplicates.
|
static long[] |
removeDuplicates(long[] a)
Removes the duplicates.
|
static long[] |
removeDuplicates(long[] a,
boolean isSorted)
Removes the duplicates.
|
static long[] |
removeDuplicates(long[] a,
int fromIndex,
int toIndex,
boolean isSorted)
Removes the duplicates.
|
static short[] |
removeDuplicates(short[] a)
Removes the duplicates.
|
static short[] |
removeDuplicates(short[] a,
boolean isSorted)
Removes the duplicates.
|
static short[] |
removeDuplicates(short[] a,
int fromIndex,
int toIndex,
boolean isSorted)
Removes the duplicates.
|
static String[] |
removeDuplicates(String[] a)
Removes the duplicates.
|
static String[] |
removeDuplicates(String[] a,
boolean isSorted)
Removes the duplicates.
|
static String[] |
removeDuplicates(String[] a,
int fromIndex,
int toIndex,
boolean isSorted)
Removes the duplicates.
|
static <T> T[] |
removeDuplicates(T[] a)
Removes all duplicates elements
|
static <T> T[] |
removeDuplicates(T[] a,
boolean isSorted)
Removes the duplicates.
|
static <T> T[] |
removeDuplicates(T[] a,
int fromIndex,
int toIndex,
boolean isSorted)
Removes the duplicates.
|
static <T> List<T> |
repeat(T value,
int n) |
static <T> List<T> |
repeatAll(Collection<T> c,
int n)
repeatAll(N.asList(1, 2, 3), 2) => [1, 2, 3, 1, 2, 3]
|
static <T> List<T> |
repeatAllToSize(Collection<T> c,
int size)
repeatAllToSize(N.asList(1, 2, 3), 5) => [1, 2, 3, 1, 2]
|
static <T> List<T> |
repeatEach(Collection<T> c,
int n)
Repeats the elements in the specified Collection one by one.
|
static <T> List<T> |
repeatEachToSize(Collection<T> c,
int size)
Repeats the elements in the specified Collection one by one till reach the specified size.
|
static int |
replaceAll(boolean[] a,
boolean oldVal,
boolean newVal) |
static <E extends Exception> |
replaceAll(boolean[] a,
Throwables.BooleanUnaryOperator<E> operator) |
static int |
replaceAll(byte[] a,
byte oldVal,
byte newVal) |
static <E extends Exception> |
replaceAll(byte[] a,
Throwables.ByteUnaryOperator<E> operator) |
static int |
replaceAll(char[] a,
char oldVal,
char newVal) |
static <E extends Exception> |
replaceAll(char[] a,
Throwables.CharUnaryOperator<E> operator) |
static int |
replaceAll(double[] a,
double oldVal,
double newVal) |
static <E extends Exception> |
replaceAll(double[] a,
Throwables.DoubleUnaryOperator<E> operator) |
static int |
replaceAll(float[] a,
float oldVal,
float newVal) |
static <E extends Exception> |
replaceAll(float[] a,
Throwables.FloatUnaryOperator<E> operator) |
static int |
replaceAll(int[] a,
int oldVal,
int newVal) |
static <E extends Exception> |
replaceAll(int[] a,
Throwables.IntUnaryOperator<E> operator) |
static <T> int |
replaceAll(List<T> list,
Object oldVal,
T newVal) |
static <T,E extends Exception> |
replaceAll(List<T> list,
Throwables.UnaryOperator<T,E> operator) |
static int |
replaceAll(long[] a,
long oldVal,
long newVal) |
static <E extends Exception> |
replaceAll(long[] a,
Throwables.LongUnaryOperator<E> operator) |
static int |
replaceAll(short[] a,
short oldVal,
short newVal) |
static <E extends Exception> |
replaceAll(short[] a,
Throwables.ShortUnaryOperator<E> operator) |
static <T> int |
replaceAll(T[] a,
Object oldVal,
T newVal) |
static <T,E extends Exception> |
replaceAll(T[] a,
Throwables.UnaryOperator<T,E> operator) |
static <E extends Exception> |
replaceIf(boolean[] a,
Throwables.BooleanPredicate<E> predicate,
boolean newValue) |
static <E extends Exception> |
replaceIf(byte[] a,
Throwables.BytePredicate<E> predicate,
byte newValue) |
static <E extends Exception> |
replaceIf(char[] a,
Throwables.CharPredicate<E> predicate,
char newValue) |
static <E extends Exception> |
replaceIf(double[] a,
Throwables.DoublePredicate<E> predicate,
double newValue) |
static <E extends Exception> |
replaceIf(float[] a,
Throwables.FloatPredicate<E> predicate,
float newValue) |
static <E extends Exception> |
replaceIf(int[] a,
Throwables.IntPredicate<E> predicate,
int newValue) |
static <T,E extends Exception> |
replaceIf(List<T> c,
Throwables.Predicate<? super T,E> predicate,
T newValue) |
static <E extends Exception> |
replaceIf(long[] a,
Throwables.LongPredicate<E> predicate,
long newValue) |
static <E extends Exception> |
replaceIf(short[] a,
Throwables.ShortPredicate<E> predicate,
short newValue) |
static <T,E extends Exception> |
replaceIf(T[] a,
Throwables.Predicate<? super T,E> predicate,
T newValue) |
static boolean[] |
replaceRange(boolean[] a,
int fromIndex,
int toIndex,
boolean[] replacement)
Return a new array.
|
static byte[] |
replaceRange(byte[] a,
int fromIndex,
int toIndex,
byte[] replacement)
Return a new array.
|
static char[] |
replaceRange(char[] a,
int fromIndex,
int toIndex,
char[] replacement)
Return a new array.
|
static double[] |
replaceRange(double[] a,
int fromIndex,
int toIndex,
double[] replacement)
Return a new array.
|
static float[] |
replaceRange(float[] a,
int fromIndex,
int toIndex,
float[] replacement)
Return a new array.
|
static int[] |
replaceRange(int[] a,
int fromIndex,
int toIndex,
int[] replacement)
Return a new array.
|
static <T> boolean |
replaceRange(List<T> c,
int fromIndex,
int toIndex,
Collection<? extends T> replacement) |
static long[] |
replaceRange(long[] a,
int fromIndex,
int toIndex,
long[] replacement)
Return a new array.
|
static short[] |
replaceRange(short[] a,
int fromIndex,
int toIndex,
short[] replacement)
Return a new array.
|
static String[] |
replaceRange(String[] a,
int fromIndex,
int toIndex,
String[] replacement) |
static String |
replaceRange(String str,
int fromIndex,
int toIndex,
String replacement)
Returns a new String.
|
static <T> T[] |
replaceRange(T[] a,
int fromIndex,
int toIndex,
T[] replacement)
Return a new array.
|
static <T> boolean |
retainAll(Collection<T> c,
Collection<? extends T> objsToKeep) |
static void |
reverse(boolean[] a)
Reverses the order of the given array.
|
static void |
reverse(boolean[] a,
int fromIndex,
int toIndex)
Reverses the order of the given array in the given range.
|
static void |
reverse(byte[] a)
Reverses the order of the given array.
|
static void |
reverse(byte[] a,
int fromIndex,
int toIndex)
Reverses the order of the given array in the given range.
|
static void |
reverse(char[] a)
Reverses the order of the given array.
|
static void |
reverse(char[] a,
int fromIndex,
int toIndex)
Reverses the order of the given array in the given range.
|
static void |
reverse(Collection<?> c) |
static void |
reverse(double[] a)
Reverses the order of the given array.
|
static void |
reverse(double[] a,
int fromIndex,
int toIndex)
Reverses the order of the given array in the given range.
|
static void |
reverse(float[] a)
Reverses the order of the given array.
|
static void |
reverse(float[] a,
int fromIndex,
int toIndex)
Reverses the order of the given array in the given range.
|
static void |
reverse(int[] a)
Reverses the order of the given array.
|
static void |
reverse(int[] a,
int fromIndex,
int toIndex)
Reverses the order of the given array in the given range.
|
static void |
reverse(List<?> list) |
static void |
reverse(List<?> list,
int fromIndex,
int toIndex) |
static void |
reverse(long[] a)
Reverses the order of the given array.
|
static void |
reverse(long[] a,
int fromIndex,
int toIndex)
Reverses the order of the given array in the given range.
|
static void |
reverse(Object[] a)
Reverses the order of the given array.
|
static void |
reverse(Object[] a,
int fromIndex,
int toIndex)
Reverses the order of the given array in the given range.
|
static void |
reverse(short[] a)
Reverses the order of the given array.
|
static void |
reverse(short[] a,
int fromIndex,
int toIndex)
Reverses the order of the given array in the given range.
|
static void |
reverseSort(boolean[] a) |
static void |
reverseSort(byte[] a) |
static void |
reverseSort(byte[] a,
int fromIndex,
int toIndex) |
static void |
reverseSort(char[] a) |
static void |
reverseSort(char[] a,
int fromIndex,
int toIndex) |
static void |
reverseSort(double[] a) |
static void |
reverseSort(double[] a,
int fromIndex,
int toIndex) |
static void |
reverseSort(float[] a) |
static void |
reverseSort(float[] a,
int fromIndex,
int toIndex) |
static void |
reverseSort(int[] a) |
static void |
reverseSort(int[] a,
int fromIndex,
int toIndex) |
static <T extends Comparable<? super T>> |
reverseSort(List<? extends T> list) |
static <T extends Comparable<? super T>> |
reverseSort(List<? extends T> list,
int fromIndex,
int toIndex) |
static void |
reverseSort(long[] a) |
static void |
reverseSort(long[] a,
int fromIndex,
int toIndex) |
static void |
reverseSort(Object[] a) |
static void |
reverseSort(Object[] a,
int fromIndex,
int toIndex) |
static void |
reverseSort(short[] a) |
static void |
reverseSort(short[] a,
int fromIndex,
int toIndex) |
static <T,U extends Comparable<? super U>> |
reverseSortBy(List<? extends T> list,
Function<? super T,? extends U> keyMapper)
Reverse sort by.
|
static <T,U extends Comparable<? super U>> |
reverseSortBy(T[] a,
Function<? super T,? extends U> keyMapper)
Reverse sort by.
|
static void |
rotate(boolean[] a,
int distance) |
static void |
rotate(byte[] a,
int distance) |
static void |
rotate(char[] a,
int distance) |
static void |
rotate(Collection<?> c,
int distance) |
static void |
rotate(double[] a,
int distance) |
static void |
rotate(float[] a,
int distance) |
static void |
rotate(int[] a,
int distance) |
static void |
rotate(List<?> list,
int distance) |
static void |
rotate(long[] a,
int distance) |
static void |
rotate(Object[] a,
int distance) |
static void |
rotate(short[] a,
int distance) |
static void |
runUninterruptibly(long timeoutInMillis,
Throwables.LongConsumer<InterruptedException> cmd)
Note: Copied from Google Guava under Apache License v2.0
If a thread is interrupted during such a call, the call continues to block until the result is available or the timeout elapses, and only then re-interrupts the thread. |
static void |
runUninterruptibly(long timeout,
TimeUnit unit,
Throwables.BiConsumer<Long,TimeUnit,InterruptedException> cmd)
Note: Copied from Google Guava under Apache License v2.0
If a thread is interrupted during such a call, the call continues to block until the result is available or the timeout elapses, and only then re-interrupts the thread. |
static void |
runUninterruptibly(Throwables.Runnable<InterruptedException> cmd)
Note: Copied from Google Guava under Apache License v2.0
If a thread is interrupted during such a call, the call continues to block until the result is available or the timeout elapses, and only then re-interrupts the thread. |
static void |
shuffle(boolean[] a) |
static void |
shuffle(boolean[] a,
Random rnd) |
static void |
shuffle(byte[] a) |
static void |
shuffle(byte[] a,
Random rnd) |
static void |
shuffle(char[] a) |
static void |
shuffle(char[] a,
Random rnd) |
static void |
shuffle(Collection<?> c) |
static void |
shuffle(Collection<?> c,
Random rnd) |
static void |
shuffle(double[] a) |
static void |
shuffle(double[] a,
Random rnd) |
static void |
shuffle(float[] a) |
static void |
shuffle(float[] a,
Random rnd) |
static void |
shuffle(int[] a) |
static void |
shuffle(int[] a,
Random rnd) |
static void |
shuffle(List<?> list) |
static void |
shuffle(List<?> list,
Random rnd) |
static void |
shuffle(long[] a) |
static void |
shuffle(long[] a,
Random rnd) |
static void |
shuffle(short[] a) |
static void |
shuffle(short[] a,
Random rnd) |
static <T> void |
shuffle(T[] a) |
static <T> void |
shuffle(T[] a,
Random rnd) |
static int |
size(Collection<?> c)
Returns the length/size of the specified
Array/Collection/Map/CharSequence, or 0 if it's empty or null. |
static int |
size(Map<?,?> m)
Returns the length/size of the specified
Array/Collection/Map/CharSequence, or 0 if it's empty or null. |
static <T,E extends Exception> |
skipUntil(Collection<? extends T> c,
Throwables.Predicate<? super T,E> filter)
Skip until.
|
static <T,E extends Exception> |
skipUntil(T[] a,
Throwables.Predicate<? super T,E> filter)
Skip until.
|
static void |
sleep(long timeoutInMillis) |
static void |
sleep(long timeout,
TimeUnit unit) |
static void |
sleepUninterruptibly(long timeoutInMillis)
Note: Copied from Google Guava under Apache License v2.0
If a thread is interrupted during such a call, the call continues to block until the result is available or the timeout elapses, and only then re-interrupts the thread. |
static void |
sleepUninterruptibly(long timeout,
TimeUnit unit)
Note: Copied from Google Guava under Apache License v2.0
If a thread is interrupted during such a call, the call continues to block until the result is available or the timeout elapses, and only then re-interrupts the thread. |
static <T> ImmutableCollection<? extends T> |
slice(Collection<? extends T> c,
int fromIndex,
int toIndex)
Returns a read-only
ImmutableCollection. |
static <T> ObjIterator<T> |
slice(Iterator<T> iter,
long fromIndex,
long toIndex) |
static <T> ImmutableList<? extends T> |
slice(List<? extends T> c,
int fromIndex,
int toIndex)
Returns a read-only
ImmutableCollection. |
static <T> ImmutableList<? extends T> |
slice(T[] a,
int fromIndex,
int toIndex)
Returns a read-only
Seq. |
static void |
sort(boolean[] a) |
static void |
sort(byte[] a) |
static void |
sort(byte[] a,
int fromIndex,
int toIndex) |
static void |
sort(char[] a) |
static void |
sort(char[] a,
int fromIndex,
int toIndex) |
static void |
sort(double[] a) |
static void |
sort(double[] a,
int fromIndex,
int toIndex) |
static void |
sort(float[] a) |
static void |
sort(float[] a,
int fromIndex,
int toIndex) |
static void |
sort(int[] a) |
static void |
sort(int[] a,
int fromIndex,
int toIndex) |
static <T extends Comparable<? super T>> |
sort(List<? extends T> list) |
static <T> void |
sort(List<? extends T> list,
Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
sort(List<? extends T> list,
int fromIndex,
int toIndex) |
static <T> void |
sort(List<? extends T> list,
int fromIndex,
int toIndex,
Comparator<? super T> cmp) |
static void |
sort(long[] a) |
static void |
sort(long[] a,
int fromIndex,
int toIndex) |
static void |
sort(Object[] a) |
static void |
sort(Object[] a,
int fromIndex,
int toIndex) |
static void |
sort(short[] a) |
static void |
sort(short[] a,
int fromIndex,
int toIndex) |
static <T> void |
sort(T[] a,
Comparator<? super T> cmp) |
static <T> void |
sort(T[] a,
int fromIndex,
int toIndex,
Comparator<? super T> cmp) |
static <T,U extends Comparable<? super U>> |
sortBy(List<? extends T> list,
Function<? super T,? extends U> keyMapper) |
static <T,U extends Comparable<? super U>> |
sortBy(T[] a,
Function<? super T,? extends U> keyMapper) |
static <T> void |
sortByDouble(List<? extends T> list,
ToDoubleFunction<? super T> keyMapper)
Sort by double.
|
static <T> void |
sortByDouble(T[] a,
ToDoubleFunction<? super T> keyMapper) |
static <T> void |
sortByFloat(List<? extends T> c,
ToFloatFunction<? super T> keyMapper)
Sort by float.
|
static <T> void |
sortByFloat(T[] a,
ToFloatFunction<? super T> keyMapper) |
static <T> void |
sortByInt(List<? extends T> list,
ToIntFunction<? super T> keyMapper)
Sort by int.
|
static <T> void |
sortByInt(T[] a,
ToIntFunction<? super T> keyMapper)
Sort by int.
|
static <T> void |
sortByLong(List<? extends T> list,
ToLongFunction<? super T> keyMapper)
Sort by long.
|
static <T> void |
sortByLong(T[] a,
ToLongFunction<? super T> keyMapper)
Sort by long.
|
static List<boolean[]> |
split(boolean[] a,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same size (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static List<boolean[]> |
split(boolean[] a,
int fromIndex,
int toIndex,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same chunkSize (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static List<byte[]> |
split(byte[] a,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same chunkSize (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static List<byte[]> |
split(byte[] a,
int fromIndex,
int toIndex,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same chunkSize (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static List<char[]> |
split(char[] a,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same chunkSize (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static List<char[]> |
split(char[] a,
int fromIndex,
int toIndex,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same chunkSize (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static List<String> |
split(CharSequence str,
int chunkSize)
Returns consecutive substring of the specified string, each of the same length (the final list may be smaller),
or an empty array if the specified string is
null or empty. |
static List<String> |
split(CharSequence str,
int fromIndex,
int toIndex,
int chunkSize)
Returns consecutive substring of the specified string, each of the same length (the final list may be smaller),
or an empty array if the specified string is
null or empty. |
static <T> List<List<T>> |
split(Collection<? extends T> c,
int chunkSize)
Returns consecutive sub lists of a collection, each of the same chunkSize (the final list may be smaller).
|
static <T> List<List<T>> |
split(Collection<? extends T> c,
int fromIndex,
int toIndex,
int chunkSize)
Returns consecutive sub lists of a collection, each of the same chunkSize (the final list may be smaller).
|
static List<double[]> |
split(double[] a,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same chunkSize (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static List<double[]> |
split(double[] a,
int fromIndex,
int toIndex,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same chunkSize (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static List<float[]> |
split(float[] a,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same chunkSize (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static List<float[]> |
split(float[] a,
int fromIndex,
int toIndex,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same chunkSize (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static List<int[]> |
split(int[] a,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same chunkSize (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static List<int[]> |
split(int[] a,
int fromIndex,
int toIndex,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same chunkSize (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static <T> ObjIterator<List<T>> |
split(Iterator<? extends T> iter,
int chunkSize) |
static List<long[]> |
split(long[] a,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same chunkSize (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static List<long[]> |
split(long[] a,
int fromIndex,
int toIndex,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same chunkSize (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static List<short[]> |
split(short[] a,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same chunkSize (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static List<short[]> |
split(short[] a,
int fromIndex,
int toIndex,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same chunkSize (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static <T> List<T[]> |
split(T[] a,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same chunkSize (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static <T> List<T[]> |
split(T[] a,
int fromIndex,
int toIndex,
int chunkSize)
Returns consecutive sub arrays of an array, each of the same chunkSize (the final list may be smaller),
or an empty List if the specified array is
null or empty. |
static <T> ExceptionalStream<T,IOException> |
streamJSON(Class<T> elementClass,
File source) |
static <T> ExceptionalStream<T,IOException> |
streamJSON(Class<T> elementClass,
File source,
JSONDeserializationConfig config) |
static <T> ExceptionalStream<T,IOException> |
streamJSON(Class<T> elementClass,
InputStream source) |
static <T> ExceptionalStream<T,IOException> |
streamJSON(Class<T> elementClass,
InputStream source,
JSONDeserializationConfig config) |
static <T> ExceptionalStream<T,IOException> |
streamJSON(Class<T> elementClass,
Reader source) |
static <T> ExceptionalStream<T,IOException> |
streamJSON(Class<T> elementClass,
Reader source,
JSONDeserializationConfig config) |
static <T> ExceptionalStream<T,IOException> |
streamJSON(Class<T> elementClass,
String source) |
static <T> ExceptionalStream<T,IOException> |
streamJSON(Class<T> elementClass,
String source,
JSONDeserializationConfig config) |
static String |
stringOf(boolean val) |
static String |
stringOf(byte val) |
static String |
stringOf(char val) |
static String |
stringOf(double val) |
static String |
stringOf(float val) |
static String |
stringOf(int val) |
static String |
stringOf(long val) |
static String |
stringOf(Object obj) |
static String |
stringOf(short val) |
static int |
sum(byte... a) |
static int |
sum(byte[] a,
int fromIndex,
int toIndex) |
static int |
sum(char... a) |
static int |
sum(char[] a,
int fromIndex,
int toIndex) |
static double |
sum(double... a) |
static double |
sum(double[] a,
int fromIndex,
int toIndex) |
static float |
sum(float... a) |
static float |
sum(float[] a,
int fromIndex,
int toIndex) |
static int |
sum(int... a) |
static int |
sum(int[] a,
int fromIndex,
int toIndex) |
static long |
sum(long... a) |
static long |
sum(long[] a,
int fromIndex,
int toIndex) |
static int |
sum(short... a) |
static int |
sum(short[] a,
int fromIndex,
int toIndex) |
static <T extends Number> |
sumDouble(Collection<? extends T> c) |
static <T extends Number> |
sumDouble(Collection<? extends T> c,
int fromIndex,
int toIndex) |
static <T,E extends Exception> |
sumDouble(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.ToDoubleFunction<? super T,E> func) |
static <T,E extends Exception> |
sumDouble(Collection<? extends T> c,
Throwables.ToDoubleFunction<? super T,E> func) |
static <T extends Number> |
sumDouble(T[] a) |
static <T extends Number> |
sumDouble(T[] a,
int fromIndex,
int toIndex) |
static <T,E extends Exception> |
sumDouble(T[] a,
int fromIndex,
int toIndex,
Throwables.ToDoubleFunction<? super T,E> func) |
static <T,E extends Exception> |
sumDouble(T[] a,
Throwables.ToDoubleFunction<? super T,E> func) |
static <T extends Number> |
sumInt(Collection<? extends T> c) |
static <T extends Number> |
sumInt(Collection<? extends T> c,
int fromIndex,
int toIndex) |
static <T,E extends Exception> |
sumInt(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.ToIntFunction<? super T,E> func) |
static <T,E extends Exception> |
sumInt(Collection<? extends T> c,
Throwables.ToIntFunction<? super T,E> func) |
static <T extends Number> |
sumInt(T[] a) |
static <T extends Number> |
sumInt(T[] a,
int fromIndex,
int toIndex) |
static <T,E extends Exception> |
sumInt(T[] a,
int fromIndex,
int toIndex,
Throwables.ToIntFunction<? super T,E> func) |
static <T,E extends Exception> |
sumInt(T[] a,
Throwables.ToIntFunction<? super T,E> func) |
static <T extends Number> |
sumLong(Collection<? extends T> c) |
static <T extends Number> |
sumLong(Collection<? extends T> c,
int fromIndex,
int toIndex) |
static <T,E extends Exception> |
sumLong(Collection<? extends T> c,
int fromIndex,
int toIndex,
Throwables.ToLongFunction<? super T,E> func) |
static <T,E extends Exception> |
sumLong(Collection<? extends T> c,
Throwables.ToLongFunction<? super T,E> func) |
static <T extends Number> |
sumLong(T[] a) |
static <T extends Number> |
sumLong(T[] a,
int fromIndex,
int toIndex) |
static <T,E extends Exception> |
sumLong(T[] a,
int fromIndex,
int toIndex,
Throwables.ToLongFunction<? super T,E> func) |
static <T,E extends Exception> |
sumLong(T[] a,
Throwables.ToLongFunction<? super T,E> func) |
static void |
swap(boolean[] a,
int i,
int j) |
static void |
swap(byte[] a,
int i,
int j) |
static void |
swap(char[] a,
int i,
int j) |
static void |
swap(double[] a,
int i,
int j) |
static void |
swap(float[] a,
int i,
int j) |
static void |
swap(int[] a,
int i,
int j) |
static void |
swap(List<?> list,
int i,
int j) |
static void |
swap(long[] a,
int i,
int j) |
static void |
swap(Object[] a,
int i,
int j) |
static <T> void |
swap(Pair<T,T> pair) |
static void |
swap(short[] a,
int i,
int j) |
static <T,M> void |
swap(Triple<T,M,T> triple) |
static <T,E extends Exception> |
swapIf(Pair<T,T> pair,
Throwables.Predicate<? super Pair<T,T>,E> predicate) |
static <T,M,E extends Exception> |
swapIf(Triple<T,M,T> triple,
Throwables.Predicate<? super Triple<T,M,T>,E> predicate) |
static <T> List<T> |
symmetricDifference(Collection<? extends T> a,
Collection<? extends T> b) |
static <T> List<T> |
symmetricDifference(T[] a,
T[] b) |
static <T> Set<T> |
symmetricDifferentSet(Collection<? extends T> a,
Collection<? extends T> b)
Symmetric different set.
|
static <T,E extends Exception> |
takeWhile(Collection<? extends T> c,
Throwables.Predicate<? super T,E> filter)
Take while.
|
static <T,E extends Exception> |
takeWhile(T[] a,
Throwables.Predicate<? super T,E> filter)
Take while.
|
static <T,E extends Exception> |
takeWhileInclusive(Collection<? extends T> c,
Throwables.Predicate<? super T,E> filter)
Take while inclusive.
|
static <T,E extends Exception> |
takeWhileInclusive(T[] a,
Throwables.Predicate<? super T,E> filter)
Take while inclusive.
|
static <A,T extends A> |
toArray(Class<A[]> targetClass,
Collection<T> c) |
static <A,T extends A> |
toArray(Class<A[]> targetClass,
Collection<T> c,
int fromIndex,
int toIndex) |
static Object[] |
toArray(Collection<?> c)
Returns an empty array if the specified collection is null or empty.
|
static Object[] |
toArray(Collection<?> c,
int fromIndex,
int toIndex) |
static <A,T extends A> |
toArray(Collection<T> c,
A[] a) |
static <A,T extends A> |
toArray(Collection<T> c,
IntFunction<A[]> arraySupplier) |
static <A,T extends A> |
toArray(Collection<T> c,
int fromIndex,
int toIndex,
A[] a) |
static <A,T extends A> |
toArray(Collection<T> c,
int fromIndex,
int toIndex,
IntFunction<A[]> arraySupplier) |
static boolean[] |
toBooleanArray(byte[] a) |
static boolean[] |
toBooleanArray(Collection<Boolean> c)
To boolean array.
|
static boolean[] |
toBooleanArray(Collection<Boolean> c,
boolean defaultForNull)
To boolean array.
|
static boolean[] |
toBooleanArray(Collection<Boolean> c,
int fromIndex,
int toIndex)
To boolean array.
|
static boolean[] |
toBooleanArray(Collection<Boolean> c,
int fromIndex,
int toIndex,
boolean defaultForNull)
To boolean array.
|
static byte[] |
toByteArray(boolean[] a) |
static byte[] |
toByteArray(Collection<? extends Number> c)
To byte array.
|
static byte[] |
toByteArray(Collection<? extends Number> c,
byte defaultForNull)
To byte array.
|
static byte[] |
toByteArray(Collection<? extends Number> c,
int fromIndex,
int toIndex)
To byte array.
|
static byte[] |
toByteArray(Collection<? extends Number> c,
int fromIndex,
int toIndex,
byte defaultForNull)
To byte array.
|
static char[] |
toCharArray(Collection<Character> c)
To char array.
|
static char[] |
toCharArray(Collection<Character> c,
char defaultForNull)
To char array.
|
static char[] |
toCharArray(Collection<Character> c,
int fromIndex,
int toIndex)
To char array.
|
static char[] |
toCharArray(Collection<Character> c,
int fromIndex,
int toIndex,
char defaultForNull)
To char array.
|
static <C extends Collection<Boolean>> |
toCollection(boolean[] a,
IntFunction<? extends C> supplier) |
static <C extends Collection<Boolean>> |
toCollection(boolean[] a,
int fromIndex,
int toIndex,
IntFunction<? extends C> supplier) |
static <C extends Collection<Byte>> |
toCollection(byte[] a,
IntFunction<? extends C> supplier) |
static <C extends Collection<Byte>> |
toCollection(byte[] a,
int fromIndex,
int toIndex,
IntFunction<? extends C> supplier) |
static <C extends Collection<Character>> |
toCollection(char[] a,
IntFunction<? extends C> supplier) |
static <C extends Collection<Character>> |
toCollection(char[] a,
int fromIndex,
int toIndex,
IntFunction<? extends C> supplier) |
static <C extends Collection<Double>> |
toCollection(double[] a,
IntFunction<? extends C> supplier) |
static <C extends Collection<Double>> |
toCollection(double[] a,
int fromIndex,
int toIndex,
IntFunction<? extends C> supplier) |
static <C extends Collection<Float>> |
toCollection(float[] a,
IntFunction<? extends C> supplier) |
static <C extends Collection<Float>> |
toCollection(float[] a,
int fromIndex,
int toIndex,
IntFunction<? extends C> supplier) |
static <C extends Collection<Integer>> |
toCollection(int[] a,
IntFunction<? extends C> supplier) |
static <C extends Collection<Integer>> |
toCollection(int[] a,
int fromIndex,
int toIndex,
IntFunction<? extends C> supplier) |
static <T,C extends Collection<T>> |
toCollection(Iterator<? extends T> iter,
Supplier<? extends C> supplier) |
static <C extends Collection<Long>> |
toCollection(long[] a,
IntFunction<? extends C> supplier) |
static <C extends Collection<Long>> |
toCollection(long[] a,
int fromIndex,
int toIndex,
IntFunction<? extends C> supplier) |
static <C extends Collection<Short>> |
toCollection(short[] a,
IntFunction<? extends C> supplier) |
static <C extends Collection<Short>> |
toCollection(short[] a,
int fromIndex,
int toIndex,
IntFunction<? extends C> supplier) |
static <T,C extends Collection<T>> |
toCollection(T[] a,
IntFunction<? extends C> supplier) |
static <T,C extends Collection<T>> |
toCollection(T[] a,
int fromIndex,
int toIndex,
IntFunction<? extends C> supplier) |
static double[] |
toDoubleArray(Collection<? extends Number> c)
To double array.
|
static double[] |
toDoubleArray(Collection<? extends Number> c,
double defaultForNull)
To double array.
|
static double[] |
toDoubleArray(Collection<? extends Number> c,
int fromIndex,
int toIndex)
To double array.
|
static double[] |
toDoubleArray(Collection<? extends Number> c,
int fromIndex,
int toIndex,
double defaultForNull)
To double array.
|
static float[] |
toFloatArray(Collection<? extends Number> c)
To float array.
|
static float[] |
toFloatArray(Collection<? extends Number> c,
float defaultForNull)
To float array.
|
static float[] |
toFloatArray(Collection<? extends Number> c,
int fromIndex,
int toIndex)
To float array.
|
static float[] |
toFloatArray(Collection<? extends Number> c,
int fromIndex,
int toIndex,
float defaultForNull)
To float array.
|
static int[] |
toIntArray(char[] a) |
static int[] |
toIntArray(Collection<? extends Number> c)
To int array.
|
static int[] |
toIntArray(Collection<? extends Number> c,
int defaultForNull)
To int array.
|
static int[] |
toIntArray(Collection<? extends Number> c,
int fromIndex,
int toIndex)
To int array.
|
static int[] |
toIntArray(Collection<? extends Number> c,
int fromIndex,
int toIndex,
int defaultForNull)
To int array.
|
static int |
toIntExact(long value)
Returns the value of the
long argument; throwing an exception if the value overflows an int. |
static void |
toJSON(File file,
Object obj) |
static void |
toJSON(File file,
Object obj,
JSONSerializationConfig config) |
static String |
toJSON(Object obj) |
static String |
toJSON(Object obj,
boolean prettyFormat) |
static String |
toJSON(Object obj,
JSONSerializationConfig config) |
static void |
toJSON(OutputStream os,
Object obj) |
static void |
toJSON(OutputStream os,
Object obj,
JSONSerializationConfig config) |
static void |
toJSON(Writer writer,
Object obj) |
static void |
toJSON(Writer writer,
Object obj,
JSONSerializationConfig config) |
static List<Boolean> |
toList(boolean[] a) |
static List<Boolean> |
toList(boolean[] a,
int fromIndex,
int toIndex) |
static List<Byte> |
toList(byte[] a) |
static List<Byte> |
toList(byte[] a,
int fromIndex,
int toIndex) |
static List<Character> |
toList(char[] a) |
static List<Character> |
toList(char[] a,
int fromIndex,
int toIndex) |
static List<Double> |
toList(double[] a) |
static List<Double> |
toList(double[] a,
int fromIndex,
int toIndex) |
static List<Float> |
toList(float[] a) |
static List<Float> |
toList(float[] a,
int fromIndex,
int toIndex) |
static List<Integer> |
toList(int[] a) |
static List<Integer> |
toList(int[] a,
int fromIndex,
int toIndex) |
static <T> List<T> |
toList(Iterator<? extends T> iter) |
static List<Long> |
toList(long[] a) |
static List<Long> |
toList(long[] a,
int fromIndex,
int toIndex) |
static List<Short> |
toList(short[] a) |
static List<Short> |
toList(short[] a,
int fromIndex,
int toIndex) |
static <T> List<T> |
toList(T[] a) |
static <T> List<T> |
toList(T[] a,
int fromIndex,
int toIndex) |
static long[] |
toLongArray(Collection<? extends Number> c)
To long array.
|
static long[] |
toLongArray(Collection<? extends Number> c,
int fromIndex,
int toIndex)
To long array.
|
static long[] |
toLongArray(Collection<? extends Number> c,
int fromIndex,
int toIndex,
long defaultForNull)
To long array.
|
static long[] |
toLongArray(Collection<? extends Number> c,
long defaultForNull)
To long array.
|
static <T extends Comparable<? super T>> |
top(Collection<? extends T> c,
int n) |
static <T extends Comparable<? super T>> |
top(Collection<? extends T> c,
int n,
boolean keepEncounterOrder) |
static <T> List<T> |
top(Collection<? extends T> c,
int n,
Comparator<? super T> cmp) |
static <T> List<T> |
top(Collection<? extends T> c,
int n,
Comparator<? super T> cmp,
boolean keepEncounterOrder) |
static <T extends Comparable<? super T>> |
top(Collection<? extends T> c,
int fromIndex,
int toIndex,
int n) |
static <T extends Comparable<? super T>> |
top(Collection<? extends T> c,
int fromIndex,
int toIndex,
int n,
boolean keepEncounterOrder) |
static <T> List<T> |
top(Collection<? extends T> c,
int fromIndex,
int toIndex,
int n,
Comparator<? super T> cmp) |
static <T> List<T> |
top(Collection<? extends T> c,
int fromIndex,
int toIndex,
int n,
Comparator<? super T> cmp,
boolean keepEncounterOrder) |
static double[] |
top(double[] a,
int n) |
static double[] |
top(double[] a,
int n,
Comparator<? super Double> cmp) |
static double[] |
top(double[] a,
int fromIndex,
int toIndex,
int n) |
static double[] |
top(double[] a,
int fromIndex,
int toIndex,
int n,
Comparator<? super Double> cmp) |
static float[] |
top(float[] a,
int n) |
static float[] |
top(float[] a,
int n,
Comparator<? super Float> cmp) |
static float[] |
top(float[] a,
int fromIndex,
int toIndex,
int n) |
static float[] |
top(float[] a,
int fromIndex,
int toIndex,
int n,
Comparator<? super Float> cmp) |
static int[] |
top(int[] a,
int n) |
static int[] |
top(int[] a,
int n,
Comparator<? super Integer> cmp) |
static int[] |
top(int[] a,
int fromIndex,
int toIndex,
int n) |
static int[] |
top(int[] a,
int fromIndex,
int toIndex,
int n,
Comparator<? super Integer> cmp) |
static long[] |
top(long[] a,
int n) |
static long[] |
top(long[] a,
int n,
Comparator<? super Long> cmp) |
static long[] |
top(long[] a,
int fromIndex,
int toIndex,
int n) |
static long[] |
top(long[] a,
int fromIndex,
int toIndex,
int n,
Comparator<? super Long> cmp) |
static short[] |
top(short[] a,
int n) |
static short[] |
top(short[] a,
int n,
Comparator<? super Short> cmp) |
static short[] |
top(short[] a,
int fromIndex,
int toIndex,
int n) |
static short[] |
top(short[] a,
int fromIndex,
int toIndex,
int n,
Comparator<? super Short> cmp) |
static <T extends Comparable<? super T>> |
top(T[] a,
int n) |
static <T extends Comparable<? super T>> |
top(T[] a,
int n,
boolean keepEncounterOrder) |
static <T> List<T> |
top(T[] a,
int n,
Comparator<? super T> cmp) |
static <T> List<T> |
top(T[] a,
int n,
Comparator<? super T> cmp,
boolean keepEncounterOrder) |
static <T extends Comparable<? super T>> |
top(T[] a,
int fromIndex,
int toIndex,
int n) |
static <T extends Comparable<? super T>> |
top(T[] a,
int fromIndex,
int toIndex,
int n,
boolean keepEncounterOrder) |
static <T> List<T> |
top(T[] a,
int fromIndex,
int toIndex,
int n,
Comparator<? super T> cmp) |
static <T> List<T> |
top(T[] a,
int fromIndex,
int toIndex,
int n,
Comparator<? super T> cmp,
boolean keepEncounterOrder) |
static RuntimeException |
toRuntimeException(Throwable e) |
static Set<Boolean> |
toSet(boolean[] a) |
static Set<Boolean> |
toSet(boolean[] a,
int fromIndex,
int toIndex) |
static Set<Byte> |
toSet(byte[] a) |
static Set<Byte> |
toSet(byte[] a,
int fromIndex,
int toIndex) |
static Set<Character> |
toSet(char[] a) |
static Set<Character> |
toSet(char[] a,
int fromIndex,
int toIndex) |
static Set<Double> |
toSet(double[] a) |
static Set<Double> |
toSet(double[] a,
int fromIndex,
int toIndex) |
static Set<Float> |
toSet(float[] a) |
static Set<Float> |
toSet(float[] a,
int fromIndex,
int toIndex) |
static Set<Integer> |
toSet(int[] a) |
static Set<Integer> |
toSet(int[] a,
int fromIndex,
int toIndex) |
static <T> Set<T> |
toSet(Iterator<? extends T> iter) |
static Set<Long> |
toSet(long[] a) |
static Set<Long> |
toSet(long[] a,
int fromIndex,
int toIndex) |
static Set<Short> |
toSet(short[] a) |
static Set<Short> |
toSet(short[] a,
int fromIndex,
int toIndex) |
static <T> Set<T> |
toSet(T[] a) |
static <T> Set<T> |
toSet(T[] a,
int fromIndex,
int toIndex) |
static short[] |
toShortArray(Collection<? extends Number> c)
To short array.
|
static short[] |
toShortArray(Collection<? extends Number> c,
int fromIndex,
int toIndex)
To short array.
|
static short[] |
toShortArray(Collection<? extends Number> c,
int fromIndex,
int toIndex,
short defaultForNull)
To short array.
|
static short[] |
toShortArray(Collection<? extends Number> c,
short defaultForNull)
To short array.
|
static String |
toString(boolean value) |
static String |
toString(boolean[] a) |
static String |
toString(boolean[] a,
int fromIndex,
int toIndex) |
static String |
toString(byte value) |
static String |
toString(byte[] a) |
static String |
toString(byte[] a,
int fromIndex,
int toIndex) |
static String |
toString(char value) |
static String |
toString(char[] a) |
static String |
toString(char[] a,
int fromIndex,
int toIndex) |
static String |
toString(double value) |
static String |
toString(double[] a) |
static String |
toString(double[] a,
int fromIndex,
int toIndex) |
static String |
toString(float value) |
static String |
toString(float[] a) |
static String |
toString(float[] a,
int fromIndex,
int toIndex) |
static String |
toString(int value) |
static String |
toString(int[] a) |
static String |
toString(int[] a,
int fromIndex,
int toIndex) |
static String |
toString(long value) |
static String |
toString(long[] a) |
static String |
toString(long[] a,
int fromIndex,
int toIndex) |
static String |
toString(Object obj) |
static String |
toString(Object[] a) |
static String |
toString(Object[] a,
int fromIndex,
int toIndex) |
static String |
toString(Object a,
String defaultIfNull) |
static String |
toString(short value) |
static String |
toString(short[] a) |
static String |
toString(short[] a,
int fromIndex,
int toIndex) |
static void |
toXML(File file,
Object obj) |
static void |
toXML(File file,
Object obj,
XMLSerializationConfig config) |
static String |
toXML(Object obj) |
static String |
toXML(Object obj,
boolean prettyFormat) |
static String |
toXML(Object obj,
XMLSerializationConfig config) |
static void |
toXML(OutputStream os,
Object obj) |
static void |
toXML(OutputStream os,
Object obj,
XMLSerializationConfig config) |
static void |
toXML(Writer writer,
Object obj) |
static void |
toXML(Writer writer,
Object obj,
XMLSerializationConfig config) |
static <R> u.Nullable<R> |
tryOrEmpty(Callable<R> cmd)
Returns a
Nullable with the value returned by action or an empty Nullable if exception happens. |
static <T,R,E extends Exception> |
tryOrEmpty(T init,
Throwables.Function<? super T,R,E> func)
Returns a
Nullable with the value returned by func.apply(init) or an empty Nullable if exception happens. |
static <T> com.landawn.abacus.type.Type<T> |
typeOf(Class<?> cls) |
static <T> com.landawn.abacus.type.Type<T> |
typeOf(String typeName) |
static Class<?> |
unwrap(Class<?> cls)
Returns the corresponding primitive type of
type if it is a wrapper type; otherwise
returns type itself. |
static <T,L,R,E extends Exception> |
unzip(Collection<? extends T> c,
Throwables.BiConsumer<? super T,Pair<L,R>,E> unzip) |
static <T,L,R,LC extends Collection<L>,RC extends Collection<R>,E extends Exception> |
unzip(Collection<? extends T> c,
Throwables.BiConsumer<? super T,Pair<L,R>,E> unzip,
IntFunction<? extends Collection<?>> supplier) |
static <T,L,M,R,E extends Exception> |
unzipp(Collection<? extends T> c,
Throwables.BiConsumer<? super T,Triple<L,M,R>,E> unzip) |
static <T,L,M,R,LC extends Collection<L>,MC extends Collection<M>,RC extends Collection<R>,E extends Exception> |
unzipp(Collection<? extends T> c,
Throwables.BiConsumer<? super T,Triple<L,M,R>,E> unzip,
IntFunction<? extends Collection<?>> supplier) |
static <T> T |
urlDecode(Class<? extends T> targetClass,
String urlQuery) |
static <T> T |
urlDecode(Class<? extends T> targetClass,
String urlQuery,
Charset charset) |
static Map<String,String> |
urlDecode(String urlQuery) |
static Map<String,String> |
urlDecode(String urlQuery,
Charset charset) |
static String |
urlEncode(Object parameters) |
static String |
urlEncode(Object parameters,
Charset charset) |
static String |
uuid()
Returns an UUID.
|
static <T> T |
valueOf(Class<? extends T> targetClass,
String str) |
static Class<?> |
wrap(Class<?> cls)
Returns the corresponding wrapper type of
type if it is a primitive type; otherwise
returns type itself. |
static String |
xml2JSON(Class<?> cls,
String xml)
Xml 2 JSON.
|
static String |
xml2JSON(String xml)
Xml 2 JSON.
|
static <A,B,R,E extends Exception> |
zip(A[] a,
B[] b,
A valueForNoneA,
B valueForNoneB,
Throwables.BiFunction<? super A,? super B,R,E> zipFunction) |
static <A,B,C,R,E extends Exception> |
zip(A[] a,
B[] b,
C[] c,
A valueForNoneA,
B valueForNoneB,
C valueForNoneC,
Throwables.TriFunction<? super A,? super B,? super C,R,E> zipFunction) |
static <A,B,C,R,E extends Exception> |
zip(A[] a,
B[] b,
C[] c,
Throwables.TriFunction<? super A,? super B,? super C,R,E> zipFunction) |
static <A,B,R,E extends Exception> |
zip(A[] a,
B[] b,
Throwables.BiFunction<? super A,? super B,R,E> zipFunction) |
static <A,B,R,E extends Exception> |
zip(Class<R> targetElementType,
A[] a,
B[] b,
A valueForNoneA,
B valueForNoneB,
Throwables.BiFunction<? super A,? super B,R,E> zipFunction) |
static <A,B,C,R,E extends Exception> |
zip(Class<R> targetElementType,
A[] a,
B[] b,
C[] c,
A valueForNoneA,
B valueForNoneB,
C valueForNoneC,
Throwables.TriFunction<? super A,? super B,? super C,R,E> zipFunction) |
static <A,B,C,R,E extends Exception> |
zip(Class<R> targetElementType,
A[] a,
B[] b,
C[] c,
Throwables.TriFunction<? super A,? super B,? super C,R,E> zipFunction) |
static <A,B,R,E extends Exception> |
zip(Class<R> targetElementType,
A[] a,
B[] b,
Throwables.BiFunction<? super A,? super B,R,E> zipFunction) |
static <A,B,R,E extends Exception> |
zip(Collection<A> a,
Collection<B> b,
A valueForNoneA,
B valueForNoneB,
Throwables.BiFunction<? super A,? super B,R,E> zipFunction) |
static <A,B,C,R,E extends Exception> |
zip(Collection<A> a,
Collection<B> b,
Collection<C> c,
A valueForNoneA,
B valueForNoneB,
C valueForNoneC,
Throwables.TriFunction<? super A,? super B,? super C,R,E> zipFunction) |
static <A,B,C,R,E extends Exception> |
zip(Collection<A> a,
Collection<B> b,
Collection<C> c,
Throwables.TriFunction<? super A,? super B,? super C,R,E> zipFunction) |
static <A,B,R,E extends Exception> |
zip(Collection<A> a,
Collection<B> b,
Throwables.BiFunction<? super A,? super B,R,E> zipFunction) |
public static final int CPU_CORES
public static final String ELEMENT_SEPARATOR
public static final char[] ELEMENT_SEPARATOR_CHAR_ARRAY
public static final int INDEX_NOT_FOUND
-1. This value is returned by methods in this class and can also
be used in comparisons with values returned by various method from
List .public static final String EMPTY_STRING
public static final boolean[] EMPTY_BOOLEAN_ARRAY
boolean array.public static final char[] EMPTY_CHAR_ARRAY
char array.public static final byte[] EMPTY_BYTE_ARRAY
byte array.public static final short[] EMPTY_SHORT_ARRAY
short array.public static final int[] EMPTY_INT_ARRAY
int array.public static final long[] EMPTY_LONG_ARRAY
long array.public static final float[] EMPTY_FLOAT_ARRAY
float array.public static final double[] EMPTY_DOUBLE_ARRAY
double array.public static final Boolean[] EMPTY_BOOLEAN_OBJ_ARRAY
Boolean array.public static final Character[] EMPTY_CHAR_OBJ_ARRAY
Character array.public static final Byte[] EMPTY_BYTE_OBJ_ARRAY
Byte array.public static final Short[] EMPTY_SHORT_OBJ_ARRAY
Short array.public static final Integer[] EMPTY_INT_OBJ_ARRAY
Integer array.public static final Long[] EMPTY_LONG_OBJ_ARRAY
Long array.public static final Float[] EMPTY_FLOAT_OBJ_ARRAY
Float array.public static final Double[] EMPTY_DOUBLE_OBJ_ARRAY
Double array.public static final String[] EMPTY_STRING_ARRAY
String array.public static final Object[] EMPTY_OBJECT_ARRAY
Object array.public static int occurrencesOf(boolean[] a,
boolean valueToFind)
a - valueToFind - public static int occurrencesOf(char[] a,
char valueToFind)
a - valueToFind - public static int occurrencesOf(byte[] a,
byte valueToFind)
a - valueToFind - public static int occurrencesOf(short[] a,
short valueToFind)
a - valueToFind - public static int occurrencesOf(int[] a,
int valueToFind)
a - valueToFind - public static int occurrencesOf(long[] a,
long valueToFind)
a - valueToFind - public static int occurrencesOf(float[] a,
float valueToFind)
a - valueToFind - public static int occurrencesOf(double[] a,
double valueToFind)
a - valueToFind - public static int occurrencesOf(Object[] a, Object valueToFind)
a - valueToFind - public static int occurrencesOf(Collection<?> c, Object valueToFind)
c - valueToFind - Collections.frequency(Collection, Object)public static int occurrencesOf(String str, String substr)
str - substr - StringUtil.occurrencesOf(String, String)public static boolean contains(boolean[] a,
boolean valueToFind)
a - valueToFind - public static boolean contains(char[] a,
char valueToFind)
a - valueToFind - public static boolean contains(byte[] a,
byte valueToFind)
a - valueToFind - public static boolean contains(short[] a,
short valueToFind)
a - valueToFind - public static boolean contains(int[] a,
int valueToFind)
a - valueToFind - public static boolean contains(long[] a,
long valueToFind)
a - valueToFind - public static boolean contains(float[] a,
float valueToFind)
a - valueToFind - public static boolean contains(double[] a,
double valueToFind)
a - valueToFind - public static boolean contains(Object[] a, Object valueToFind)
a - valueToFind - public static boolean contains(Collection<?> c, Object valueToFind)
c - valueToFind - public static boolean containsAll(Collection<?> c, Collection<?> valuesToFind)
c - the cvaluesToFind - the objs to findpublic static boolean containsAll(Collection<?> c, Object[] valuesToFind)
c - the cvaluesToFind - the objs to findpublic static boolean containsAll(Iterator<?> iter, Collection<?> valuesToFind)
public static boolean containsAny(Collection<?> c, Collection<?> valuesToFind)
c - the cvaluesToFind - the objs to findpublic static boolean containsAny(Collection<?> c, Object[] valuesToFind)
c - the cvaluesToFind - the objs to findpublic static <T> u.Nullable<T> getOnlyElement(Iterable<? extends T> iterable) throws DuplicatedResultException
T - the generic typeiterable - the iterableiterable.DuplicatedResultExceptionpublic static <T> u.Nullable<T> getOnlyElement(Iterator<? extends T> iter) throws DuplicatedResultException
T - iter - iter.DuplicatedResultException - the duplicated result exceptionpublic static List<boolean[]> split(boolean[] a, int chunkSize)
null or empty.a - chunkSize - the desired size of each sub array (the last may be smaller).public static List<boolean[]> split(boolean[] a, int fromIndex, int toIndex, int chunkSize)
null or empty.a - fromIndex - toIndex - chunkSize - the desired size of each sub array (the last may be smaller).public static List<char[]> split(char[] a, int chunkSize)
null or empty.a - chunkSize - the desired size of each sub array (the last may be smaller).public static List<char[]> split(char[] a, int fromIndex, int toIndex, int chunkSize)
null or empty.a - fromIndex - toIndex - chunkSize - the desired size of each sub array (the last may be smaller).public static List<byte[]> split(byte[] a, int chunkSize)
null or empty.a - chunkSize - the desired size of each sub array (the last may be smaller).public static List<byte[]> split(byte[] a, int fromIndex, int toIndex, int chunkSize)
null or empty.a - fromIndex - toIndex - chunkSize - the desired size of each sub array (the last may be smaller).public static List<short[]> split(short[] a, int chunkSize)
null or empty.a - chunkSize - the desired size of each sub array (the last may be smaller).public static List<short[]> split(short[] a, int fromIndex, int toIndex, int chunkSize)
null or empty.a - fromIndex - toIndex - chunkSize - the desired size of each sub array (the last may be smaller).public static List<int[]> split(int[] a, int chunkSize)
null or empty.a - chunkSize - the desired size of each sub array (the last may be smaller).public static List<int[]> split(int[] a, int fromIndex, int toIndex, int chunkSize)
null or empty.a - fromIndex - toIndex - chunkSize - the desired size of each sub array (the last may be smaller).public static List<long[]> split(long[] a, int chunkSize)
null or empty.a - chunkSize - the desired size of each sub array (the last may be smaller).public static List<long[]> split(long[] a, int fromIndex, int toIndex, int chunkSize)
null or empty.a - fromIndex - toIndex - chunkSize - the desired size of each sub array (the last may be smaller).public static List<float[]> split(float[] a, int chunkSize)
null or empty.a - chunkSize - the desired size of each sub array (the last may be smaller).public static List<float[]> split(float[] a, int fromIndex, int toIndex, int chunkSize)
null or empty.a - fromIndex - toIndex - chunkSize - the desired size of each sub array (the last may be smaller).public static List<double[]> split(double[] a, int chunkSize)
null or empty.a - chunkSize - the desired size of each sub array (the last may be smaller).public static List<double[]> split(double[] a, int fromIndex, int toIndex, int chunkSize)
null or empty.a - fromIndex - toIndex - chunkSize - the desired size of each sub array (the last may be smaller).public static <T> List<T[]> split(T[] a, int chunkSize)
null or empty.T - a - chunkSize - the desired size of each sub array (the last may be smaller).public static <T> List<T[]> split(T[] a, int fromIndex, int toIndex, int chunkSize)
null or empty.T - a - fromIndex - toIndex - chunkSize - the desired size of each sub array (the last may be smaller).public static <T> List<List<T>> split(Collection<? extends T> c, int chunkSize)
null or empty. The order of elements in the original collection is keptT - c - chunkSize - the desired size of each sub list (the last may be smaller).public static <T> List<List<T>> split(Collection<? extends T> c, int fromIndex, int toIndex, int chunkSize)
null or empty. The order of elements in the original collection is keptT - c - fromIndex - toIndex - chunkSize - the desired size of each sub list (the last may be smaller).public static <T> ObjIterator<List<T>> split(Iterator<? extends T> iter, int chunkSize)
public static List<String> split(CharSequence str, int chunkSize)
null or empty.str - chunkSize - the desired size of each sub String (the last may be smaller).public static List<String> split(CharSequence str, int fromIndex, int toIndex, int chunkSize)
null or empty.str - fromIndex - toIndex - chunkSize - the desired size of each sub String (the last may be smaller).public static <T> List<T> intersection(T[] a, Object[] b)
T - a - b - IntList#intersection(IntList)public static <T> List<T> intersection(Collection<? extends T> a, Collection<?> b)
T - a - b - IntList#intersection(IntList),
commonSet(Collection, Collection),
Collection.retainAll(Collection)public static <T> List<T> intersection(Collection<? extends Collection<? extends T>> c)
T - c - commonSet(Collection),
Collection.retainAll(Collection)public static <T> List<T> difference(T[] a, Object[] b)
T - a - b - IntList#difference(IntList),
differentSet(Collection, Collection),
excludeAll(Collection, Collection),
excludeAllToSet(Collection, Collection),
removeAll(Collection, Collection),
Difference.of(Collection, Collection)public static <T> List<T> difference(Collection<? extends T> a, Collection<?> b)
a, but exclude the elements in b by occurrences.T - a - b - IntList#difference(IntList),
differentSet(Collection, Collection),
excludeAll(Collection, Collection),
excludeAllToSet(Collection, Collection),
removeAll(Collection, Collection),
Difference.of(Collection, Collection)public static <T> List<T> symmetricDifference(T[] a, T[] b)
T - a - b - IntList#symmetricDifference(IntList),
symmetricDifferentSet(Collection, Collection),
excludeAll(Collection, Collection),
excludeAllToSet(Collection, Collection),
Difference.of(Collection, Collection)public static <T> List<T> symmetricDifference(Collection<? extends T> a, Collection<? extends T> b)
T - a - b - IntList#symmetricDifference(IntList),
symmetricDifferentSet(Collection, Collection),
excludeAll(Collection, Collection),
excludeAllToSet(Collection, Collection),
Difference.of(Collection, Collection)public static <T> Set<T> differentSet(Collection<? extends T> a, Collection<?> b)
T - the generic typea - the ab - the bdifference(Collection, Collection),
excludeAll(Collection, Collection),
excludeAllToSet(Collection, Collection),
removeAll(Collection, Collection),
Difference.of(Collection, Collection)public static <T> Set<T> symmetricDifferentSet(Collection<? extends T> a, Collection<? extends T> b)
T - the generic typea - the ab - the bsymmetricDifference(Collection, Collection),
excludeAll(Collection, Collection),
excludeAllToSet(Collection, Collection),
Difference.of(Collection, Collection)public static <T> Set<T> commonSet(Collection<? extends T> a, Collection<?> b)
T - the generic typea - the ab - the bintersection(Collection, Collection),
Collection.retainAll(Collection)public static <T> Set<T> commonSet(Collection<? extends Collection<? extends T>> c)
T - the generic typec - the cintersection(Collection),
Collection.retainAll(Collection)public static <T> List<T> exclude(Collection<T> c, Object objToExclude)
List with specified objToExclude excluded.
That's to say no more objToExclude will present in the returned List.T - c - objToExclude - Listdifference(Collection, Collection),
removeAll(Collection, Collection),
Difference.of(Collection, Collection)public static <T> Set<T> excludeToSet(Collection<T> c, Object objToExclude)
Set with specified objToExclude excluded.
That's to say no more objToExclude will present in the returned Set.T - c - objToExclude - Setdifference(Collection, Collection),
removeAll(Collection, Collection),
Difference.of(Collection, Collection)public static <T> List<T> excludeAll(Collection<T> c, Collection<?> objsToExclude)
List with specified objsToExclude excluded.
That's to say no more objsToExclude will present in the returned List.c - objsToExclude - Listdifference(Collection, Collection),
removeAll(Collection, Collection),
Difference.of(Collection, Collection)public static <T> Set<T> excludeAllToSet(Collection<T> c, Collection<?> objsToExclude)
Set with specified objsToExclude excluded.
That's to say no more objsToExclude will present in the returned Set.c - objsToExclude - Setdifference(Collection, Collection),
removeAll(Collection, Collection),
Difference.of(Collection, Collection)public static boolean isSubCollection(Collection<?> subColl, Collection<?> coll)
true if subColl is a sub-collection of coll,
that is, if the cardinality of e in subColl is less than or
equal to the cardinality of e in coll, for each element e
in subColl.subColl - the first (sub?) collection, must not be nullcoll - the second (super?) collection, must not be nulltrue if subColl is a sub-collection of collisProperSubCollection(java.util.Collection<?>, java.util.Collection<?>),
Collection.containsAll(java.util.Collection<?>)public static boolean isProperSubCollection(Collection<?> subColl, Collection<?> coll)
true if subColl is a proper sub-collection of coll,
that is, if the cardinality of e in subColl is less
than or equal to the cardinality of e in coll,
for each element e in subColl, and there is at least one
element f such that the cardinality of f in coll
is strictly greater than the cardinality of f in subColl.
The implementation assumes
subColl.size() and coll.size() represent the
total cardinality of a and b, resp. subColl.size() < Integer.MAXVALUEsubColl - the first (sub?) collection, must not be nullcoll - the second (super?) collection, must not be nulltrue if subColl is a proper sub-collection of collisSubCollection(java.util.Collection<?>, java.util.Collection<?>),
Collection.containsAll(java.util.Collection<?>)public static boolean isEqualCollection(Collection<?> a, Collection<?> b)
true if the given Collections contain
exactly the same elements with exactly the same cardinalities.
That is, if the cardinality of e in a is equal to the cardinality of e in b, for each element e in a or b.
a - the first collectionb - the second collectiontrue if the collections contain the same elements with the same cardinalities.public static boolean[] concat(boolean[] a,
boolean[] b)
a - b - @SafeVarargs public static boolean[] concat(boolean[]... aa)
aa - public static char[] concat(char[] a,
char[] b)
a - b - @SafeVarargs public static char[] concat(char[]... aa)
aa - public static byte[] concat(byte[] a,
byte[] b)
a - b - @SafeVarargs public static byte[] concat(byte[]... aa)
aa - public static short[] concat(short[] a,
short[] b)
a - b - @SafeVarargs public static short[] concat(short[]... aa)
aa - public static int[] concat(int[] a,
int[] b)
a - b - @SafeVarargs public static int[] concat(int[]... aa)
aa - public static long[] concat(long[] a,
long[] b)
a - b - @SafeVarargs public static long[] concat(long[]... aa)
aa - public static float[] concat(float[] a,
float[] b)
a - b - @SafeVarargs public static float[] concat(float[]... aa)
aa - public static double[] concat(double[] a,
double[] b)
a - b - @SafeVarargs public static double[] concat(double[]... aa)
aa - public static <T> T[] concat(T[] a,
T[] b)
T - a - b - @SafeVarargs public static <T> T[] concat(T[]... aa) throws IllegalArgumentException
T - aa - IllegalArgumentException - if the specified Array is null.public static <T> List<T> concat(Collection<? extends T> a, Collection<? extends T> b)
T - a - b - @SafeVarargs public static <T> List<T> concat(Collection<? extends T>... a)
T - a - public static <T> List<T> concat(Collection<? extends Collection<? extends T>> c)
T - c - public static <T,C extends Collection<T>> C concat(Collection<? extends Collection<? extends T>> c, IntFunction<? extends C> supplier)
T - C - c - supplier - public static <T> ObjIterator<T> concat(Iterator<? extends T> a, Iterator<? extends T> b)
T - a - b - Iterators.concat(Iterator...)@SafeVarargs public static <T> ObjIterator<T> concat(Iterator<? extends T>... a)
T - a - Iterators.concat(Iterator...)public static int replaceAll(boolean[] a,
boolean oldVal,
boolean newVal)
a - oldVal - newVal - public static int replaceAll(char[] a,
char oldVal,
char newVal)
a - oldVal - newVal - public static int replaceAll(byte[] a,
byte oldVal,
byte newVal)
a - oldVal - newVal - public static int replaceAll(short[] a,
short oldVal,
short newVal)
a - oldVal - newVal - public static int replaceAll(int[] a,
int oldVal,
int newVal)
a - oldVal - newVal - public static int replaceAll(long[] a,
long oldVal,
long newVal)
a - oldVal - newVal - public static int replaceAll(float[] a,
float oldVal,
float newVal)
a - oldVal - newVal - public static int replaceAll(double[] a,
double oldVal,
double newVal)
a - oldVal - newVal - public static <T> int replaceAll(T[] a,
Object oldVal,
T newVal)
T - a - oldVal - newVal - public static <T> int replaceAll(List<T> list, Object oldVal, T newVal)
T - list - oldVal - newVal - public static <E extends Exception> void replaceAll(boolean[] a, Throwables.BooleanUnaryOperator<E> operator) throws E extends Exception
E extends Exceptionpublic static <E extends Exception> void replaceAll(char[] a, Throwables.CharUnaryOperator<E> operator) throws E extends Exception
E extends Exceptionpublic static <E extends Exception> void replaceAll(byte[] a, Throwables.ByteUnaryOperator<E> operator) throws E extends Exception
E extends Exceptionpublic static <E extends Exception> void replaceAll(short[] a, Throwables.ShortUnaryOperator<E> operator) throws E extends Exception
E extends Exceptionpublic static <E extends Exception> void replaceAll(int[] a, Throwables.IntUnaryOperator<E> operator) throws E extends Exception
E extends Exceptionpublic static <E extends Exception> void replaceAll(long[] a, Throwables.LongUnaryOperator<E> operator) throws E extends Exception
E extends Exceptionpublic static <E extends Exception> void replaceAll(float[] a, Throwables.FloatUnaryOperator<E> operator) throws E extends Exception
E extends Exceptionpublic static <E extends Exception> void replaceAll(double[] a, Throwables.DoubleUnaryOperator<E> operator) throws E extends Exception
E extends Exceptionpublic static <T,E extends Exception> void replaceAll(T[] a, Throwables.UnaryOperator<T,E> operator) throws E extends Exception
E extends Exceptionpublic static <T,E extends Exception> int replaceAll(List<T> list, Throwables.UnaryOperator<T,E> operator) throws E extends Exception
E extends Exceptionpublic static <E extends Exception> int replaceIf(boolean[] a, Throwables.BooleanPredicate<E> predicate, boolean newValue) throws E extends Exception
E extends Exceptionpublic static <E extends Exception> int replaceIf(char[] a, Throwables.CharPredicate<E> predicate, char newValue) throws E extends Exception
E extends Exceptionpublic static <E extends Exception> int replaceIf(byte[] a, Throwables.BytePredicate<E> predicate, byte newValue) throws E extends Exception
E extends Exceptionpublic static <E extends Exception> int replaceIf(short[] a, Throwables.ShortPredicate<E> predicate, short newValue) throws E extends Exception
E extends Exceptionpublic static <E extends Exception> int replaceIf(int[] a, Throwables.IntPredicate<E> predicate, int newValue) throws E extends Exception
E extends Exceptionpublic static <E extends Exception> int replaceIf(long[] a, Throwables.LongPredicate<E> predicate, long newValue) throws E extends Exception
E extends Exceptionpublic static <E extends Exception> int replaceIf(float[] a, Throwables.FloatPredicate<E> predicate, float newValue) throws E extends Exception
E extends Exceptionpublic static <E extends Exception> int replaceIf(double[] a, Throwables.DoublePredicate<E> predicate, double newValue) throws E extends Exception
E extends Exceptionpublic static <T,E extends Exception> int replaceIf(T[] a, Throwables.Predicate<? super T,E> predicate, T newValue) throws E extends Exception
E extends Exceptionpublic static <T,E extends Exception> int replaceIf(List<T> c, Throwables.Predicate<? super T,E> predicate, T newValue) throws E extends Exception
E extends Exceptionpublic static boolean[] add(boolean[] a,
boolean elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new array.
a - elementToAdd - public static char[] add(char[] a,
char elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new array.
a - elementToAdd - public static byte[] add(byte[] a,
byte elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new array.
a - elementToAdd - public static short[] add(short[] a,
short elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new array.
a - elementToAdd - public static int[] add(int[] a,
int elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new array.
a - elementToAdd - public static long[] add(long[] a,
long elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new array.
a - elementToAdd - public static float[] add(float[] a,
float elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new array.
a - elementToAdd - public static double[] add(double[] a,
double elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new array.
a - elementToAdd - public static String[] add(String[] a, String elementToAdd)
Copies the given array and adds the given elementToAdd at the end of the new array.
a - elementToAdd - public static <T> T[] add(T[] a,
T elementToAdd)
throws IllegalArgumentException
Copies the given array and adds the given elementToAdd at the end of the new array.
T - a - elementToAdd - IllegalArgumentException - if the specified Array is null.@SafeVarargs public static boolean[] addAll(boolean[] a, boolean... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
a - the first array whose elementToAdds are added to the new array.elementsToAdd - the second array whose elementToAdds are added to the new array.@SafeVarargs public static char[] addAll(char[] a, char... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
a - the first array whose elementToAdds are added to the new array.elementsToAdd - the second array whose elementToAdds are added to the new array.@SafeVarargs public static byte[] addAll(byte[] a, byte... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
a - the first array whose elementToAdds are added to the new array.elementsToAdd - the second array whose elementToAdds are added to the new array.@SafeVarargs public static short[] addAll(short[] a, short... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
a - the first array whose elementToAdds are added to the new array.elementsToAdd - the second array whose elementToAdds are added to the new array.@SafeVarargs public static int[] addAll(int[] a, int... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
a - the first array whose elementToAdds are added to the new array.elementsToAdd - the second array whose elementToAdds are added to the new array.@SafeVarargs public static long[] addAll(long[] a, long... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
a - the first array whose elementToAdds are added to the new array.elementsToAdd - the second array whose elementToAdds are added to the new array.@SafeVarargs public static float[] addAll(float[] a, float... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
a - the first array whose elementToAdds are added to the new array.elementsToAdd - the second array whose elementToAdds are added to the new array.@SafeVarargs public static double[] addAll(double[] a, double... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
a - the first array whose elementToAdds are added to the new array.elementsToAdd - the second array whose elementToAdds are added to the new array.@SafeVarargs public static String[] addAll(String[] a, String... elementsToAdd)
Adds all the elementToAdds of the given arrays into a new array.
a - the first array whose elementToAdds are added to the new array.elementsToAdd - the second array whose elementToAdds are added to the new array.@SafeVarargs public static <T> T[] addAll(T[] a, T... elementsToAdd) throws IllegalArgumentException
Adds all the elementToAdds of the given arrays into a new array.
T - a - the first array whose elementToAdds are added to the new array.elementsToAdd - the second array whose elementToAdds are added to the new array.IllegalArgumentException - if the specified Array is null.public static <T> boolean addAll(Collection<T> c, Iterator<? extends T> elementsToAdd) throws IllegalArgumentException
T - c - elementsToAdd - true if the specified Collection c has been modified.IllegalArgumentExceptionpublic static boolean[] insert(boolean[] a,
int index,
boolean elementToInsert)
Inserts the specified elementToInsert at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
This method returns a new array with the same elementToInserts of the input array plus the given elementToInsert on the specified position. The component type of the returned array is always the same as that of the input array.
a - index - the position of the new objectelementToInsert - the object to addpublic static char[] insert(char[] a,
int index,
char elementToInsert)
Inserts the specified elementToInsert at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
This method returns a new array with the same elementToInserts of the input array plus the given elementToInsert on the specified position. The component type of the returned array is always the same as that of the input array.
a - index - the position of the new objectelementToInsert - the object to addpublic static byte[] insert(byte[] a,
int index,
byte elementToInsert)
Inserts the specified elementToInsert at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
This method returns a new array with the same elementToInserts of the input array plus the given elementToInsert on the specified position. The component type of the returned array is always the same as that of the input array.
a - index - the position of the new objectelementToInsert - the object to addpublic static short[] insert(short[] a,
int index,
short elementToInsert)
Inserts the specified elementToInsert at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
This method returns a new array with the same elementToInserts of the input array plus the given elementToInsert on the specified position. The component type of the returned array is always the same as that of the input array.
a - index - the position of the new objectelementToInsert - the object to addpublic static int[] insert(int[] a,
int index,
int elementToInsert)
Inserts the specified elementToInsert at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
This method returns a new array with the same elementToInserts of the input array plus the given elementToInsert on the specified position. The component type of the returned array is always the same as that of the input array.
a - index - the position of the new objectelementToInsert - the object to addpublic static long[] insert(long[] a,
int index,
long elementToInsert)
Inserts the specified elementToInsert at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
This method returns a new array with the same elementToInserts of the input array plus the given elementToInsert on the specified position. The component type of the returned array is always the same as that of the input array.
a - index - the position of the new objectelementToInsert - the object to addpublic static float[] insert(float[] a,
int index,
float elementToInsert)
Inserts the specified elementToInsert at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
This method returns a new array with the same elementToInserts of the input array plus the given elementToInsert on the specified position. The component type of the returned array is always the same as that of the input array.
a - index - the position of the new objectelementToInsert - the object to addpublic static double[] insert(double[] a,
int index,
double elementToInsert)
Inserts the specified elementToInsert at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
This method returns a new array with the same elementToInserts of the input array plus the given elementToInsert on the specified position. The component type of the returned array is always the same as that of the input array.
a - index - the position of the new objectelementToInsert - the object to addpublic static String[] insert(String[] a, int index, String elementToInsert)
a - index - elementToInsert - public static <T> T[] insert(T[] a,
int index,
T elementToInsert)
throws IllegalArgumentException
Inserts the specified elementToInsert at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
This method returns a new array with the same elementToInserts of the input array plus the given elementToInsert on the specified position. The component type of the returned array is always the same as that of the input array.
T - a - index - the position of the new objectelementToInsert - the object to addIllegalArgumentException - if the specified Array is null.public static String insert(String str, int index, String strToInsert)
str - index - strToInsert - @SafeVarargs public static boolean[] insertAll(boolean[] a, int index, boolean... elementsToInsert)
Inserts the specified elementToInserts at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
a - the first array whose elementToInserts are added to the new array.index - the position of the new elementToInserts start fromelementsToInsert - the second array whose elementToInserts are added to the new array.@SafeVarargs public static char[] insertAll(char[] a, int index, char... elementsToInsert)
Inserts the specified elementToInserts at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
a - the first array whose elementToInserts are added to the new array.index - the position of the new elementToInserts start fromelementsToInsert - the second array whose elementToInserts are added to the new array.@SafeVarargs public static byte[] insertAll(byte[] a, int index, byte... elementsToInsert)
Inserts the specified elementToInserts at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
a - the first array whose elementToInserts are added to the new array.index - the position of the new elementToInserts start fromelementsToInsert - the second array whose elementToInserts are added to the new array.@SafeVarargs public static short[] insertAll(short[] a, int index, short... elementsToInsert)
Inserts the specified elementToInserts at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
a - the first array whose elementToInserts are added to the new array.index - the position of the new elementToInserts start fromelementsToInsert - the second array whose elementToInserts are added to the new array.@SafeVarargs public static int[] insertAll(int[] a, int index, int... elementsToInsert)
Inserts the specified elementToInserts at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
a - the first array whose elementToInserts are added to the new array.index - the position of the new elementToInserts start fromelementsToInsert - the second array whose elementToInserts are added to the new array.@SafeVarargs public static long[] insertAll(long[] a, int index, long... elementsToInsert)
Inserts the specified elementToInserts at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
a - the first array whose elementToInserts are added to the new array.index - the position of the new elementToInserts start fromelementsToInsert - the second array whose elementToInserts are added to the new array.@SafeVarargs public static float[] insertAll(float[] a, int index, float... elementsToInsert)
Inserts the specified elementToInserts at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
a - the first array whose elementToInserts are added to the new array.index - the position of the new elementToInserts start fromelementsToInsert - the second array whose elementToInserts are added to the new array.@SafeVarargs public static double[] insertAll(double[] a, int index, double... elementsToInsert)
Inserts the specified elementToInserts at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
a - the first array whose elementToInserts are added to the new array.index - the position of the new elementToInserts start fromelementsToInsert - the second array whose elementToInserts are added to the new array.@SafeVarargs public static String[] insertAll(String[] a, int index, String... elementsToInsert)
a - index - elementsToInsert - @SafeVarargs public static <T> T[] insertAll(T[] a, int index, T... elementsToInsert) throws IllegalArgumentException
Inserts the specified elementToInserts at the specified position in the array. Shifts the elementToInsert currently at that position (if any) and any subsequent elementToInserts to the right (adds one to their indices).
T - a - the first array whose elementToInserts are added to the new array.index - the position of the new elementToInserts start fromelementsToInsert - the second array whose elementToInserts are added to the new array.IllegalArgumentException - if the specified Array is null.public static boolean[] delete(boolean[] a,
int index)
Removes the element at the specified position from the specified array. All subsequent elements are shifted to the left (subtracts one from their indices).
This method returns a new array with the same elements of the input array except the element on the specified position. The component type of the returned array is always the same as that of the input array.
a - index - the position of the element to be removedpublic static char[] delete(char[] a,
int index)
Removes the element at the specified position from the specified array. All subsequent elements are shifted to the left (subtracts one from their indices).
This method returns a new array with the same elements of the input array except the element on the specified position. The component type of the returned array is always the same as that of the input array.
a - index - the position of the element to be removedpublic static byte[] delete(byte[] a,
int index)
Removes the element at the specified position from the specified array. All subsequent elements are shifted to the left (subtracts one from their indices).
This method returns a new array with the same elements of the input array except the element on the specified position. The component type of the returned array is always the same as that of the input array.
a - index - the position of the element to be removedpublic static short[] delete(short[] a,
int index)
Removes the element at the specified position from the specified array. All subsequent elements are shifted to the left (subtracts one from their indices).
This method returns a new array with the same elements of the input array except the element on the specified position. The component type of the returned array is always the same as that of the input array.
a - index - the position of the element to be removedpublic static int[] delete(int[] a,
int index)
Removes the element at the specified position from the specified array. All subsequent elements are shifted to the left (subtracts one from their indices).
This method returns a new array with the same elements of the input array except the element on the specified position. The component type of the returned array is always the same as that of the input array.
a - index - the position of the element to be removedpublic static long[] delete(long[] a,
int index)
Removes the element at the specified position from the specified array. All subsequent elements are shifted to the left (subtracts one from their indices).
This method returns a new array with the same elements of the input array except the element on the specified position. The component type of the returned array is always the same as that of the input array.
a - index - the position of the element to be removedpublic static float[] delete(float[] a,
int index)
Removes the element at the specified position from the specified array. All subsequent elements are shifted to the left (subtracts one from their indices).
This method returns a new array with the same elements of the input array except the element on the specified position. The component type of the returned array is always the same as that of the input array.
a - index - the position of the element to be removedpublic static double[] delete(double[] a,
int index)
Removes the element at the specified position from the specified array. All subsequent elements are shifted to the left (subtracts one from their indices).
This method returns a new array with the same elements of the input array except the element on the specified position. The component type of the returned array is always the same as that of the input array.
a - index - the position of the element to be removedpublic static <T> T[] delete(T[] a,
int index)
throws IllegalArgumentException
Removes the element at the specified position from the specified array. All subsequent elements are shifted to the left (subtracts one from their indices).
This method returns a new array with the same elements of the input array except the element on the specified position. The component type of the returned array is always the same as that of the input array.
T - the component type of the arraya - index - the position of the element to be removedIllegalArgumentException - if the specified Array is null.@SafeVarargs public static boolean[] deleteAll(boolean[] a, int... indices)
Removes the elements at the specified positions from the specified array. All remaining elements are shifted to the left.
This method returns a new array with the same elements of the input array except those at the specified positions. The component type of the returned array is always the same as that of the input array.
If the input array is null, an IndexOutOfBoundsException will be
thrown, because in that case no valid index can be specified.
N.deleteAll([true, false, true], 0, 2) = [false] N.removeAll([true, false, true], 1, 2) = [true]
a - the array to remove the element from, may not be nullindices - the positions of the elements to be removed@SafeVarargs public static char[] deleteAll(char[] a, int... indices)
Removes the elements at the specified positions from the specified array. All remaining elements are shifted to the left.
This method returns a new array with the same elements of the input array except those at the specified positions. The component type of the returned array is always the same as that of the input array.
N.deleteAll([1], 0) = [] N.deleteAll([2, 6], 0) = [6] N.deleteAll([2, 6], 0, 1) = [] N.deleteAll([2, 6, 3], 1, 2) = [2] N.deleteAll([2, 6, 3], 0, 2) = [6] N.deleteAll([2, 6, 3], 0, 1, 2) = []
a - indices - the positions of the elements to be removed@SafeVarargs public static byte[] deleteAll(byte[] a, int... indices)
Removes the elements at the specified positions from the specified array. All remaining elements are shifted to the left.
This method returns a new array with the same elements of the input array except those at the specified positions. The component type of the returned array is always the same as that of the input array.
N.deleteAll([1], 0) = [] N.deleteAll([2, 6], 0) = [6] N.deleteAll([2, 6], 0, 1) = [] N.deleteAll([2, 6, 3], 1, 2) = [2] N.deleteAll([2, 6, 3], 0, 2) = [6] N.deleteAll([2, 6, 3], 0, 1, 2) = []
a - indices - the positions of the elements to be removed@SafeVarargs public static short[] deleteAll(short[] a, int... indices)
Removes the elements at the specified positions from the specified array. All remaining elements are shifted to the left.
This method returns a new array with the same elements of the input array except those at the specified positions. The component type of the returned array is always the same as that of the input array.
N.deleteAll([1], 0) = [] N.deleteAll([2, 6], 0) = [6] N.deleteAll([2, 6], 0, 1) = [] N.deleteAll([2, 6, 3], 1, 2) = [2] N.deleteAll([2, 6, 3], 0, 2) = [6] N.deleteAll([2, 6, 3], 0, 1, 2) = []
a - indices - the positions of the elements to be removed@SafeVarargs public static int[] deleteAll(int[] a, int... indices)
Removes the elements at the specified positions from the specified array. All remaining elements are shifted to the left.
This method returns a new array with the same elements of the input array except those at the specified positions. The component type of the returned array is always the same as that of the input array.
N.deleteAll([1], 0) = [] N.deleteAll([2, 6], 0) = [6] N.deleteAll([2, 6], 0, 1) = [] N.deleteAll([2, 6, 3], 1, 2) = [2] N.deleteAll([2, 6, 3], 0, 2) = [6] N.deleteAll([2, 6, 3], 0, 1, 2) = []
a - indices - the positions of the elements to be removedIndexOutOfBoundsException - if any index is out of range (index < 0 || index >=
array.length), or if the array is null.@SafeVarargs public static long[] deleteAll(long[] a, int... indices)
Removes the elements at the specified positions from the specified array. All remaining elements are shifted to the left.
This method returns a new array with the same elements of the input array except those at the specified positions. The component type of the returned array is always the same as that of the input array.
N.deleteAll([1], 0) = [] N.deleteAll([2, 6], 0) = [6] N.deleteAll([2, 6], 0, 1) = [] N.deleteAll([2, 6, 3], 1, 2) = [2] N.deleteAll([2, 6, 3], 0, 2) = [6] N.deleteAll([2, 6, 3], 0, 1, 2) = []
a - the array to remove the element from, may not be nullindices - the positions of the elements to be removed@SafeVarargs public static float[] deleteAll(float[] a, int... indices)
Removes the elements at the specified positions from the specified array. All remaining elements are shifted to the left.
This method returns a new array with the same elements of the input array except those at the specified positions. The component type of the returned array is always the same as that of the input array.
N.deleteAll([1], 0) = [] N.deleteAll([2, 6], 0) = [6] N.deleteAll([2, 6], 0, 1) = [] N.deleteAll([2, 6, 3], 1, 2) = [2] N.deleteAll([2, 6, 3], 0, 2) = [6] N.deleteAll([2, 6, 3], 0, 1, 2) = []
a - indices - the positions of the elements to be removed@SafeVarargs public static double[] deleteAll(double[] a, int... indices)
Removes the elements at the specified positions from the specified array. All remaining elements are shifted to the left.
This method returns a new array with the same elements of the input array except those at the specified positions. The component type of the returned array is always the same as that of the input array.
N.deleteAll([1], 0) = [] N.deleteAll([2, 6], 0) = [6] N.deleteAll([2, 6], 0, 1) = [] N.deleteAll([2, 6, 3], 1, 2) = [2] N.deleteAll([2, 6, 3], 0, 2) = [6] N.deleteAll([2, 6, 3], 0, 1, 2) = []
a - indices - the positions of the elements to be removed@SafeVarargs public static String[] deleteAll(String[] a, int... indices) throws IllegalArgumentException
IllegalArgumentException@SafeVarargs public static <T> T[] deleteAll(T[] a, int... indices) throws IllegalArgumentException
Removes the elements at the specified positions from the specified array. All remaining elements are shifted to the left.
This method returns a new array with the same elements of the input array except those at the specified positions. The component type of the returned array is always the same as that of the input array.
N.deleteAll(["a", "b", "c"], 0, 2) = ["b"] N.deleteAll(["a", "b", "c"], 1, 2) = ["a"]
T - the component type of the arraya - indices - the positions of the elements to be removedIllegalArgumentException - if the specified Array is null.@SafeVarargs public static boolean deleteAll(List<?> list, int... indices)
list - indices - public static boolean[] remove(boolean[] a,
boolean elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified array. All subsequent elementsToRemove are shifted to the left (subtracts one from their indices). If the array doesn't contains such an elementToRemove, no elementsToRemove are removed from the array.
This method returns a new array with the same elementsToRemove of the input array except the first occurrence of the specified elementToRemove. The component type of the returned array is always the same as that of the input array.
a - elementToRemove - the elementToRemove to be removedpublic static char[] remove(char[] a,
char elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified array. All subsequent elementsToRemove are shifted to the left (subtracts one from their indices). If the array doesn't contains such an elementToRemove, no elementsToRemove are removed from the array.
This method returns a new array with the same elementsToRemove of the input array except the first occurrence of the specified elementToRemove. The component type of the returned array is always the same as that of the input array.
a - elementToRemove - the elementToRemove to be removedpublic static byte[] remove(byte[] a,
byte elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified array. All subsequent elementsToRemove are shifted to the left (subtracts one from their indices). If the array doesn't contains such an elementToRemove, no elementsToRemove are removed from the array.
This method returns a new array with the same elementsToRemove of the input array except the first occurrence of the specified elementToRemove. The component type of the returned array is always the same as that of the input array.
a - elementToRemove - the elementToRemove to be removedpublic static short[] remove(short[] a,
short elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified array. All subsequent elementsToRemove are shifted to the left (subtracts one from their indices). If the array doesn't contains such an elementToRemove, no elementsToRemove are removed from the array.
This method returns a new array with the same elementsToRemove of the input array except the first occurrence of the specified elementToRemove. The component type of the returned array is always the same as that of the input array.
a - elementToRemove - the elementToRemove to be removedpublic static int[] remove(int[] a,
int elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified array. All subsequent elementsToRemove are shifted to the left (subtracts one from their indices). If the array doesn't contains such an elementToRemove, no elementsToRemove are removed from the array.
This method returns a new array with the same elementsToRemove of the input array except the first occurrence of the specified elementToRemove. The component type of the returned array is always the same as that of the input array.
a - elementToRemove - the elementToRemove to be removedpublic static long[] remove(long[] a,
long elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified array. All subsequent elementsToRemove are shifted to the left (subtracts one from their indices). If the array doesn't contains such an elementToRemove, no elementsToRemove are removed from the array.
This method returns a new array with the same elementsToRemove of the input array except the first occurrence of the specified elementToRemove. The component type of the returned array is always the same as that of the input array.
a - elementToRemove - the elementToRemove to be removedpublic static float[] remove(float[] a,
float elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified array. All subsequent elementsToRemove are shifted to the left (subtracts one from their indices). If the array doesn't contains such an elementToRemove, no elementsToRemove are removed from the array.
This method returns a new array with the same elementsToRemove of the input array except the first occurrence of the specified elementToRemove. The component type of the returned array is always the same as that of the input array.
a - elementToRemove - the elementToRemove to be removedpublic static double[] remove(double[] a,
double elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified array. All subsequent elementsToRemove are shifted to the left (subtracts one from their indices). If the array doesn't contains such an elementToRemove, no elementsToRemove are removed from the array.
This method returns a new array with the same elementsToRemove of the input array except the first occurrence of the specified elementToRemove. The component type of the returned array is always the same as that of the input array.
a - elementToRemove - the elementToRemove to be removedpublic static <T> T[] remove(T[] a,
T elementToRemove)
throws IllegalArgumentException
Removes the first occurrence of the specified elementToRemove from the specified array. All subsequent elementsToRemove are shifted to the left (subtracts one from their indices). If the array doesn't contains such an elementToRemove, no elementsToRemove are removed from the array.
This method returns a new array with the same elementsToRemove of the input array except the first occurrence of the specified elementToRemove. The component type of the returned array is always the same as that of the input array.
T - a - elementToRemove - the elementToRemove to be removedIllegalArgumentException - if the specified Array is null.public static <T> boolean remove(Collection<T> c, T elementToRemove)
Removes the first occurrence of the specified elementToRemove from the specified collection. If the collection doesn't contains such an elementToRemove, no elementsToRemove are removed from the collection.
c - elementToRemove - the elementToRemove to be removedpublic static boolean[] removeAllOccurrences(boolean[] a,
boolean elementToRemove)
a - elementToRemove - public static char[] removeAllOccurrences(char[] a,
char elementToRemove)
a - elementToRemove - public static byte[] removeAllOccurrences(byte[] a,
byte elementToRemove)
a - elementToRemove - public static short[] removeAllOccurrences(short[] a,
short elementToRemove)
a - elementToRemove - public static int[] removeAllOccurrences(int[] a,
int elementToRemove)
a - elementToRemove - public static long[] removeAllOccurrences(long[] a,
long elementToRemove)
a - elementToRemove - public static float[] removeAllOccurrences(float[] a,
float elementToRemove)
a - elementToRemove - public static double[] removeAllOccurrences(double[] a,
double elementToRemove)
a - elementToRemove - public static String[] removeAllOccurrences(String[] a, String elementToRemove)
public static <T> T[] removeAllOccurrences(T[] a,
T elementToRemove)
T - a - elementToRemove - public static <T> boolean removeAllOccurrences(Collection<T> c, T elementToRemove)
c - elementToRemove - @SafeVarargs public static String[] removeAll(String[] a, String... elementsToRemove)
a.a - elementsToRemove - Collection.removeAll(Collection),
N#difference(double[], double[])@SafeVarargs public static <T> T[] removeAll(T[] a, T... elementsToRemove)
a.T - a - elementsToRemove - Collection.removeAll(Collection),
difference(Object[], Object[])@SafeVarargs public static <T> boolean removeAll(Collection<T> c, T... elementsToRemove)
c - elementsToRemove - differentSet(Collection, Collection)public static <T> boolean removeAll(Collection<T> c, Collection<?> elementsToRemove)
c - elementsToRemove - differentSet(Collection, Collection)public static <T> boolean removeAll(Collection<T> c, Iterator<?> elementsToRemove)
public static boolean[] deleteRange(boolean[] a,
int fromIndex,
int toIndex)
fromIndex to toIndex.a - fromIndex - toIndex - public static char[] deleteRange(char[] a,
int fromIndex,
int toIndex)
fromIndex to toIndex.a - fromIndex - toIndex - public static byte[] deleteRange(byte[] a,
int fromIndex,
int toIndex)
fromIndex to toIndex.a - fromIndex - toIndex - public static short[] deleteRange(short[] a,
int fromIndex,
int toIndex)
fromIndex to toIndex.a - fromIndex - toIndex - public static int[] deleteRange(int[] a,
int fromIndex,
int toIndex)
fromIndex to toIndex.a - fromIndex - toIndex - public static long[] deleteRange(long[] a,
int fromIndex,
int toIndex)
fromIndex to toIndex.a - fromIndex - toIndex - public static float[] deleteRange(float[] a,
int fromIndex,
int toIndex)
fromIndex to toIndex.a - fromIndex - toIndex - public static double[] deleteRange(double[] a,
int fromIndex,
int toIndex)
fromIndex to toIndex.a - fromIndex - toIndex - public static String[] deleteRange(String[] a, int fromIndex, int toIndex) throws IllegalArgumentException
IllegalArgumentExceptionpublic static <T> T[] deleteRange(T[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
fromIndex to toIndex.T - a - fromIndex - toIndex - IllegalArgumentException - if the specified Array is null.public static <T> boolean deleteRange(List<T> c, int fromIndex, int toIndex)
true if the List is updated when fromIndex < toIndex, otherwise false is returned when fromIndex == toIndex.T - c - fromIndex - toIndex - public static void moveRange(boolean[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex)
a - fromIndex - toIndex - newPositionStartIndex - must in the range: [0, array.length - (toIndex - fromIndex)]public static void moveRange(char[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex)
a - fromIndex - toIndex - newPositionStartIndex - must in the range: [0, array.length - (toIndex - fromIndex)]public static void moveRange(byte[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex)
a - fromIndex - toIndex - newPositionStartIndex - must in the range: [0, array.length - (toIndex - fromIndex)]public static void moveRange(short[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex)
a - fromIndex - toIndex - newPositionStartIndex - must in the range: [0, array.length - (toIndex - fromIndex)]public static void moveRange(int[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex)
a - fromIndex - toIndex - newPositionStartIndex - must in the range: [0, array.length - (toIndex - fromIndex)]public static void moveRange(long[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex)
a - fromIndex - toIndex - newPositionStartIndex - must in the range: [0, array.length - (toIndex - fromIndex)]public static void moveRange(float[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex)
a - fromIndex - toIndex - newPositionStartIndex - must in the range: [0, array.length - (toIndex - fromIndex)]public static void moveRange(double[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex)
a - fromIndex - toIndex - newPositionStartIndex - must in the range: [0, array.length - (toIndex - fromIndex)]public static <T> void moveRange(T[] a,
int fromIndex,
int toIndex,
int newPositionStartIndex)
a - fromIndex - toIndex - newPositionStartIndex - must in the range: [0, array.length - (toIndex - fromIndex)]public static <T> boolean moveRange(List<T> c, int fromIndex, int toIndex, int newPositionStartIndex)
c - fromIndex - toIndex - newPositionStartIndex - must in the range: [0, list.size() - (toIndex - fromIndex)]true if the specified List is updated.public static String moveRange(String str, int fromIndex, int toIndex, int newPositionStartIndex)
str - fromIndex - toIndex - newPositionStartIndex - must in the range: [0, String.length - (toIndex - fromIndex)]public static boolean[] removeDuplicates(boolean[] a)
a - public static boolean[] removeDuplicates(boolean[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static char[] removeDuplicates(char[] a)
a - public static char[] removeDuplicates(char[] a,
boolean isSorted)
a - isSorted - public static char[] removeDuplicates(char[] a,
int fromIndex,
int toIndex,
boolean isSorted)
a - fromIndex - toIndex - isSorted - public static byte[] removeDuplicates(byte[] a)
a - public static byte[] removeDuplicates(byte[] a,
boolean isSorted)
a - isSorted - public static byte[] removeDuplicates(byte[] a,
int fromIndex,
int toIndex,
boolean isSorted)
a - fromIndex - toIndex - isSorted - public static short[] removeDuplicates(short[] a)
a - public static short[] removeDuplicates(short[] a,
boolean isSorted)
a - isSorted - public static short[] removeDuplicates(short[] a,
int fromIndex,
int toIndex,
boolean isSorted)
a - fromIndex - toIndex - isSorted - public static int[] removeDuplicates(int[] a)
a - public static int[] removeDuplicates(int[] a,
boolean isSorted)
a - isSorted - public static int[] removeDuplicates(int[] a,
int fromIndex,
int toIndex,
boolean isSorted)
a - fromIndex - toIndex - isSorted - public static long[] removeDuplicates(long[] a)
a - public static long[] removeDuplicates(long[] a,
boolean isSorted)
a - isSorted - public static long[] removeDuplicates(long[] a,
int fromIndex,
int toIndex,
boolean isSorted)
a - fromIndex - toIndex - isSorted - public static float[] removeDuplicates(float[] a)
a - public static float[] removeDuplicates(float[] a,
boolean isSorted)
a - isSorted - public static float[] removeDuplicates(float[] a,
int fromIndex,
int toIndex,
boolean isSorted)
a - fromIndex - toIndex - isSorted - public static double[] removeDuplicates(double[] a)
a - public static double[] removeDuplicates(double[] a,
boolean isSorted)
a - isSorted - public static double[] removeDuplicates(double[] a,
int fromIndex,
int toIndex,
boolean isSorted)
a - fromIndex - toIndex - isSorted - public static String[] removeDuplicates(String[] a)
a - public static String[] removeDuplicates(String[] a, boolean isSorted)
a - isSorted - public static String[] removeDuplicates(String[] a, int fromIndex, int toIndex, boolean isSorted)
a - fromIndex - toIndex - isSorted - public static <T> T[] removeDuplicates(T[] a)
Removes all duplicates elements
N.removeElements(["a", "b", "a"]) = ["a", "b"]
T - the component type of the arraya - NullPointerException - if the specified array a is null.public static <T> T[] removeDuplicates(T[] a,
boolean isSorted)
T - a - isSorted - public static <T> T[] removeDuplicates(T[] a,
int fromIndex,
int toIndex,
boolean isSorted)
T - a - fromIndex - toIndex - isSorted - public static boolean removeDuplicates(Collection<?> c)
c - true if there is one or more duplicated elements are removed. otherwise false is returned.public static boolean removeDuplicates(Collection<?> c, boolean isSorted)
c - isSorted - true if there is one or more duplicated elements are removed. otherwise false is returned.public static boolean[] replaceRange(boolean[] a,
int fromIndex,
int toIndex,
boolean[] replacement)
a - fromIndex - toIndex - replacement - public static char[] replaceRange(char[] a,
int fromIndex,
int toIndex,
char[] replacement)
a - fromIndex - toIndex - replacement - public static byte[] replaceRange(byte[] a,
int fromIndex,
int toIndex,
byte[] replacement)
a - fromIndex - toIndex - replacement - public static short[] replaceRange(short[] a,
int fromIndex,
int toIndex,
short[] replacement)
a - fromIndex - toIndex - replacement - public static int[] replaceRange(int[] a,
int fromIndex,
int toIndex,
int[] replacement)
a - fromIndex - toIndex - replacement - public static long[] replaceRange(long[] a,
int fromIndex,
int toIndex,
long[] replacement)
a - fromIndex - toIndex - replacement - public static float[] replaceRange(float[] a,
int fromIndex,
int toIndex,
float[] replacement)
a - fromIndex - toIndex - replacement - public static double[] replaceRange(double[] a,
int fromIndex,
int toIndex,
double[] replacement)
a - fromIndex - toIndex - replacement - public static String[] replaceRange(String[] a, int fromIndex, int toIndex, String[] replacement)
public static <T> T[] replaceRange(T[] a,
int fromIndex,
int toIndex,
T[] replacement)
throws IllegalArgumentException
a - fromIndex - toIndex - replacement - IllegalArgumentException - if the specified Array is null.public static <T> boolean replaceRange(List<T> c, int fromIndex, int toIndex, Collection<? extends T> replacement) throws IllegalArgumentException
T - c - fromIndex - toIndex - replacement - true if the specified List is updated.IllegalArgumentException - if the specified c is null.public static String replaceRange(String str, int fromIndex, int toIndex, String replacement)
str - fromIndex - toIndex - replacement - public static boolean hasDuplicates(char[] a)
a - public static boolean hasDuplicates(char[] a,
boolean isSorted)
a - isSorted - public static boolean hasDuplicates(byte[] a)
a - public static boolean hasDuplicates(byte[] a,
boolean isSorted)
a - isSorted - public static boolean hasDuplicates(short[] a)
a - public static boolean hasDuplicates(short[] a,
boolean isSorted)
a - isSorted - public static boolean hasDuplicates(int[] a)
a - public static boolean hasDuplicates(int[] a,
boolean isSorted)
a - isSorted - public static boolean hasDuplicates(long[] a)
a - public static boolean hasDuplicates(long[] a,
boolean isSorted)
a - isSorted - public static boolean hasDuplicates(float[] a)
a - public static boolean hasDuplicates(float[] a,
boolean isSorted)
a - isSorted - public static boolean hasDuplicates(double[] a)
a - public static boolean hasDuplicates(double[] a,
boolean isSorted)
a - isSorted - public static <T> boolean hasDuplicates(T[] a)
T - a - public static <T> boolean hasDuplicates(T[] a,
boolean isSorted)
T - a - isSorted - public static boolean hasDuplicates(Collection<?> c)
c - public static boolean hasDuplicates(Collection<?> c, boolean isSorted)
c - isSorted - public static <T> boolean retainAll(Collection<T> c, Collection<? extends T> objsToKeep)
c - objsToKeep - @SafeVarargs public static int sum(char... a)
a - public static int sum(char[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - @SafeVarargs public static int sum(byte... a)
a - public static int sum(byte[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - @SafeVarargs public static int sum(short... a)
a - public static int sum(short[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - @SafeVarargs public static int sum(int... a)
a - public static int sum(int[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - @SafeVarargs public static long sum(long... a)
a - public static long sum(long[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - @SafeVarargs public static float sum(float... a)
a - public static float sum(float[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - @SafeVarargs public static double sum(double... a)
a - public static double sum(double[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - @SafeVarargs public static double average(char... a)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.a - public static double average(char[] a,
int fromIndex,
int toIndex)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.a - fromIndex - toIndex - @SafeVarargs public static double average(byte... a)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.a - public static double average(byte[] a,
int fromIndex,
int toIndex)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.a - fromIndex - toIndex - @SafeVarargs public static double average(short... a)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.a - public static double average(short[] a,
int fromIndex,
int toIndex)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.a - fromIndex - toIndex - @SafeVarargs public static double average(int... a)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.a - public static double average(int[] a,
int fromIndex,
int toIndex)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.a - fromIndex - toIndex - @SafeVarargs public static double average(long... a)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.a - public static double average(long[] a,
int fromIndex,
int toIndex)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.a - fromIndex - toIndex - @SafeVarargs public static double average(float... a)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.a - public static double average(float[] a,
int fromIndex,
int toIndex)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.a - fromIndex - toIndex - @SafeVarargs public static double average(double... a)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.a - public static double average(double[] a,
int fromIndex,
int toIndex)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.a - fromIndex - toIndex - public static char min(char a,
char b)
Gets the minimum of two char values.
a - b - public static byte min(byte a,
byte b)
Gets the minimum of two byte values.
a - b - public static short min(short a,
short b)
Gets the minimum of two short values.
a - b - public static int min(int a,
int b)
Gets the minimum of two int values.
a - b - public static long min(long a,
long b)
Gets the minimum of two long values.
a - b - public static float min(float a,
float b)
Gets the minimum of two float values.
a - b - public static double min(double a,
double b)
Gets the minimum of two double values.
a - b - public static <T extends Comparable<? super T>> T min(T a, T b)
T - a - b - public static <T> T min(T a,
T b,
Comparator<? super T> cmp)
T - a - b - cmp - public static char min(char a,
char b,
char c)
Gets the minimum of three char values.
a - b - c - public static byte min(byte a,
byte b,
byte c)
Gets the minimum of three byte values.
a - b - c - public static short min(short a,
short b,
short c)
Gets the minimum of three short values.
a - b - c - public static int min(int a,
int b,
int c)
Gets the minimum of three int values.
a - b - c - public static long min(long a,
long b,
long c)
Gets the minimum of three long values.
a - b - c - public static float min(float a,
float b,
float c)
Gets the minimum of three float values.
a - b - c - public static double min(double a,
double b,
double c)
Gets the minimum of three double values.
a - b - c - public static <T extends Comparable<? super T>> T min(T a, T b, T c)
T - a - b - c - public static <T> T min(T a,
T b,
T c,
Comparator<? super T> cmp)
T - a - b - c - cmp - @SafeVarargs public static char min(char... a) throws IllegalArgumentException
Returns the minimum value in an array.
a - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static char min(char[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static byte min(byte... a) throws IllegalArgumentException
Returns the minimum value in an array.
a - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static byte min(byte[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static short min(short... a) throws IllegalArgumentException
Returns the minimum value in an array.
a - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static short min(short[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static int min(int... a) throws IllegalArgumentException
Returns the minimum value in an array.
a - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static int min(int[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static long min(long... a) throws IllegalArgumentException
Returns the minimum value in an array.
a - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static long min(long[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static float min(float... a) throws IllegalArgumentException
Returns the minimum value in an array.
a - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.IEEE754rUtils for a version of this method
that handles NaN differentlypublic static float min(float[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static double min(double... a) throws IllegalArgumentException
Returns the minimum value in an array.
a - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.IEEE754rUtils for a version of this
method that handles NaN differentlypublic static double min(double[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static <T extends Comparable<? super T>> T min(T[] a) throws IllegalArgumentException
T - a - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.Iterables.min(Comparable[])public static <T extends Comparable<? super T>> T min(T[] a, int fromIndex, int toIndex) throws IllegalArgumentException
T - a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static <T> T min(T[] a,
Comparator<? super T> cmp)
throws IllegalArgumentException
T - a - an Array which must not be null or emptycmp - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.Iterables.min(Object[], Comparator)public static <T> T min(T[] a,
int fromIndex,
int toIndex,
Comparator<? super T> cmp)
throws IllegalArgumentException
T - a - fromIndex - toIndex - cmp - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static <T extends Comparable<? super T>> T min(Collection<? extends T> c) throws IllegalArgumentException
T - c - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.Iterables.min(Collection)public static <T extends Comparable<? super T>> T min(Collection<? extends T> c, int fromIndex, int toIndex) throws IllegalArgumentException
T - c - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.Iterables.min(Collection)public static <T> T min(Collection<? extends T> c, Comparator<? super T> cmp) throws IllegalArgumentException
T - c - cmp - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.Iterables.min(Collection, Comparator)public static <T> T min(Collection<? extends T> c, int fromIndex, int toIndex, Comparator<? super T> cmp) throws IllegalArgumentException
T - c - fromIndex - toIndex - cmp - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static <T extends Comparable<? super T>> List<T> minAll(T[] a)
T - a - public static <T> List<T> minAll(T[] a, Comparator<? super T> cmp)
T - a - cmp - public static <T extends Comparable<? super T>> List<T> minAll(Collection<T> c)
T - c - public static <T> List<T> minAll(Collection<T> c, Comparator<? super T> cmp)
T - c - cmp - public static <T extends Comparable<? super T>> List<T> minAll(Iterator<? extends T> iter)
T - iter - Iterables.min(Iterator)public static <T> List<T> minAll(Iterator<? extends T> iter, Comparator<? super T> cmp)
T - iter - cmp - Iterables.min(Iterator, Comparator)public static char max(char a,
char b)
Gets the maximum of two char values.
a - b - public static byte max(byte a,
byte b)
Gets the maximum of two byte values.
a - b - public static short max(short a,
short b)
Gets the maximum of two short values.
a - b - public static int max(int a,
int b)
Gets the maximum of two int values.
a - b - public static long max(long a,
long b)
Gets the maximum of two long values.
a - b - public static float max(float a,
float b)
Gets the maximum of two float values.
a - b - public static double max(double a,
double b)
Gets the maximum of two double values.
a - b - public static <T extends Comparable<? super T>> T max(T a, T b)
T - a - b - public static <T> T max(T a,
T b,
Comparator<? super T> cmp)
T - a - b - cmp - public static char max(char a,
char b,
char c)
char values.a - b - c - public static byte max(byte a,
byte b,
byte c)
byte values.a - b - c - public static short max(short a,
short b,
short c)
short values.a - b - c - public static int max(int a,
int b,
int c)
int values.a - b - c - public static long max(long a,
long b,
long c)
long values.a - b - c - public static float max(float a,
float b,
float c)
float values.a - b - c - public static double max(double a,
double b,
double c)
double values.a - b - c - public static <T extends Comparable<? super T>> T max(T a, T b, T c)
T - a - b - c - public static <T> T max(T a,
T b,
T c,
Comparator<? super T> cmp)
T - a - b - c - cmp - @SafeVarargs public static char max(char... a) throws IllegalArgumentException
Returns the maximum value in an array.
a - an Array which must not be null or emptyIllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static char max(char[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static byte max(byte... a) throws IllegalArgumentException
Returns the maximum value in an array.
a - an Array which must not be null or emptyIllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static byte max(byte[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static short max(short... a) throws IllegalArgumentException
Returns the maximum value in an array.
a - an Array which must not be null or emptyIllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static short max(short[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static int max(int... a) throws IllegalArgumentException
Returns the maximum value in an array.
a - an Array which must not be null or emptyIllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static int max(int[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static long max(long... a) throws IllegalArgumentException
Returns the maximum value in an array.
a - an Array which must not be null or emptyIllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static long max(long[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static float max(float... a) throws IllegalArgumentException
Returns the maximum value in an array.
a - an Array which must not be null or emptyIllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.IEEE754rUtils for a version of this method
that handles NaN differentlypublic static float max(float[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static double max(double... a) throws IllegalArgumentException
Returns the maximum value in an array.
a - an Array which must not be null or emptyIllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.IEEE754rUtils for a version of this
method that handles NaN differentlypublic static double max(double[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static <T extends Comparable<? super T>> T max(T[] a) throws IllegalArgumentException
T - a - an Array which must not be null or emptyIllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.Iterables.max(Comparable[])public static <T extends Comparable<? super T>> T max(T[] a, int fromIndex, int toIndex) throws IllegalArgumentException
T - a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static <T> T max(T[] a,
Comparator<? super T> cmp)
throws IllegalArgumentException
T - a - an Array which must not be null or emptycmp - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.Iterables.max(Object[], Comparator)public static <T> T max(T[] a,
int fromIndex,
int toIndex,
Comparator<? super T> cmp)
throws IllegalArgumentException
T - a - fromIndex - toIndex - cmp - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static <T extends Comparable<? super T>> T max(Collection<? extends T> c) throws IllegalArgumentException
T - c - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.Iterables.max(Collection)public static <T extends Comparable<? super T>> T max(Collection<? extends T> c, int fromIndex, int toIndex) throws IllegalArgumentException
T - c - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static <T> T max(Collection<? extends T> c, Comparator<? super T> cmp) throws IllegalArgumentException
T - c - cmp - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.Iterables.max(Collection, Comparator)public static <T> T max(Collection<? extends T> c, int fromIndex, int toIndex, Comparator<? super T> cmp) throws IllegalArgumentException
T - c - fromIndex - toIndex - cmp - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static <T extends Comparable<? super T>> List<T> maxAll(T[] a)
T - a - public static <T> List<T> maxAll(T[] a, Comparator<? super T> cmp)
T - a - cmp - public static <T extends Comparable<? super T>> List<T> maxAll(Collection<? extends T> c)
T - c - public static <T> List<T> maxAll(Collection<? extends T> c, Comparator<? super T> cmp)
T - c - cmp - public static <T extends Comparable<? super T>> List<T> maxAll(Iterator<? extends T> iter)
T - iter - Iterables#maxAll(Iterator)public static <T> List<T> maxAll(Iterator<? extends T> iter, Comparator<? super T> cmp)
T - iter - cmp - Iterables#maxAll(Iterator, Comparator)public static char median(char a,
char b,
char c)
a - b - c - median(int...)public static byte median(byte a,
byte b,
byte c)
a - b - c - median(int...)public static short median(short a,
short b,
short c)
a - b - c - median(int...)public static int median(int a,
int b,
int c)
a - b - c - median(int...)public static long median(long a,
long b,
long c)
a - b - c - median(int...)public static float median(float a,
float b,
float c)
a - b - c - median(int...)public static double median(double a,
double b,
double c)
a - b - c - median(int...)public static <T extends Comparable<? super T>> T median(T a, T b, T c)
T - a - b - c - median(int...)public static <T> T median(T a,
T b,
T c,
Comparator<? super T> cmp)
T - a - b - c - cmp - median(int...)@SafeVarargs public static char median(char... a) throws IllegalArgumentException
length / 2 + 1 largest value in the specified array.a - an Array which must not be null or emptyIllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.median(int...)public static char median(char[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static byte median(byte... a) throws IllegalArgumentException
length / 2 + 1 largest value in the specified array.a - an Array which must not be null or emptyIllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.median(int...)public static byte median(byte[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static short median(short... a) throws IllegalArgumentException
length / 2 + 1 largest value in the specified array.a - an Array which must not be null or emptyIllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.median(int...)public static short median(short[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static int median(int... a) throws IllegalArgumentException
length / 2 + 1 largest value in the specified array.a - an Array which must not be null or emptyIllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.median(int...)public static int median(int[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static long median(long... a) throws IllegalArgumentException
length / 2 + 1 largest value in the specified array.a - an Array which must not be null or emptyIllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.median(int...)public static long median(long[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static float median(float... a) throws IllegalArgumentException
length / 2 + 1 largest value in the specified array.a - an Array which must not be null or emptyIllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.median(int...)public static float median(float[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.@SafeVarargs public static double median(double... a) throws IllegalArgumentException
length / 2 + 1 largest value in the specified array.a - an Array which must not be null or emptyIllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.median(int...)public static double median(double[] a,
int fromIndex,
int toIndex)
throws IllegalArgumentException
a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static <T extends Comparable<? super T>> T median(T[] a) throws IllegalArgumentException
length / 2 + 1 largest value in the specified array.T - a - an Array which must not be null or emptyIllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.median(int...)public static <T extends Comparable<? super T>> T median(T[] a, int fromIndex, int toIndex) throws IllegalArgumentException
T - a - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static <T> T median(T[] a,
Comparator<? super T> cmp)
throws IllegalArgumentException
length / 2 + 1 largest value in the specified array.T - a - an Array which must not be null or emptycmp - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.median(int...)public static <T> T median(T[] a,
int fromIndex,
int toIndex,
Comparator<? super T> cmp)
throws IllegalArgumentException
T - a - fromIndex - toIndex - cmp - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static <T extends Comparable<? super T>> T median(Collection<? extends T> c) throws IllegalArgumentException
length / 2 + 1 largest value in the specified array.T - c - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.median(int...)public static <T extends Comparable<? super T>> T median(Collection<? extends T> c, int fromIndex, int toIndex) throws IllegalArgumentException
T - c - fromIndex - toIndex - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static <T> T median(Collection<? extends T> c, Comparator<? super T> cmp) throws IllegalArgumentException
length / 2 + 1 largest value in the specified array.T - c - cmp - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.median(int...)public static <T> T median(Collection<? extends T> c, int fromIndex, int toIndex, Comparator<? super T> cmp) throws IllegalArgumentException
T - c - fromIndex - toIndex - cmp - IllegalArgumentException - if the specified Array/Collection is null or empty, or fromIndex == toIndex.public static char kthLargest(char[] a,
int k)
throws IllegalArgumentException
a - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static char kthLargest(char[] a,
int fromIndex,
int toIndex,
int k)
throws IllegalArgumentException
a - fromIndex - toIndex - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static byte kthLargest(byte[] a,
int k)
throws IllegalArgumentException
a - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static byte kthLargest(byte[] a,
int fromIndex,
int toIndex,
int k)
throws IllegalArgumentException
a - fromIndex - toIndex - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static short kthLargest(short[] a,
int k)
throws IllegalArgumentException
a - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static short kthLargest(short[] a,
int fromIndex,
int toIndex,
int k)
throws IllegalArgumentException
a - fromIndex - toIndex - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static int kthLargest(int[] a,
int k)
throws IllegalArgumentException
a - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static int kthLargest(int[] a,
int fromIndex,
int toIndex,
int k)
throws IllegalArgumentException
a - fromIndex - toIndex - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static long kthLargest(long[] a,
int k)
throws IllegalArgumentException
a - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static long kthLargest(long[] a,
int fromIndex,
int toIndex,
int k)
throws IllegalArgumentException
a - fromIndex - toIndex - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static float kthLargest(float[] a,
int k)
throws IllegalArgumentException
a - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static float kthLargest(float[] a,
int fromIndex,
int toIndex,
int k)
throws IllegalArgumentException
a - fromIndex - toIndex - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static double kthLargest(double[] a,
int k)
throws IllegalArgumentException
a - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static double kthLargest(double[] a,
int fromIndex,
int toIndex,
int k)
throws IllegalArgumentException
a - fromIndex - toIndex - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static <T extends Comparable<? super T>> T kthLargest(T[] a, int k) throws IllegalArgumentException
T - a - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static <T extends Comparable<? super T>> T kthLargest(T[] a, int fromIndex, int toIndex, int k) throws IllegalArgumentException
T - a - fromIndex - toIndex - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static <T> T kthLargest(T[] a,
int k,
Comparator<? super T> cmp)
throws IllegalArgumentException
T - a - k - cmp - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static <T> T kthLargest(T[] a,
int fromIndex,
int toIndex,
int k,
Comparator<? super T> cmp)
throws IllegalArgumentException
T - a - fromIndex - toIndex - k - cmp - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static <T extends Comparable<? super T>> T kthLargest(Collection<? extends T> c, int k) throws IllegalArgumentException
T - c - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static <T extends Comparable<? super T>> T kthLargest(Collection<? extends T> c, int fromIndex, int toIndex, int k) throws IllegalArgumentException
T - c - fromIndex - toIndex - k - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static <T> T kthLargest(Collection<? extends T> c, int k, Comparator<? super T> cmp) throws IllegalArgumentException
T - c - k - cmp - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static <T> T kthLargest(Collection<? extends T> c, int fromIndex, int toIndex, int k, Comparator<? super T> cmp) throws IllegalArgumentException
T - c - fromIndex - toIndex - k - cmp - IllegalArgumentException - if the specified Array/Collection is null or empty, or its length/size is less than k, or toIndex - fromIndex < k.public static Map<Percentage,Character> percentiles(char[] sortedArray) throws IllegalArgumentException
Percentage * length of the specified array.sortedArray - IllegalArgumentException - if the specified sortedArray is null or empty.public static Map<Percentage,Byte> percentiles(byte[] sortedArray) throws IllegalArgumentException
Percentage * length of the specified array.sortedArray - IllegalArgumentException - if the specified sortedArray is null or empty.public static Map<Percentage,Short> percentiles(short[] sortedArray) throws IllegalArgumentException
Percentage * length of the specified array.sortedArray - IllegalArgumentException - if the specified sortedArray is null or empty.public static Map<Percentage,Integer> percentiles(int[] sortedArray) throws IllegalArgumentException
Percentage * length of the specified array.sortedArray - IllegalArgumentException - if the specified sortedArray is null or empty.public static Map<Percentage,Long> percentiles(long[] sortedArray) throws IllegalArgumentException
Percentage * length of the specified array.sortedArray - IllegalArgumentException - if the specified sortedArray is null or empty.public static Map<Percentage,Float> percentiles(float[] sortedArray) throws IllegalArgumentException
Percentage * length of the specified array.sortedArray - IllegalArgumentException - if the specified sortedArray is null or empty.public static Map<Percentage,Double> percentiles(double[] sortedArray) throws IllegalArgumentException
Percentage * length of the specified array.sortedArray - IllegalArgumentException - if the specified sortedArray is null or empty.public static <T> Map<Percentage,T> percentiles(T[] sortedArray) throws IllegalArgumentException
Percentage * length of the specified array.T - sortedArray - IllegalArgumentException - if the specified sortedArray is null or empty.public static <T> Map<Percentage,T> percentiles(List<T> sortedList) throws IllegalArgumentException
Percentage * length of the specified array.T - sortedList - IllegalArgumentException - if the specified sortedList is null or empty.public static <T extends Number> int sumInt(T[] a)
T - a - public static <T extends Number> int sumInt(T[] a, int fromIndex, int toIndex)
T - a - fromIndex - toIndex - public static <T,E extends Exception> int sumInt(T[] a, Throwables.ToIntFunction<? super T,E> func) throws E extends Exception
T - E - a - func - E - the eE extends Exceptionpublic static <T,E extends Exception> int sumInt(T[] a, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T,E> func) throws E extends Exception
T - E - a - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T extends Number> int sumInt(Collection<? extends T> c)
T - c - public static <T extends Number> int sumInt(Collection<? extends T> c, int fromIndex, int toIndex)
T - c - fromIndex - toIndex - public static <T,E extends Exception> int sumInt(Collection<? extends T> c, Throwables.ToIntFunction<? super T,E> func) throws E extends Exception
T - E - c - func - E - the eE extends Exceptionpublic static <T,E extends Exception> int sumInt(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T,E> func) throws E extends Exception
T - E - c - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T extends Number> long sumLong(T[] a)
T - a - public static <T extends Number> long sumLong(T[] a, int fromIndex, int toIndex)
T - a - fromIndex - toIndex - public static <T,E extends Exception> long sumLong(T[] a, Throwables.ToLongFunction<? super T,E> func) throws E extends Exception
T - E - a - func - E - the eE extends Exceptionpublic static <T,E extends Exception> long sumLong(T[] a, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T,E> func) throws E extends Exception
T - E - a - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T extends Number> long sumLong(Collection<? extends T> c)
T - c - public static <T extends Number> long sumLong(Collection<? extends T> c, int fromIndex, int toIndex)
T - c - fromIndex - toIndex - public static <T,E extends Exception> long sumLong(Collection<? extends T> c, Throwables.ToLongFunction<? super T,E> func) throws E extends Exception
T - E - c - func - E - the eE extends Exceptionpublic static <T,E extends Exception> long sumLong(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T,E> func) throws E extends Exception
T - E - c - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T extends Number> double sumDouble(T[] a)
T - a - public static <T extends Number> double sumDouble(T[] a, int fromIndex, int toIndex)
T - a - fromIndex - toIndex - public static <T,E extends Exception> double sumDouble(T[] a, Throwables.ToDoubleFunction<? super T,E> func) throws E extends Exception
T - E - a - func - E - the eE extends Exceptionpublic static <T,E extends Exception> double sumDouble(T[] a, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T,E> func) throws E extends Exception
T - E - a - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T extends Number> double sumDouble(Collection<? extends T> c)
T - c - public static <T extends Number> double sumDouble(Collection<? extends T> c, int fromIndex, int toIndex)
T - c - fromIndex - toIndex - public static <T,E extends Exception> double sumDouble(Collection<? extends T> c, Throwables.ToDoubleFunction<? super T,E> func) throws E extends Exception
T - E - c - func - E - the eE extends Exceptionpublic static <T,E extends Exception> double sumDouble(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T,E> func) throws E extends Exception
T - E - c - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T extends Number> double averageInt(T[] a)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - a - public static <T extends Number> double averageInt(T[] a, int fromIndex, int toIndex)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - a - fromIndex - toIndex - public static <T,E extends Exception> double averageInt(T[] a, Throwables.ToIntFunction<? super T,E> func) throws E extends Exception
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - E - a - func - E - the eE extends Exceptionpublic static <T,E extends Exception> double averageInt(T[] a, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T,E> func) throws E extends Exception
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - E - a - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T extends Number> double averageInt(Collection<? extends T> c)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - c - public static <T extends Number> double averageInt(Collection<? extends T> c, int fromIndex, int toIndex)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - c - fromIndex - toIndex - public static <T,E extends Exception> double averageInt(Collection<? extends T> c, Throwables.ToIntFunction<? super T,E> func) throws E extends Exception
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - E - c - func - E - the eE extends Exceptionpublic static <T,E extends Exception> double averageInt(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T,E> func) throws E extends Exception
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - E - c - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T extends Number> double averageLong(T[] a)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - a - public static <T extends Number> double averageLong(T[] a, int fromIndex, int toIndex)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - a - fromIndex - toIndex - public static <T,E extends Exception> double averageLong(T[] a, Throwables.ToLongFunction<? super T,E> func) throws E extends Exception
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - E - a - func - E - the eE extends Exceptionpublic static <T,E extends Exception> double averageLong(T[] a, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T,E> func) throws E extends Exception
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - E - a - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T extends Number> double averageLong(Collection<? extends T> c)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - c - public static <T extends Number> double averageLong(Collection<? extends T> c, int fromIndex, int toIndex)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - c - fromIndex - toIndex - public static <T,E extends Exception> double averageLong(Collection<? extends T> c, Throwables.ToLongFunction<? super T,E> func) throws E extends Exception
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - E - c - func - E - the eE extends Exceptionpublic static <T,E extends Exception> double averageLong(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T,E> func) throws E extends Exception
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - E - c - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T extends Number> double averageDouble(T[] a)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - a - Iterables#averageDouble(Object[])public static <T extends Number> double averageDouble(T[] a, int fromIndex, int toIndex)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - a - fromIndex - toIndex - public static <T,E extends Exception> double averageDouble(T[] a, Throwables.ToDoubleFunction<? super T,E> func) throws E extends Exception
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - E - a - func - E - the eE extends ExceptionIterables.averageDouble(Object[], com.landawn.abacus.util.Throwables.ToDoubleFunction)public static <T,E extends Exception> double averageDouble(T[] a, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T,E> func) throws E extends Exception
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - E - a - fromIndex - toIndex - func - E - the eE extends ExceptionIterables.averageDouble(Object[], int, int, com.landawn.abacus.util.Throwables.ToDoubleFunction)public static <T extends Number> double averageDouble(Collection<? extends T> c)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - c - Iterables.averageDouble(Collection)public static <T extends Number> double averageDouble(Collection<? extends T> c, int fromIndex, int toIndex)
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - c - fromIndex - toIndex - public static <T,E extends Exception> double averageDouble(Collection<? extends T> c, Throwables.ToDoubleFunction<? super T,E> func) throws E extends Exception
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - E - c - func - E - the eE extends ExceptionIterables.averageDouble(Collection, com.landawn.abacus.util.Throwables.ToDoubleFunction)public static <T,E extends Exception> double averageDouble(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T,E> func) throws E extends Exception
0 if the specified Array/Collection is null or empty, or fromIndex == toIndex.T - E - c - fromIndex - toIndex - func - E - the eE extends ExceptionIterables.averageDouble(Collection, int, int, com.landawn.abacus.util.Throwables.ToDoubleFunction)public static short[] top(short[] a,
int n)
a - n - public static short[] top(short[] a,
int n,
Comparator<? super Short> cmp)
a - n - cmp - public static short[] top(short[] a,
int fromIndex,
int toIndex,
int n)
a - fromIndex - toIndex - n - public static short[] top(short[] a,
int fromIndex,
int toIndex,
int n,
Comparator<? super Short> cmp)
a - fromIndex - toIndex - n - cmp - public static int[] top(int[] a,
int n)
a - n - public static int[] top(int[] a,
int n,
Comparator<? super Integer> cmp)
a - n - cmp - public static int[] top(int[] a,
int fromIndex,
int toIndex,
int n)
a - fromIndex - toIndex - n - public static int[] top(int[] a,
int fromIndex,
int toIndex,
int n,
Comparator<? super Integer> cmp)
a - fromIndex - toIndex - n - cmp - public static long[] top(long[] a,
int n)
a - n - public static long[] top(long[] a,
int n,
Comparator<? super Long> cmp)
a - n - cmp - public static long[] top(long[] a,
int fromIndex,
int toIndex,
int n)
a - fromIndex - toIndex - n - public static long[] top(long[] a,
int fromIndex,
int toIndex,
int n,
Comparator<? super Long> cmp)
a - fromIndex - toIndex - n - cmp - public static float[] top(float[] a,
int n)
a - n - public static float[] top(float[] a,
int n,
Comparator<? super Float> cmp)
a - n - cmp - public static float[] top(float[] a,
int fromIndex,
int toIndex,
int n)
a - fromIndex - toIndex - n - public static float[] top(float[] a,
int fromIndex,
int toIndex,
int n,
Comparator<? super Float> cmp)
a - fromIndex - toIndex - n - cmp - public static double[] top(double[] a,
int n)
a - n - public static double[] top(double[] a,
int n,
Comparator<? super Double> cmp)
a - n - cmp - public static double[] top(double[] a,
int fromIndex,
int toIndex,
int n)
a - fromIndex - toIndex - n - public static double[] top(double[] a,
int fromIndex,
int toIndex,
int n,
Comparator<? super Double> cmp)
a - fromIndex - toIndex - n - cmp - public static <T extends Comparable<? super T>> List<T> top(T[] a, int n)
T - a - n - public static <T> List<T> top(T[] a, int n, Comparator<? super T> cmp)
T - a - n - cmp - public static <T extends Comparable<? super T>> List<T> top(T[] a, int fromIndex, int toIndex, int n)
T - a - fromIndex - toIndex - n - public static <T> List<T> top(T[] a, int fromIndex, int toIndex, int n, Comparator<? super T> cmp)
T - a - fromIndex - toIndex - n - cmp - public static <T extends Comparable<? super T>> List<T> top(Collection<? extends T> c, int n)
T - c - n - public static <T> List<T> top(Collection<? extends T> c, int n, Comparator<? super T> cmp)
T - c - n - cmp - public static <T extends Comparable<? super T>> List<T> top(Collection<? extends T> c, int fromIndex, int toIndex, int n)
T - c - fromIndex - toIndex - n - public static <T> List<T> top(Collection<? extends T> c, int fromIndex, int toIndex, int n, Comparator<? super T> cmp)
T - c - fromIndex - toIndex - n - cmp - public static <T extends Comparable<? super T>> List<T> top(T[] a, int n, boolean keepEncounterOrder)
T - a - n - keepEncounterOrder - public static <T> List<T> top(T[] a, int n, Comparator<? super T> cmp, boolean keepEncounterOrder)
T - a - n - cmp - keepEncounterOrder - public static <T extends Comparable<? super T>> List<T> top(T[] a, int fromIndex, int toIndex, int n, boolean keepEncounterOrder)
T - a - fromIndex - toIndex - n - keepEncounterOrder - public static <T> List<T> top(T[] a, int fromIndex, int toIndex, int n, Comparator<? super T> cmp, boolean keepEncounterOrder)
T - a - fromIndex - toIndex - n - cmp - keepEncounterOrder - public static <T extends Comparable<? super T>> List<T> top(Collection<? extends T> c, int n, boolean keepEncounterOrder)
T - c - n - keepEncounterOrder - public static <T> List<T> top(Collection<? extends T> c, int n, Comparator<? super T> cmp, boolean keepEncounterOrder)
T - c - n - cmp - keepEncounterOrder - public static <T extends Comparable<? super T>> List<T> top(Collection<? extends T> c, int fromIndex, int toIndex, int n, boolean keepEncounterOrder)
T - c - fromIndex - toIndex - n - public static <T> List<T> top(Collection<? extends T> c, int fromIndex, int toIndex, int n, Comparator<? super T> cmp, boolean keepEncounterOrder)
T - c - fromIndex - toIndex - n - cmp - keepEncounterOrder - public static <E extends Exception> void forEach(int startInclusive, int endExclusive, Throwables.Runnable<E> action) throws E extends Exception
E - startInclusive - endExclusive - action - E - the eE extends Exceptionpublic static <E extends Exception> void forEach(int startInclusive, int endExclusive, int step, Throwables.Runnable<E> action) throws E extends Exception
E - startInclusive - endExclusive - step - action - E - the eE extends Exceptionpublic static <E extends Exception> void forEach(int startInclusive, int endExclusive, Throwables.IntConsumer<E> action) throws E extends Exception
E - startInclusive - endExclusive - action - E - the eE extends Exceptionpublic static <E extends Exception> void forEach(int startInclusive, int endExclusive, int step, Throwables.IntConsumer<E> action) throws E extends Exception
E - startInclusive - endExclusive - step - action - E - the eE extends Exception@Deprecated public static <T,E extends Exception> void forEach(int startInclusive, int endExclusive, T a, Throwables.ObjIntConsumer<? super T,E> action) throws E extends Exception
T - E - startInclusive - endExclusive - a - action - E - the eE extends Exception@Deprecated public static <T,E extends Exception> void forEach(int startInclusive, int endExclusive, int step, T a, Throwables.ObjIntConsumer<? super T,E> action) throws E extends Exception
T - E - startInclusive - endExclusive - step - a - action - E - the eE extends Exceptionpublic static <T,E extends Exception> void forEach(T[] a, Throwables.Consumer<? super T,E> action) throws E extends Exception
T - E - a - action - E - the eE extends Exceptionpublic static <T,E extends Exception> void forEach(T[] a, int fromIndex, int toIndex, Throwables.Consumer<? super T,E> action) throws E extends Exception
T - E - a - fromIndex - toIndex - action - E - the eE extends Exceptionpublic static <T,E extends Exception> void forEach(Collection<? extends T> c, Throwables.Consumer<? super T,E> action) throws E extends Exception
T - E - c - action - E - the eE extends Exceptionpublic static <T,E extends Exception> void forEach(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Consumer<? super T,E> action) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.
Note: This is NOT a replacement of traditional for loop statement.
The traditional for loop is still recommended in regular programming.T - E - c - fromIndex - toIndex - action - E - the eE extends Exceptionpublic static <T,E extends Exception> void forEach(Iterator<? extends T> iter, Throwables.Consumer<? super T,E> action) throws E extends Exception
T - E - iter - action - E - the eE extends Exceptionpublic static <K,V,E extends Exception> void forEach(Map<K,V> map, Throwables.Consumer<? super Map.Entry<K,V>,E> action) throws E extends Exception
K - V - E - map - action - E - the eE extends Exceptionpublic static <T,E extends Exception> void forEachIndexed(T[] a, Throwables.IndexedConsumer<? super T,E> action) throws E extends Exception
T - E - a - action - E - the eE extends Exceptionpublic static <T,E extends Exception> void forEachIndexed(T[] a, int fromIndex, int toIndex, Throwables.IndexedConsumer<? super T,E> action) throws E extends Exception
T - E - a - fromIndex - toIndex - action - E - the eE extends Exceptionpublic static <T,E extends Exception> void forEachIndexed(Collection<? extends T> c, Throwables.IndexedConsumer<? super T,E> action) throws E extends Exception
T - E - c - action - E - the eE extends Exceptionpublic static <T,E extends Exception> void forEachIndexed(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.IndexedConsumer<? super T,E> action) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.
Note: This is NOT a replacement of traditional for loop statement.
The traditional for loop is still recommended in regular programming.T - E - c - fromIndex - toIndex - action - E - the eE extends Exceptionpublic static <T,E extends Exception> void forEachIndexed(Iterator<? extends T> iter, Throwables.IndexedConsumer<? super T,E> action) throws E extends Exception
T - E - iter - action - E - the eE extends Exceptionpublic static <K,V,E extends Exception> void forEachIndexed(Map<K,V> map, Throwables.IndexedConsumer<? super Map.Entry<K,V>,E> action) throws E extends Exception
K - V - E - map - action - E - the eE extends Exceptionpublic static <T,U,E extends Exception,E2 extends Exception> void forEach(T[] a, Throwables.Function<? super T,? extends Collection<U>,E> flatMapper, Throwables.BiConsumer<? super T,? super U,E2> action) throws E extends Exception, E2 extends Exception
T - U - E - E2 - a - flatMapper - action - E - the eE2 - the e2E extends Exceptionpublic static <T,U,E extends Exception,E2 extends Exception> void forEach(Collection<T> c, Throwables.Function<? super T,? extends Collection<U>,E> flatMapper, Throwables.BiConsumer<? super T,? super U,E2> action) throws E extends Exception, E2 extends Exception
T - U - E - E2 - c - flatMapper - action - E - the eE2 - the e2E extends Exceptionpublic static <T,U,E extends Exception,E2 extends Exception> void forEach(Iterator<? extends T> iter, Throwables.Function<? super T,? extends Collection<U>,E> flatMapper, Throwables.BiConsumer<? super T,? super U,E2> action) throws E extends Exception, E2 extends Exception
T - U - E - E2 - iter - flatMapper - action - E - the eE2 - the e2E extends Exceptionpublic static <T,T2,T3,E extends Exception,E2 extends Exception,E3 extends Exception> void forEach(T[] a, Throwables.Function<? super T,? extends Collection<T2>,E> flatMapper, Throwables.Function<? super T2,? extends Collection<T3>,E2> flatMapper2, Throwables.TriConsumer<? super T,? super T2,? super T3,E3> action) throws E extends Exception, E2 extends Exception, E3 extends Exception
T - T2 - T3 - E - E2 - E3 - a - flatMapper - flatMapper2 - action - E - the eE2 - the e2E3 - the e3E extends Exceptionpublic static <T,T2,T3,E extends Exception,E2 extends Exception,E3 extends Exception> void forEach(Collection<T> c, Throwables.Function<? super T,? extends Collection<T2>,E> flatMapper, Throwables.Function<? super T2,? extends Collection<T3>,E2> flatMapper2, Throwables.TriConsumer<? super T,? super T2,? super T3,E3> action) throws E extends Exception, E2 extends Exception, E3 extends Exception
T - T2 - T3 - E - E2 - E3 - c - flatMapper - flatMapper2 - action - E - the eE2 - the e2E3 - the e3E extends Exceptionpublic static <T,T2,T3,E extends Exception,E2 extends Exception,E3 extends Exception> void forEach(Iterator<? extends T> iter, Throwables.Function<? super T,? extends Collection<T2>,E> flatMapper, Throwables.Function<? super T2,? extends Collection<T3>,E2> flatMapper2, Throwables.TriConsumer<? super T,? super T2,? super T3,E3> action) throws E extends Exception, E2 extends Exception, E3 extends Exception
T - T2 - T3 - E - E2 - E3 - iter - flatMapper - flatMapper2 - action - E - the eE2 - the e2E3 - the e3E extends Exceptionpublic static <A,B,E extends Exception> void forEach(A[] a, B[] b, Throwables.BiConsumer<? super A,? super B,E> action) throws E extends Exception
A - B - E - a - b - action - E - the eE extends Exceptionpublic static <A,B,E extends Exception> void forEach(Collection<A> a, Collection<B> b, Throwables.BiConsumer<? super A,? super B,E> action) throws E extends Exception
A - B - E - a - b - action - E - the eE extends Exceptionpublic static <A,B,E extends Exception> void forEach(Iterator<A> a, Iterator<B> b, Throwables.BiConsumer<? super A,? super B,E> action) throws E extends Exception
A - B - E - a - b - action - E - the eE extends Exceptionpublic static <A,B,C,E extends Exception> void forEach(A[] a, B[] b, C[] c, Throwables.TriConsumer<? super A,? super B,? super C,E> action) throws E extends Exception
A - B - C - E - a - b - c - action - E - the eE extends Exceptionpublic static <A,B,C,E extends Exception> void forEach(Collection<A> a, Collection<B> b, Collection<C> c, Throwables.TriConsumer<? super A,? super B,? super C,E> action) throws E extends Exception
A - B - C - E - a - b - c - action - E - the eE extends Exceptionpublic static <A,B,C,E extends Exception> void forEach(Iterator<A> a, Iterator<B> b, Iterator<C> c, Throwables.TriConsumer<? super A,? super B,? super C,E> action) throws E extends Exception
A - B - C - E - a - b - c - action - E - the eE extends Exceptionpublic static <A,B,E extends Exception> void forEach(A[] a, B[] b, A valueForNoneA, B valueForNoneB, Throwables.BiConsumer<? super A,? super B,E> action) throws E extends Exception
A - B - E - a - b - valueForNoneA - valueForNoneB - action - E - the eE extends Exceptionpublic static <A,B,E extends Exception> void forEach(Collection<A> a, Collection<B> b, A valueForNoneA, B valueForNoneB, Throwables.BiConsumer<? super A,? super B,E> action) throws E extends Exception
A - B - E - a - b - valueForNoneA - valueForNoneB - action - E - the eE extends Exceptionpublic static <A,B,E extends Exception> void forEach(Iterator<A> a, Iterator<B> b, A valueForNoneA, B valueForNoneB, Throwables.BiConsumer<? super A,? super B,E> action) throws E extends Exception
A - B - E - a - b - valueForNoneA - valueForNoneB - action - E - the eE extends Exceptionpublic static <A,B,C,E extends Exception> void forEach(A[] a, B[] b, C[] c, A valueForNoneA, B valueForNoneB, C valueForNoneC, Throwables.TriConsumer<? super A,? super B,? super C,E> action) throws E extends Exception
A - B - C - E - a - b - c - valueForNoneA - valueForNoneB - valueForNoneC - action - E - the eE extends Exceptionpublic static <A,B,C,E extends Exception> void forEach(Collection<A> a, Collection<B> b, Collection<C> c, A valueForNoneA, B valueForNoneB, C valueForNoneC, Throwables.TriConsumer<? super A,? super B,? super C,E> action) throws E extends Exception
A - B - C - E - a - b - c - valueForNoneA - valueForNoneB - valueForNoneC - action - E - the eE extends Exceptionpublic static <A,B,C,E extends Exception> void forEach(Iterator<A> a, Iterator<B> b, Iterator<C> c, A valueForNoneA, B valueForNoneB, C valueForNoneC, Throwables.TriConsumer<? super A,? super B,? super C,E> action) throws E extends Exception
A - B - C - E - a - b - c - valueForNoneA - valueForNoneB - valueForNoneC - action - E - the eE extends Exceptionpublic static <T,E extends Exception> void forEachNonNull(T[] a, Throwables.Consumer<? super T,E> action) throws E extends Exception
T - E - a - action - E - the eE extends Exceptionpublic static <T,E extends Exception> void forEachNonNull(Collection<T> c, Throwables.Consumer<? super T,E> action) throws E extends Exception
T - E - c - action - E - the eE extends Exceptionpublic static <T,U,E extends Exception,E2 extends Exception> void forEachNonNull(T[] a, Throwables.Function<? super T,? extends Collection<U>,E> flatMapper, Throwables.BiConsumer<? super T,? super U,E2> action) throws E extends Exception, E2 extends Exception
T - U - E - E2 - a - flatMapper - action - E - the eE2 - the e2E extends Exceptionpublic static <T,U,E extends Exception,E2 extends Exception> void forEachNonNull(Collection<T> c, Throwables.Function<? super T,? extends Collection<U>,E> flatMapper, Throwables.BiConsumer<? super T,? super U,E2> action) throws E extends Exception, E2 extends Exception
T - U - E - E2 - c - flatMapper - action - E - the eE2 - the e2E extends Exceptionpublic static <T,U,E extends Exception,E2 extends Exception> void forEachNonNull(Iterator<? extends T> iter, Throwables.Function<? super T,? extends Collection<U>,E> flatMapper, Throwables.BiConsumer<? super T,? super U,E2> action) throws E extends Exception, E2 extends Exception
T - U - E - E2 - iter - flatMapper - action - E - the eE2 - the e2E extends Exceptionpublic static <T,T2,T3,E extends Exception,E2 extends Exception,E3 extends Exception> void forEachNonNull(T[] a, Throwables.Function<? super T,? extends Collection<T2>,E> flatMapper, Throwables.Function<? super T2,? extends Collection<T3>,E2> flatMapper2, Throwables.TriConsumer<? super T,? super T2,? super T3,E3> action) throws E extends Exception, E2 extends Exception, E3 extends Exception
T - T2 - T3 - E - E2 - E3 - a - flatMapper - flatMapper2 - action - E - the eE2 - the e2E3 - the e3E extends Exceptionpublic static <T,T2,T3,E extends Exception,E2 extends Exception,E3 extends Exception> void forEachNonNull(Collection<T> c, Throwables.Function<? super T,? extends Collection<T2>,E> flatMapper, Throwables.Function<? super T2,? extends Collection<T3>,E2> flatMapper2, Throwables.TriConsumer<? super T,? super T2,? super T3,E3> action) throws E extends Exception, E2 extends Exception, E3 extends Exception
T - T2 - T3 - E - E2 - E3 - c - flatMapper - flatMapper2 - action - E - the eE2 - the e2E3 - the e3E extends Exceptionpublic static <T,T2,T3,E extends Exception,E2 extends Exception,E3 extends Exception> void forEachNonNull(Iterator<? extends T> iter, Throwables.Function<? super T,? extends Collection<T2>,E> flatMapper, Throwables.Function<? super T2,? extends Collection<T3>,E2> flatMapper2, Throwables.TriConsumer<? super T,? super T2,? super T3,E3> action) throws E extends Exception, E2 extends Exception, E3 extends Exception
T - T2 - T3 - E - E2 - E3 - iter - flatMapper - flatMapper2 - action - E - the eE2 - the e2E3 - the e3E extends Exceptionpublic static <T,E extends Exception> void forEachPair(T[] a, Throwables.BiConsumer<? super T,? super T,E> action) throws E extends Exception
T - the generic typeE - the element typea - the aaction - the actionE - the eE extends Exceptionpublic static <T,E extends Exception> void forEachPair(T[] a, Throwables.BiConsumer<? super T,? super T,E> action, int increment) throws E extends Exception
T - the generic typeE - the element typea - the aaction - the actionincrement - the incrementE - the eE extends Exceptionpublic static <T,E extends Exception> void forEachPair(Collection<? extends T> c, Throwables.BiConsumer<? super T,? super T,E> action) throws E extends Exception
T - the generic typeE - the element typec - the caction - the actionE - the eE extends Exceptionpublic static <T,E extends Exception> void forEachPair(Collection<? extends T> c, Throwables.BiConsumer<? super T,? super T,E> action, int increment) throws E extends Exception
T - the generic typeE - the element typec - the caction - the actionincrement - the incrementE - the eE extends Exceptionpublic static <T,E extends Exception> void forEachPair(Iterator<? extends T> iter, Throwables.BiConsumer<? super T,? super T,E> action) throws E extends Exception
T - E - iter - action - E - the eE extends Exceptionpublic static <T,E extends Exception> void forEachPair(Iterator<? extends T> iter, Throwables.BiConsumer<? super T,? super T,E> action, int increment) throws E extends Exception
T - E - iter - action - increment - E - the eE extends Exceptionpublic static <T,E extends Exception> void forEachTriple(T[] a, Throwables.TriConsumer<? super T,? super T,? super T,E> action) throws E extends Exception
T - the generic typeE - the element typea - the aaction - the actionE - the eE extends Exceptionpublic static <T,E extends Exception> void forEachTriple(T[] a, Throwables.TriConsumer<? super T,? super T,? super T,E> action, int increment) throws E extends Exception
T - the generic typeE - the element typea - the aaction - the actionincrement - the incrementE - the eE extends Exceptionpublic static <T,E extends Exception> void forEachTriple(Collection<? extends T> c, Throwables.TriConsumer<? super T,? super T,? super T,E> action) throws E extends Exception
T - the generic typeE - the element typec - the caction - the actionE - the eE extends Exceptionpublic static <T,E extends Exception> void forEachTriple(Collection<? extends T> c, Throwables.TriConsumer<? super T,? super T,? super T,E> action, int increment) throws E extends Exception
T - the generic typeE - the element typec - the caction - the actionincrement - the incrementE - the eE extends Exceptionpublic static <T,E extends Exception> void forEachTriple(Iterator<? extends T> iter, Throwables.TriConsumer<? super T,? super T,? super T,E> action) throws E extends Exception
T - E - iter - action - E - the eE extends Exceptionpublic static <T,E extends Exception> void forEachTriple(Iterator<? extends T> iter, Throwables.TriConsumer<? super T,? super T,? super T,E> action, int increment) throws E extends Exception
T - E - iter - action - increment - E - the eE extends Exceptionpublic static <E extends Exception> boolean[] filter(boolean[] a, Throwables.BooleanPredicate<E> filter) throws E extends Exception
E - a - filter - E - the eE extends Exceptionpublic static <E extends Exception> boolean[] filter(boolean[] a, Throwables.BooleanPredicate<E> filter, int max) throws E extends Exception
E - a - filter - max - E - the eE extends Exceptionpublic static <E extends Exception> boolean[] filter(boolean[] a, int fromIndex, int toIndex, Throwables.BooleanPredicate<E> filter) throws E extends Exception
E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <E extends Exception> boolean[] filter(boolean[] a, int fromIndex, int toIndex, Throwables.BooleanPredicate<E> filter, int max) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - fromIndex - toIndex - filter - max - maximum return result.E - the eE extends Exceptionpublic static <E extends Exception> char[] filter(char[] a, Throwables.CharPredicate<E> filter) throws E extends Exception
E - a - filter - E - the eE extends Exceptionpublic static <E extends Exception> char[] filter(char[] a, Throwables.CharPredicate<E> filter, int max) throws E extends Exception
E - a - filter - max - E - the eE extends Exceptionpublic static <E extends Exception> char[] filter(char[] a, int fromIndex, int toIndex, Throwables.CharPredicate<E> filter) throws E extends Exception
E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <E extends Exception> char[] filter(char[] a, int fromIndex, int toIndex, Throwables.CharPredicate<E> filter, int max) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - fromIndex - toIndex - filter - max - maximum return result.E - the eE extends Exceptionpublic static <E extends Exception> byte[] filter(byte[] a, Throwables.BytePredicate<E> filter) throws E extends Exception
E - a - filter - E - the eE extends Exceptionpublic static <E extends Exception> byte[] filter(byte[] a, Throwables.BytePredicate<E> filter, int max) throws E extends Exception
E - a - filter - max - E - the eE extends Exceptionpublic static <E extends Exception> byte[] filter(byte[] a, int fromIndex, int toIndex, Throwables.BytePredicate<E> filter) throws E extends Exception
E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <E extends Exception> byte[] filter(byte[] a, int fromIndex, int toIndex, Throwables.BytePredicate<E> filter, int max) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - fromIndex - toIndex - filter - max - maximum return result.E - the eE extends Exceptionpublic static <E extends Exception> short[] filter(short[] a, Throwables.ShortPredicate<E> filter) throws E extends Exception
E - a - filter - E - the eE extends Exceptionpublic static <E extends Exception> short[] filter(short[] a, Throwables.ShortPredicate<E> filter, int max) throws E extends Exception
E - a - filter - max - E - the eE extends Exceptionpublic static <E extends Exception> short[] filter(short[] a, int fromIndex, int toIndex, Throwables.ShortPredicate<E> filter) throws E extends Exception
E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <E extends Exception> short[] filter(short[] a, int fromIndex, int toIndex, Throwables.ShortPredicate<E> filter, int max) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - fromIndex - toIndex - filter - max - maximum return result.E - the eE extends Exceptionpublic static <E extends Exception> int[] filter(int[] a, Throwables.IntPredicate<E> filter) throws E extends Exception
E - a - filter - E - the eE extends Exceptionpublic static <E extends Exception> int[] filter(int[] a, Throwables.IntPredicate<E> filter, int max) throws E extends Exception
E - a - filter - max - E - the eE extends Exceptionpublic static <E extends Exception> int[] filter(int[] a, int fromIndex, int toIndex, Throwables.IntPredicate<E> filter) throws E extends Exception
E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <E extends Exception> int[] filter(int[] a, int fromIndex, int toIndex, Throwables.IntPredicate<E> filter, int max) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - fromIndex - toIndex - filter - max - maximum return result.E - the eE extends Exceptionpublic static <E extends Exception> long[] filter(long[] a, Throwables.LongPredicate<E> filter) throws E extends Exception
E - a - filter - E - the eE extends Exceptionpublic static <E extends Exception> long[] filter(long[] a, Throwables.LongPredicate<E> filter, int max) throws E extends Exception
E - a - filter - max - E - the eE extends Exceptionpublic static <E extends Exception> long[] filter(long[] a, int fromIndex, int toIndex, Throwables.LongPredicate<E> filter) throws E extends Exception
E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <E extends Exception> long[] filter(long[] a, int fromIndex, int toIndex, Throwables.LongPredicate<E> filter, int max) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - fromIndex - toIndex - filter - max - maximum return result.E - the eE extends Exceptionpublic static <E extends Exception> float[] filter(float[] a, Throwables.FloatPredicate<E> filter) throws E extends Exception
E - a - filter - E - the eE extends Exceptionpublic static <E extends Exception> float[] filter(float[] a, Throwables.FloatPredicate<E> filter, int max) throws E extends Exception
E - a - filter - max - E - the eE extends Exceptionpublic static <E extends Exception> float[] filter(float[] a, int fromIndex, int toIndex, Throwables.FloatPredicate<E> filter) throws E extends Exception
E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <E extends Exception> float[] filter(float[] a, int fromIndex, int toIndex, Throwables.FloatPredicate<E> filter, int max) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - fromIndex - toIndex - filter - max - maximum return result.E - the eE extends Exceptionpublic static <E extends Exception> double[] filter(double[] a, Throwables.DoublePredicate<E> filter) throws E extends Exception
E - a - filter - E - the eE extends Exceptionpublic static <E extends Exception> double[] filter(double[] a, Throwables.DoublePredicate<E> filter, int max) throws E extends Exception
E - a - filter - max - E - the eE extends Exceptionpublic static <E extends Exception> double[] filter(double[] a, int fromIndex, int toIndex, Throwables.DoublePredicate<E> filter) throws E extends Exception
E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <E extends Exception> double[] filter(double[] a, int fromIndex, int toIndex, Throwables.DoublePredicate<E> filter, int max) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - fromIndex - toIndex - filter - max - maximum return result.E - the eE extends Exceptionpublic static <T,E extends Exception> List<T> filter(T[] a, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - E - a - filter - E - the eE extends Exceptionpublic static <T,E extends Exception> List<T> filter(T[] a, Throwables.Predicate<? super T,E> filter, int max) throws E extends Exception
T - E - a - filter - max - E - the eE extends Exceptionpublic static <T,E extends Exception> List<T> filter(T[] a, int fromIndex, int toIndex, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <T,E extends Exception> List<T> filter(T[] a, int fromIndex, int toIndex, Throwables.Predicate<? super T,E> filter, int max) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - a - fromIndex - toIndex - filter - max - E - the eE extends Exceptionpublic static <T,E extends Exception> List<T> filter(Collection<? extends T> c, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - E - c - filter - E - the eE extends Exceptionpublic static <T,E extends Exception> List<T> filter(Collection<? extends T> c, Throwables.Predicate<? super T,E> filter, int max) throws E extends Exception
T - E - c - filter - max - E - the eE extends Exceptionpublic static <T,E extends Exception> List<T> filter(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - E - c - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <T,E extends Exception> List<T> filter(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Predicate<? super T,E> filter, int max) throws E extends Exception
T - E - c - fromIndex - toIndex - filter - max - E - the eE extends Exceptionpublic static <T,R extends Collection<T>,E extends Exception> R filter(T[] a, Throwables.Predicate<? super T,E> filter, IntFunction<R> supplier) throws E extends Exception
T - R - E - a - filter - supplier - E - the eE extends Exceptionpublic static <T,R extends Collection<T>,E extends Exception> R filter(T[] a, Throwables.Predicate<? super T,E> filter, int max, IntFunction<R> supplier) throws E extends Exception
T - R - E - a - filter - max - supplier - E - the eE extends Exceptionpublic static <T,R extends Collection<T>,E extends Exception> R filter(T[] a, int fromIndex, int toIndex, Throwables.Predicate<? super T,E> filter, IntFunction<R> supplier) throws E extends Exception
T - R - E - a - fromIndex - toIndex - filter - supplier - E - the eE extends Exceptionpublic static <T,R extends Collection<T>,E extends Exception> R filter(T[] a, int fromIndex, int toIndex, Throwables.Predicate<? super T,E> filter, int max, IntFunction<R> supplier) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - R - E - a - fromIndex - toIndex - filter - max - supplier - E - the eE extends Exceptionpublic static <T,R extends Collection<T>,E extends Exception> R filter(Collection<? extends T> c, Throwables.Predicate<? super T,E> filter, IntFunction<R> supplier) throws E extends Exception
T - R - E - c - filter - supplier - E - the eE extends Exceptionpublic static <T,R extends Collection<T>,E extends Exception> R filter(Collection<? extends T> c, Throwables.Predicate<? super T,E> filter, int max, IntFunction<R> supplier) throws E extends Exception
T - R - E - c - filter - max - supplier - E - the eE extends Exceptionpublic static <T,R extends Collection<T>,E extends Exception> R filter(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Predicate<? super T,E> filter, IntFunction<R> supplier) throws E extends Exception
T - R - E - c - fromIndex - toIndex - filter - supplier - E - the eE extends Exceptionpublic static <T,R extends Collection<T>,E extends Exception> R filter(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Predicate<? super T,E> filter, int max, IntFunction<R> supplier) throws E extends Exception
T - R - E - c - fromIndex - toIndex - filter - max - supplier - E - the eE extends Exceptionpublic static <T,E extends Exception> boolean[] mapToBoolean(T[] a, Throwables.ToBooleanFunction<? super T,E> func) throws E extends Exception
T - E - a - func - E - the eE extends Exceptionpublic static <T,E extends Exception> boolean[] mapToBoolean(T[] a, int fromIndex, int toIndex, Throwables.ToBooleanFunction<? super T,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - a - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,E extends Exception> boolean[] mapToBoolean(Collection<? extends T> c, Throwables.ToBooleanFunction<? super T,E> func) throws E extends Exception
T - E - c - func - E - the eE extends Exceptionpublic static <T,E extends Exception> boolean[] mapToBoolean(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToBooleanFunction<? super T,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - c - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,E extends Exception> char[] mapToChar(T[] a, Throwables.ToCharFunction<? super T,E> func) throws E extends Exception
T - E - a - func - E - the eE extends Exceptionpublic static <T,E extends Exception> char[] mapToChar(T[] a, int fromIndex, int toIndex, Throwables.ToCharFunction<? super T,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - a - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,E extends Exception> char[] mapToChar(Collection<? extends T> c, Throwables.ToCharFunction<? super T,E> func) throws E extends Exception
T - E - c - func - E - the eE extends Exceptionpublic static <T,E extends Exception> char[] mapToChar(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToCharFunction<? super T,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - c - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,E extends Exception> byte[] mapToByte(T[] a, Throwables.ToByteFunction<? super T,E> func) throws E extends Exception
T - E - a - func - E - the eE extends Exceptionpublic static <T,E extends Exception> byte[] mapToByte(T[] a, int fromIndex, int toIndex, Throwables.ToByteFunction<? super T,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - a - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,E extends Exception> byte[] mapToByte(Collection<? extends T> c, Throwables.ToByteFunction<? super T,E> func) throws E extends Exception
T - E - c - func - E - the eE extends Exceptionpublic static <T,E extends Exception> byte[] mapToByte(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToByteFunction<? super T,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - c - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,E extends Exception> short[] mapToShort(T[] a, Throwables.ToShortFunction<? super T,E> func) throws E extends Exception
T - E - a - func - E - the eE extends Exceptionpublic static <T,E extends Exception> short[] mapToShort(T[] a, int fromIndex, int toIndex, Throwables.ToShortFunction<? super T,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - a - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,E extends Exception> short[] mapToShort(Collection<? extends T> c, Throwables.ToShortFunction<? super T,E> func) throws E extends Exception
T - E - c - func - E - the eE extends Exceptionpublic static <T,E extends Exception> short[] mapToShort(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToShortFunction<? super T,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - c - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,E extends Exception> int[] mapToInt(T[] a, Throwables.ToIntFunction<? super T,E> func) throws E extends Exception
T - E - a - func - E - the eE extends Exceptionpublic static <T,E extends Exception> int[] mapToInt(T[] a, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - a - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,E extends Exception> int[] mapToInt(Collection<? extends T> c, Throwables.ToIntFunction<? super T,E> func) throws E extends Exception
T - E - c - func - E - the eE extends Exceptionpublic static <T,E extends Exception> int[] mapToInt(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - c - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,E extends Exception> long[] mapToLong(T[] a, Throwables.ToLongFunction<? super T,E> func) throws E extends Exception
T - E - a - func - E - the eE extends Exceptionpublic static <T,E extends Exception> long[] mapToLong(T[] a, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - a - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,E extends Exception> long[] mapToLong(Collection<? extends T> c, Throwables.ToLongFunction<? super T,E> func) throws E extends Exception
T - E - c - func - E - the eE extends Exceptionpublic static <T,E extends Exception> long[] mapToLong(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - c - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,E extends Exception> float[] mapToFloat(T[] a, Throwables.ToFloatFunction<? super T,E> func) throws E extends Exception
T - E - a - func - E - the eE extends Exceptionpublic static <T,E extends Exception> float[] mapToFloat(T[] a, int fromIndex, int toIndex, Throwables.ToFloatFunction<? super T,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - a - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,E extends Exception> float[] mapToFloat(Collection<? extends T> c, Throwables.ToFloatFunction<? super T,E> func) throws E extends Exception
T - E - c - func - E - the eE extends Exceptionpublic static <T,E extends Exception> float[] mapToFloat(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToFloatFunction<? super T,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - c - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,E extends Exception> double[] mapToDouble(T[] a, Throwables.ToDoubleFunction<? super T,E> func) throws E extends Exception
T - E - a - func - E - the eE extends Exceptionpublic static <T,E extends Exception> double[] mapToDouble(T[] a, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - a - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,E extends Exception> double[] mapToDouble(Collection<? extends T> c, Throwables.ToDoubleFunction<? super T,E> func) throws E extends Exception
T - E - c - func - E - the eE extends Exceptionpublic static <T,E extends Exception> double[] mapToDouble(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - c - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,R,E extends Exception> List<R> map(T[] a, Throwables.Function<? super T,? extends R,E> func) throws E extends Exception
T - R - E - a - func - E - the eE extends Exceptionpublic static <T,R,E extends Exception> List<R> map(T[] a, int fromIndex, int toIndex, Throwables.Function<? super T,? extends R,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - R - E - a - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,R,E extends Exception> List<R> map(Collection<? extends T> c, Throwables.Function<? super T,? extends R,E> func) throws E extends Exception
T - R - E - c - func - E - the eE extends Exceptionpublic static <T,R,E extends Exception> List<R> map(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Function<? super T,? extends R,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - R - E - c - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,R,C extends Collection<R>,E extends Exception> C map(T[] a, Throwables.Function<? super T,? extends R,E> func, IntFunction<? extends C> supplier) throws E extends Exception
T - R - C - E - a - func - supplier - E - the eE extends Exceptionpublic static <T,R,C extends Collection<R>,E extends Exception> C map(T[] a, int fromIndex, int toIndex, Throwables.Function<? super T,? extends R,E> func, IntFunction<? extends C> supplier) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - R - C - E - a - fromIndex - toIndex - func - supplier - E - the eE extends Exceptionpublic static <T,R,C extends Collection<R>,E extends Exception> C map(Collection<? extends T> c, Throwables.Function<? super T,? extends R,E> func, IntFunction<? extends C> supplier) throws E extends Exception
T - R - C - E - c - func - supplier - E - the eE extends Exceptionpublic static <T,R,C extends Collection<R>,E extends Exception> C map(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Function<? super T,? extends R,E> func, IntFunction<? extends C> supplier) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - R - C - E - c - fromIndex - toIndex - func - supplier - E - the eE extends Exceptionpublic static <T,R,E extends Exception> List<R> flatMap(T[] a, Throwables.Function<? super T,? extends Collection<? extends R>,E> func) throws E extends Exception
T - R - E - a - func - E - the eE extends Exceptionpublic static <T,R,E extends Exception> List<R> flatMap(T[] a, int fromIndex, int toIndex, Throwables.Function<? super T,? extends Collection<? extends R>,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - R - E - a - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,R,E extends Exception> List<R> flatMap(Collection<? extends T> c, Throwables.Function<? super T,? extends Collection<? extends R>,E> func) throws E extends Exception
T - R - E - c - func - E - the eE extends Exceptionpublic static <T,R,E extends Exception> List<R> flatMap(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Function<? super T,? extends Collection<? extends R>,E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - R - E - c - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,R,C extends Collection<R>,E extends Exception> C flatMap(T[] a, Throwables.Function<? super T,? extends Collection<? extends R>,E> func, IntFunction<? extends C> supplier) throws E extends Exception
T - R - C - E - a - func - supplier - E - the eE extends Exceptionpublic static <T,R,C extends Collection<R>,E extends Exception> C flatMap(T[] a, int fromIndex, int toIndex, Throwables.Function<? super T,? extends Collection<? extends R>,E> func, IntFunction<? extends C> supplier) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - R - C - E - a - fromIndex - toIndex - func - supplier - E - the eE extends Exceptionpublic static <T,R,C extends Collection<R>,E extends Exception> C flatMap(Collection<? extends T> c, Throwables.Function<? super T,? extends Collection<? extends R>,E> func, IntFunction<? extends C> supplier) throws E extends Exception
T - R - C - E - c - func - supplier - E - the eE extends Exceptionpublic static <T,R,C extends Collection<R>,E extends Exception> C flatMap(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Function<? super T,? extends Collection<? extends R>,E> func, IntFunction<? extends C> supplier) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - R - C - E - c - fromIndex - toIndex - func - supplier - E - the eE extends Exceptionpublic static <T,T2,R,E extends Exception,E2 extends Exception> List<R> flatMap(T[] a, Throwables.Function<? super T,? extends Collection<? extends T2>,E> func, Throwables.Function<? super T2,? extends Collection<? extends R>,E2> func2) throws E extends Exception, E2 extends Exception
T - T2 - R - C - E - E2 - a - func - func2 - E - the eE2 - the e2E extends Exceptionpublic static <T,T2,R,C extends Collection<R>,E extends Exception,E2 extends Exception> C flatMap(T[] a, Throwables.Function<? super T,? extends Collection<? extends T2>,E> func, Throwables.Function<? super T2,? extends Collection<? extends R>,E2> func2, IntFunction<? extends C> supplier) throws E extends Exception, E2 extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - T2 - R - C - E - E2 - a - func - func2 - supplier - E - the eE2 - the e2E extends Exceptionpublic static <T,T2,R,E extends Exception,E2 extends Exception> List<R> flatMap(Collection<? extends T> c, Throwables.Function<? super T,? extends Collection<? extends T2>,E> func, Throwables.Function<? super T2,? extends Collection<? extends R>,E2> func2) throws E extends Exception, E2 extends Exception
T - T2 - R - C - E - E2 - c - func - func2 - E - the eE2 - the e2E extends Exceptionpublic static <T,T2,R,C extends Collection<R>,E extends Exception,E2 extends Exception> C flatMap(Collection<? extends T> c, Throwables.Function<? super T,? extends Collection<? extends T2>,E> func, Throwables.Function<? super T2,? extends Collection<? extends R>,E2> func2, IntFunction<? extends C> supplier) throws E extends Exception, E2 extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - T2 - R - C - E - E2 - c - func - func2 - supplier - E - the eE2 - the e2E extends Exceptionpublic static <T,R,E extends Exception> List<R> flattMap(T[] a, Throwables.Function<? super T,? extends R[],E> func) throws E extends Exception
T - R - E - a - func - E - the eE extends Exceptionpublic static <T,R,E extends Exception> List<R> flattMap(T[] a, int fromIndex, int toIndex, Throwables.Function<? super T,? extends R[],E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - R - E - a - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,R,E extends Exception> List<R> flattMap(Collection<? extends T> c, Throwables.Function<? super T,? extends R[],E> func) throws E extends Exception
T - R - E - c - func - E - the eE extends Exceptionpublic static <T,R,E extends Exception> List<R> flattMap(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Function<? super T,? extends R[],E> func) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - R - E - c - fromIndex - toIndex - func - E - the eE extends Exceptionpublic static <T,R,C extends Collection<R>,E extends Exception> C flattMap(T[] a, Throwables.Function<? super T,? extends R[],E> func, IntFunction<? extends C> supplier) throws E extends Exception
T - R - C - E - a - func - supplier - E - the eE extends Exceptionpublic static <T,R,C extends Collection<R>,E extends Exception> C flattMap(T[] a, int fromIndex, int toIndex, Throwables.Function<? super T,? extends R[],E> func, IntFunction<? extends C> supplier) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - R - C - E - a - fromIndex - toIndex - func - supplier - E - the eE extends Exceptionpublic static <T,R,C extends Collection<R>,E extends Exception> C flattMap(Collection<? extends T> c, Throwables.Function<? super T,? extends R[],E> func, IntFunction<? extends C> supplier) throws E extends Exception
T - R - C - E - c - func - supplier - E - the eE extends Exceptionpublic static <T,R,C extends Collection<R>,E extends Exception> C flattMap(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Function<? super T,? extends R[],E> func, IntFunction<? extends C> supplier) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - R - C - E - c - fromIndex - toIndex - func - supplier - E - the eE extends Exceptionpublic static <T,E extends Exception> List<T> takeWhile(Collection<? extends T> c, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typec - the cfilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> List<T> takeWhile(T[] a, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typea - the afilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> List<T> takeWhileInclusive(Collection<? extends T> c, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typec - the cfilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> List<T> takeWhileInclusive(T[] a, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typea - the afilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> List<T> dropWhile(Collection<? extends T> c, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typec - the cfilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> List<T> dropWhile(T[] a, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typea - the afilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> List<T> skipUntil(Collection<? extends T> c, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typec - the cfilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> List<T> skipUntil(T[] a, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typea - the afilter - the filterE - the eE extends Exceptionpublic static boolean[] distinct(boolean[] a)
java.util.stream.Stream is preferred for multiple phases operation.a - public static boolean[] distinct(boolean[] a,
int fromIndex,
int toIndex)
java.util.stream.Stream is preferred for multiple phases operation.a - fromIndex - toIndex - public static char[] distinct(char[] a)
java.util.stream.Stream is preferred for multiple phases operation.a - public static char[] distinct(char[] a,
int fromIndex,
int toIndex)
java.util.stream.Stream is preferred for multiple phases operation.a - fromIndex - toIndex - public static byte[] distinct(byte[] a)
java.util.stream.Stream is preferred for multiple phases operation.a - public static byte[] distinct(byte[] a,
int fromIndex,
int toIndex)
java.util.stream.Stream is preferred for multiple phases operation.a - fromIndex - toIndex - public static short[] distinct(short[] a)
java.util.stream.Stream is preferred for multiple phases operation.a - public static short[] distinct(short[] a,
int fromIndex,
int toIndex)
java.util.stream.Stream is preferred for multiple phases operation.a - fromIndex - toIndex - public static int[] distinct(int[] a)
java.util.stream.Stream is preferred for multiple phases operation.a - public static int[] distinct(int[] a,
int fromIndex,
int toIndex)
java.util.stream.Stream is preferred for multiple phases operation.a - fromIndex - toIndex - public static long[] distinct(long[] a)
java.util.stream.Stream is preferred for multiple phases operation.a - public static long[] distinct(long[] a,
int fromIndex,
int toIndex)
java.util.stream.Stream is preferred for multiple phases operation.a - fromIndex - toIndex - public static float[] distinct(float[] a)
java.util.stream.Stream is preferred for multiple phases operation.a - public static float[] distinct(float[] a,
int fromIndex,
int toIndex)
java.util.stream.Stream is preferred for multiple phases operation.a - fromIndex - toIndex - public static double[] distinct(double[] a)
java.util.stream.Stream is preferred for multiple phases operation.a - public static double[] distinct(double[] a,
int fromIndex,
int toIndex)
java.util.stream.Stream is preferred for multiple phases operation.a - fromIndex - toIndex - public static <T> List<T> distinct(T[] a)
java.util.stream.Stream is preferred for multiple phases operation.T - a - public static <T> List<T> distinct(T[] a, int fromIndex, int toIndex)
java.util.stream.Stream is preferred for multiple phases operation.T - a - fromIndex - toIndex - public static <T> List<T> distinct(Collection<? extends T> c)
java.util.stream.Stream is preferred for multiple phases operation.T - c - public static <T> List<T> distinct(Collection<? extends T> c, int fromIndex, int toIndex)
java.util.stream.Stream is preferred for multiple phases operation.T - c - fromIndex - toIndex - public static <T,E extends Exception> List<T> distinctBy(T[] a, Throwables.Function<? super T,?,E> keyMapper) throws E extends Exception
keyMapper.
Mostly it's designed for one-step operation to complete the operation in one step.
java.util.stream.Stream is preferred for multiple phases operation.T - E - a - keyMapper - don't change value of the input parameter.E - the eE extends Exceptionpublic static <T,E extends Exception> List<T> distinctBy(T[] a, int fromIndex, int toIndex, Throwables.Function<? super T,?,E> keyMapper) throws E extends Exception
keyMapper.
Mostly it's designed for one-step operation to complete the operation in one step.
java.util.stream.Stream is preferred for multiple phases operation.T - E - a - fromIndex - toIndex - keyMapper - don't change value of the input parameter.E - the eE extends Exceptionpublic static <T,C extends Collection<T>,E extends Exception> C distinctBy(T[] a, Throwables.Function<? super T,?,E> keyMapper, Supplier<C> supplier) throws E extends Exception
keyMapper.
Mostly it's designed for one-step operation to complete the operation in one step.
java.util.stream.Stream is preferred for multiple phases operation.T - E - a - keyMapper - don't change value of the input parameter.supplier - E - the eE extends Exceptionpublic static <T,E extends Exception> List<T> distinctBy(Collection<? extends T> c, Throwables.Function<? super T,?,E> keyMapper) throws E extends Exception
keyMapper.
Mostly it's designed for one-step operation to complete the operation in one step.
java.util.stream.Stream is preferred for multiple phases operation.T - E - c - keyMapper - don't change value of the input parameter.E - the eE extends Exceptionpublic static <T,E extends Exception> List<T> distinctBy(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Function<? super T,?,E> keyMapper) throws E extends Exception
keyMapper.
Mostly it's designed for one-step operation to complete the operation in one step.
java.util.stream.Stream is preferred for multiple phases operation.T - E - c - fromIndex - toIndex - keyMapper - don't change value of the input parameter.E - the eE extends Exceptionpublic static <T,C extends Collection<T>,E extends Exception> C distinctBy(Collection<? extends T> c, Throwables.Function<? super T,?,E> keyMapper, Supplier<C> supplier) throws E extends Exception
keyMapper.
Mostly it's designed for one-step operation to complete the operation in one step.
java.util.stream.Stream is preferred for multiple phases operation.T - E - c - keyMapper - don't change value of the input parameter.supplier - E - the eE extends Exceptionpublic static <T,E extends Exception> boolean allMatch(T[] a, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typea - the afilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> boolean allMatch(Collection<? extends T> c, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typec - the cfilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> boolean allMatch(Iterator<? extends T> iter, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typeiter - the iterfilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> boolean anyMatch(T[] a, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typea - the afilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> boolean anyMatch(Collection<? extends T> c, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typec - the cfilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> boolean anyMatch(Iterator<? extends T> iter, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typeiter - the iterfilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> boolean noneMatch(T[] a, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typea - the afilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> boolean noneMatch(Collection<? extends T> c, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typec - the cfilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> boolean noneMatch(Iterator<? extends T> iter, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typeiter - the iterfilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> boolean nMatch(T[] a, int atLeast, int atMost, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typea - the aatLeast - the at leastatMost - the at mostfilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> boolean nMatch(Collection<? extends T> c, int atLeast, int atMost, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typec - the catLeast - the at leastatMost - the at mostfilter - the filterE - the eE extends Exceptionpublic static <T,E extends Exception> boolean nMatch(Iterator<? extends T> iter, int atLeast, int atMost, Throwables.Predicate<? super T,E> filter) throws E extends Exception
T - the generic typeE - the element typec - the catLeast - the at leastatMost - the at mostfilter - the filterE - the eE extends Exceptionpublic static <E extends Exception> int count(boolean[] a, Throwables.BooleanPredicate<E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - filter - E - the eE extends Exceptionpublic static <E extends Exception> int count(boolean[] a, int fromIndex, int toIndex, Throwables.BooleanPredicate<E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <E extends Exception> int count(char[] a, Throwables.CharPredicate<E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - filter - E - the eE extends Exceptionpublic static <E extends Exception> int count(char[] a, int fromIndex, int toIndex, Throwables.CharPredicate<E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <E extends Exception> int count(byte[] a, Throwables.BytePredicate<E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - filter - E - the eE extends Exceptionpublic static <E extends Exception> int count(byte[] a, int fromIndex, int toIndex, Throwables.BytePredicate<E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <E extends Exception> int count(short[] a, Throwables.ShortPredicate<E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - filter - E - the eE extends Exceptionpublic static <E extends Exception> int count(short[] a, int fromIndex, int toIndex, Throwables.ShortPredicate<E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <E extends Exception> int count(int[] a, Throwables.IntPredicate<E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - filter - E - the eE extends Exceptionpublic static <E extends Exception> int count(int[] a, int fromIndex, int toIndex, Throwables.IntPredicate<E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <E extends Exception> int count(long[] a, Throwables.LongPredicate<E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - filter - E - the eE extends Exceptionpublic static <E extends Exception> int count(long[] a, int fromIndex, int toIndex, Throwables.LongPredicate<E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <E extends Exception> int count(float[] a, Throwables.FloatPredicate<E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - filter - E - the eE extends Exceptionpublic static <E extends Exception> int count(float[] a, int fromIndex, int toIndex, Throwables.FloatPredicate<E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <E extends Exception> int count(double[] a, Throwables.DoublePredicate<E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - filter - E - the eE extends Exceptionpublic static <E extends Exception> int count(double[] a, int fromIndex, int toIndex, Throwables.DoublePredicate<E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <T,E extends Exception> int count(T[] a, Throwables.Predicate<? super T,E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - a - filter - E - the eE extends Exceptionpublic static <T,E extends Exception> int count(T[] a, int fromIndex, int toIndex, Throwables.Predicate<? super T,E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - a - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static <T,E extends Exception> int count(Collection<? extends T> c, Throwables.Predicate<? super T,E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - c - filter - E - the eE extends Exceptionpublic static <T,E extends Exception> int count(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Predicate<? super T,E> filter) throws E extends Exception
java.util.stream.Stream is preferred for multiple phases operation.T - E - c - fromIndex - toIndex - filter - E - the eE extends Exceptionpublic static int count(Iterator<?> iter) throws ArithmeticException
iter - ArithmeticException - if the total count overflows an int.public static <T,E extends Exception> int count(Iterator<? extends T> iter, Throwables.Predicate<? super T,E> filter) throws ArithmeticException, E extends Exception
T - iter - filter - ArithmeticException - if the total matched count overflows an int.EE extends Exceptionpublic static String toJSON(Object obj, boolean prettyFormat)
obj - prettyFormat - public static String toJSON(Object obj, JSONSerializationConfig config)
obj - config - public static void toJSON(File file, Object obj, JSONSerializationConfig config)
file - obj - config - public static void toJSON(OutputStream os, Object obj)
os - obj - public static void toJSON(OutputStream os, Object obj, JSONSerializationConfig config)
os - obj - config - public static void toJSON(Writer writer, Object obj, JSONSerializationConfig config)
writer - obj - config - public static <T> T fromJSON(Class<? extends T> targetClass, String json)
T - targetClass - json - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(Class<? extends T> targetClass, String json, JSONDeserializationConfig config)
T - targetClass - json - config - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(Class<? extends T> targetClass, File json)
T - targetClass - json - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(Class<? extends T> targetClass, File json, JSONDeserializationConfig config)
T - targetClass - json - config - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(Class<? extends T> targetClass, InputStream json)
T - targetClass - json - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(Class<? extends T> targetClass, InputStream json, JSONDeserializationConfig config)
T - targetClass - json - config - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(Class<? extends T> targetClass, Reader json)
T - targetClass - json - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(Class<? extends T> targetClass, Reader json, JSONDeserializationConfig config)
T - targetClass - json - config - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(Class<? extends T> targetClass, String json, int fromIndex, int toIndex)
T - targetClass - json - fromIndex - toIndex - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(Class<? extends T> targetClass, String json, int fromIndex, int toIndex, JSONDeserializationConfig config)
T - targetClass - json - fromIndex - toIndex - config - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
String json)
T - targetType - can be the Type of Entity/Array/Collection/Map.json - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
String json,
JSONDeserializationConfig config)
T - targetType - can be the Type of Entity/Array/Collection/Map.json - config - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
File json)
T - targetType - can be the Type of Entity/Array/Collection/Map.json - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
File json,
JSONDeserializationConfig config)
T - targetType - can be the Type of Entity/Array/Collection/Map.json - config - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
InputStream json)
T - targetType - can be the Type of Entity/Array/Collection/Map.json - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
InputStream json,
JSONDeserializationConfig config)
T - targetType - can be the Type of Entity/Array/Collection/Map.json - config - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
Reader json)
T - targetType - can be the Type of Entity/Array/Collection/Map.json - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
Reader json,
JSONDeserializationConfig config)
T - targetType - can be the Type of Entity/Array/Collection/Map.json - config - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
String json,
int fromIndex,
int toIndex)
T - targetType - can be the Type of Entity/Array/Collection/Map.json - fromIndex - toIndex - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromJSON(com.landawn.abacus.type.Type<? extends T> targetType,
String json,
int fromIndex,
int toIndex,
JSONDeserializationConfig config)
T - targetType - can be the Type of Entity/Array/Collection/Map.json - fromIndex - toIndex - config - TypeReference,
TypeReference.TypeTokenpublic static <T> ExceptionalStream<T,IOException> streamJSON(Class<T> elementClass, String source)
T - elementClass - Only Entity/Map/Collection/Array/DataSet element types are supported at present.source - public static <T> ExceptionalStream<T,IOException> streamJSON(Class<T> elementClass, String source, JSONDeserializationConfig config)
T - elementClass - Only Entity/Map/Collection/Array/DataSet element types are supported at present.source - config - public static <T> ExceptionalStream<T,IOException> streamJSON(Class<T> elementClass, File source)
T - elementClass - Only Entity/Map/Collection/Array/DataSet element types are supported at present.source - public static <T> ExceptionalStream<T,IOException> streamJSON(Class<T> elementClass, File source, JSONDeserializationConfig config)
T - elementClass - Only Entity/Map/Collection/Array/DataSet element types are supported at present.source - config - public static <T> ExceptionalStream<T,IOException> streamJSON(Class<T> elementClass, InputStream source)
T - elementClass - Only Entity/Map/Collection/Array/DataSet element types are supported at present.source - public static <T> ExceptionalStream<T,IOException> streamJSON(Class<T> elementClass, InputStream source, JSONDeserializationConfig config)
T - elementClass - Only Entity/Map/Collection/Array/DataSet element types are supported at present.source - config - public static <T> ExceptionalStream<T,IOException> streamJSON(Class<T> elementClass, Reader source)
T - elementClass - Only Entity/Map/Collection/Array/DataSet element types are supported at present.source - public static <T> ExceptionalStream<T,IOException> streamJSON(Class<T> elementClass, Reader source, JSONDeserializationConfig config)
T - elementClass - Only Entity/Map/Collection/Array/DataSet element types are supported at present.source - config - public static String formatJSON(String json)
json - TypeReference,
TypeReference.TypeTokenpublic static String formatJSON(Class<?> type, String json)
type - json - TypeReference,
TypeReference.TypeTokenpublic static String formatJSON(com.landawn.abacus.type.Type<?> type, String json)
type - json - TypeReference,
TypeReference.TypeTokenpublic static String toXML(Object obj, boolean prettyFormat)
obj - prettyFormat - public static String toXML(Object obj, XMLSerializationConfig config)
obj - config - public static void toXML(File file, Object obj, XMLSerializationConfig config)
file - obj - config - public static void toXML(OutputStream os, Object obj)
os - obj - public static void toXML(OutputStream os, Object obj, XMLSerializationConfig config)
os - obj - config - public static void toXML(Writer writer, Object obj, XMLSerializationConfig config)
writer - obj - config - public static String formatXML(String xml)
xml - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromXML(Class<? extends T> targetClass, String xml)
T - targetClass - xml - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromXML(Class<? extends T> targetClass, String xml, XMLDeserializationConfig config)
T - targetClass - xml - config - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromXML(Class<? extends T> targetClass, File xml)
T - targetClass - xml - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromXML(Class<? extends T> targetClass, File xml, XMLDeserializationConfig config)
T - targetClass - xml - config - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromXML(Class<? extends T> targetClass, InputStream xml)
T - targetClass - xml - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromXML(Class<? extends T> targetClass, InputStream xml, XMLDeserializationConfig config)
T - targetClass - xml - config - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromXML(Class<? extends T> targetClass, Reader xml)
T - targetClass - xml - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromXML(Class<? extends T> targetClass, Reader xml, XMLDeserializationConfig config)
T - targetClass - xml - config - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromXML(com.landawn.abacus.type.Type<? extends T> targetType,
String xml)
T - targetType - can be the Type of Entity/Array/Collection/Map.xml - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromXML(com.landawn.abacus.type.Type<? extends T> targetType,
String xml,
XMLDeserializationConfig config)
T - targetType - can be the Type of Entity/Array/Collection/Map.xml - config - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromXML(com.landawn.abacus.type.Type<? extends T> targetType,
File xml)
T - targetType - can be the Type of Entity/Array/Collection/Map.xml - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromXML(com.landawn.abacus.type.Type<? extends T> targetType,
File xml,
XMLDeserializationConfig config)
T - targetType - can be the Type of Entity/Array/Collection/Map.xml - config - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromXML(com.landawn.abacus.type.Type<? extends T> targetType,
InputStream xml)
T - targetType - can be the Type of Entity/Array/Collection/Map.xml - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromXML(com.landawn.abacus.type.Type<? extends T> targetType,
InputStream xml,
XMLDeserializationConfig config)
T - targetType - can be the Type of Entity/Array/Collection/Map.xml - config - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromXML(com.landawn.abacus.type.Type<? extends T> targetType,
Reader xml)
T - targetType - can be the Type of Entity/Array/Collection/Map.xml - TypeReference,
TypeReference.TypeTokenpublic static <T> T fromXML(com.landawn.abacus.type.Type<? extends T> targetType,
Reader xml,
XMLDeserializationConfig config)
T - targetType - can be the Type of Entity/Array/Collection/Map.xml - config - TypeReference,
TypeReference.TypeTokenpublic static String formatXML(Class<?> type, String xml)
type - xml - TypeReference,
TypeReference.TypeTokenpublic static String formatXML(com.landawn.abacus.type.Type<?> type, String xml)
type - xml - TypeReference,
TypeReference.TypeTokenpublic static String xml2JSON(String xml)
xml - TypeReference,
TypeReference.TypeTokenpublic static String xml2JSON(Class<?> cls, String xml)
cls - xml - TypeReference,
TypeReference.TypeTokenpublic static String json2XML(String json)
json - TypeReference,
TypeReference.TypeTokenpublic static String json2XML(Class<?> cls, String json)
cls - json - TypeReference,
TypeReference.TypeTokenpublic static void runUninterruptibly(Throwables.Runnable<InterruptedException> cmd)
cmd - public static void runUninterruptibly(long timeoutInMillis,
Throwables.LongConsumer<InterruptedException> cmd)
timeoutInMillis - cmd - public static void runUninterruptibly(long timeout,
TimeUnit unit,
Throwables.BiConsumer<Long,TimeUnit,InterruptedException> cmd)
throws IllegalArgumentException
timeout - unit - cmd - IllegalArgumentException - if the specified unit/cmd is null.public static <T> T callUninterruptibly(Throwables.Callable<T,InterruptedException> cmd)
T - cmd - public static <T> T callUninterruptibly(long timeoutInMillis,
Throwables.LongFunction<T,InterruptedException> cmd)
T - timeoutInMillis - cmd - public static <T> T callUninterruptibly(long timeout,
TimeUnit unit,
Throwables.BiFunction<Long,TimeUnit,T,InterruptedException> cmd)
throws IllegalArgumentException
T - timeout - unit - cmd - IllegalArgumentException - if the specified unit/cmd is null.public static void sleep(long timeoutInMillis)
timeoutInMillis - public static void sleep(long timeout,
TimeUnit unit)
throws IllegalArgumentException
timeout - unit - IllegalArgumentException - if the specified unit is null.public static void sleepUninterruptibly(long timeoutInMillis)
timeoutInMillis - public static void sleepUninterruptibly(long timeout,
TimeUnit unit)
throws IllegalArgumentException
timeout - unit - IllegalArgumentException - if the specified unit is null.public static RuntimeException toRuntimeException(Throwable e)
e - ExceptionUtil.toRuntimeException(Throwable)public static boolean hasCause(Throwable e, Class<? extends Throwable> type)
e - type - ExceptionUtil.hasCause(Throwable, Class)public static Throwable firstCause(Throwable e)
Throwable e if there is no cause found in it (e.getCause() == null).e - ExceptionUtil.firstCause(Throwable)public static <T> T println(T obj)
T - obj - @SafeVarargs public static <T> T[] fprintln(String format, T... args)
T - format - args - public static int toIntExact(long value)
long argument; throwing an exception if the value overflows an int.value - the long valueArithmeticException - if the argument overflows an int@Beta public static <T> u.Nullable<T> castIfAssignable(Object val, Class<T> targetType)
Nullable if val is null while targetType is primitive or can not be assigned to targetType.
Please be aware that null can be assigned to any Object type except primitive types: boolean/char/byte/short/int/long/double.T - val - targetType - @Beta public static <R> u.Nullable<R> tryOrEmpty(Callable<R> cmd)
Nullable with the value returned by action or an empty Nullable if exception happens.R - cmd - @Beta public static <T,R,E extends Exception> u.Nullable<R> tryOrEmpty(T init, Throwables.Function<? super T,R,E> func)
Nullable with the value returned by func.apply(init) or an empty Nullable if exception happens.T - R - E - init - func - @Beta public static <R,E extends Exception> u.Nullable<R> ifOrEmpty(boolean b, Throwables.Supplier<R,E> supplier) throws E extends Exception
Nullable with value got from the specified supplier if b is true,
otherwise returns an empty Nullable if b is false.R - E - b - supplier - E - the eE extends Exception@Beta public static <T,R,E extends Exception> u.Nullable<R> ifOrEmpty(boolean b, T init, Throwables.Function<? super T,R,E> func) throws E extends Exception
Nullable with value returned by func.apply(init) if b is true,
otherwise returns an empty Nullable if b is false.T - R - E - b - init - func - E - the eE extends Exception@Beta public static <E1 extends Exception,E2 extends Exception> void ifOrElse(boolean b, Throwables.Runnable<E1> actionForTrue, Throwables.Runnable<E2> actionForFalse) throws E1 extends Exception, E2 extends Exception
E1 - E2 - b - actionForTrue - do nothing if it's null even b is true.actionForFalse - do nothing if it's null even b is false.E1 - the e1E2 - the e2E1 extends Exception@Beta public static <T,E1 extends Exception,E2 extends Exception> void ifOrElse(boolean b, T init, Throwables.Consumer<? super T,E1> actionForTrue, Throwables.Consumer<? super T,E2> actionForFalse) throws E1 extends Exception, E2 extends Exception
T - E1 - E2 - b - init - actionForTrue - do nothing if it's null even b is true.actionForFalse - do nothing if it's null even b is false.E1 - the e1E2 - the e2E1 extends Exception@Beta public static <T> LazyInitializer<T> lazyInit(Supplier<T> supplier)
@Beta public static <T,E extends Exception> Throwables.LazyInitializer<T,E> lazyInitialize(Throwables.Supplier<T,E> supplier)
@Beta public static <T> ObjIterator<T> iterate(T[] a)
T - a - ObjIterator.of(Object...)@Beta public static <T> ObjIterator<T> iterate(T[] a, int fromIndex, int toIndex)
T - a - fromIndex - toIndex - ObjIterator.of(Object[], int, int)@Beta public static <T> Iterator<T> iterate(Iterable<? extends T> iterable)
T - a - public static boolean disjoint(Collection<?> c1, Collection<?> c2)
true if the two specified arrays have no elements in common.c1 - c2 - true if the two specified arrays have no elements in common.Collections.disjoint(Collection, Collection)public static <T,E extends Exception> List<T> merge(T[] a, T[] b, Throwables.BiFunction<? super T,? super T,MergeResult,E> nextSelector) throws E extends Exception
T - E - a - b - nextSelector - E - the eE extends Exceptionpublic static <T,E extends Exception> List<T> merge(Collection<? extends T> a, Collection<? extends T> b, Throwables.BiFunction<? super T,? super T,MergeResult,E> nextSelector) throws E extends Exception
T - E - a - b - nextSelector - E - the eE extends Exceptionpublic static <T> List<T> merge(Collection<? extends Collection<? extends T>> c, BiFunction<? super T,? super T,MergeResult> nextSelector)
public static <T,C extends Collection<T>> C merge(Collection<? extends Collection<? extends T>> c, BiFunction<? super T,? super T,MergeResult> nextSelector, IntFunction<? extends C> supplier)
public static <A,B,R,E extends Exception> List<R> zip(A[] a, B[] b, Throwables.BiFunction<? super A,? super B,R,E> zipFunction) throws E extends Exception
A - B - R - E - a - b - zipFunction - E - the eE extends Exceptionpublic static <A,B,R,E extends Exception> List<R> zip(Collection<A> a, Collection<B> b, Throwables.BiFunction<? super A,? super B,R,E> zipFunction) throws E extends Exception
A - B - R - E - a - b - zipFunction - E - the eE extends Exceptionpublic static <A,B,C,R,E extends Exception> List<R> zip(A[] a, B[] b, C[] c, Throwables.TriFunction<? super A,? super B,? super C,R,E> zipFunction) throws E extends Exception
A - B - C - R - E - a - b - c - zipFunction - E - the eE extends Exceptionpublic static <A,B,C,R,E extends Exception> List<R> zip(Collection<A> a, Collection<B> b, Collection<C> c, Throwables.TriFunction<? super A,? super B,? super C,R,E> zipFunction) throws E extends Exception
A - B - C - R - E - a - b - c - zipFunction - E - the eE extends Exceptionpublic static <A,B,R,E extends Exception> List<R> zip(A[] a, B[] b, A valueForNoneA, B valueForNoneB, Throwables.BiFunction<? super A,? super B,R,E> zipFunction) throws E extends Exception
A - B - R - E - a - b - valueForNoneA - valueForNoneB - zipFunction - E - the eE extends Exceptionpublic static <A,B,R,E extends Exception> List<R> zip(Collection<A> a, Collection<B> b, A valueForNoneA, B valueForNoneB, Throwables.BiFunction<? super A,? super B,R,E> zipFunction) throws E extends Exception
A - B - R - E - a - b - valueForNoneA - valueForNoneB - zipFunction - E - the eE extends Exceptionpublic static <A,B,C,R,E extends Exception> List<R> zip(A[] a, B[] b, C[] c, A valueForNoneA, B valueForNoneB, C valueForNoneC, Throwables.TriFunction<? super A,? super B,? super C,R,E> zipFunction) throws E extends Exception
A - B - C - R - E - a - b - c - valueForNoneA - valueForNoneB - valueForNoneC - zipFunction - E - the eE extends Exceptionpublic static <A,B,C,R,E extends Exception> List<R> zip(Collection<A> a, Collection<B> b, Collection<C> c, A valueForNoneA, B valueForNoneB, C valueForNoneC, Throwables.TriFunction<? super A,? super B,? super C,R,E> zipFunction) throws E extends Exception
A - B - C - R - E - a - b - c - valueForNoneA - valueForNoneB - valueForNoneC - zipFunction - E - the eE extends Exceptionpublic static <A,B,R,E extends Exception> R[] zip(Class<R> targetElementType, A[] a, B[] b, Throwables.BiFunction<? super A,? super B,R,E> zipFunction) throws E extends Exception
A - B - R - E - targetElementType - a - b - zipFunction - E - the eE extends Exceptionpublic static <A,B,R,E extends Exception> R[] zip(Class<R> targetElementType, A[] a, B[] b, A valueForNoneA, B valueForNoneB, Throwables.BiFunction<? super A,? super B,R,E> zipFunction) throws E extends Exception
A - B - R - E - targetElementType - a - b - valueForNoneA - valueForNoneB - zipFunction - E - the eE extends Exceptionpublic static <A,B,C,R,E extends Exception> R[] zip(Class<R> targetElementType, A[] a, B[] b, C[] c, Throwables.TriFunction<? super A,? super B,? super C,R,E> zipFunction) throws E extends Exception
A - B - C - R - E - targetElementType - a - b - c - zipFunction - E - the eE extends Exceptionpublic static <A,B,C,R,E extends Exception> R[] zip(Class<R> targetElementType, A[] a, B[] b, C[] c, A valueForNoneA, B valueForNoneB, C valueForNoneC, Throwables.TriFunction<? super A,? super B,? super C,R,E> zipFunction) throws E extends Exception
A - B - C - R - E - targetElementType - a - b - c - valueForNoneA - valueForNoneB - valueForNoneC - zipFunction - E - the eE extends Exceptionpublic static <T,L,R,E extends Exception> Pair<List<L>,List<R>> unzip(Collection<? extends T> c, Throwables.BiConsumer<? super T,Pair<L,R>,E> unzip) throws E extends Exception
T - L - R - E - c - unzip - the second parameter is an output parameter.E - the eE extends Exceptionpublic static <T,L,R,LC extends Collection<L>,RC extends Collection<R>,E extends Exception> Pair<LC,RC> unzip(Collection<? extends T> c, Throwables.BiConsumer<? super T,Pair<L,R>,E> unzip, IntFunction<? extends Collection<?>> supplier) throws E extends Exception
T - L - R - LC - RC - E - c - unzip - the second parameter is an output parameter.supplier - E - the eE extends Exceptionpublic static <T,L,M,R,E extends Exception> Triple<List<L>,List<M>,List<R>> unzipp(Collection<? extends T> c, Throwables.BiConsumer<? super T,Triple<L,M,R>,E> unzip) throws E extends Exception
T - L - M - R - E - c - unzip - the second parameter is an output parameter.E - the eE extends Exceptionpublic static <T,L,M,R,LC extends Collection<L>,MC extends Collection<M>,RC extends Collection<R>,E extends Exception> Triple<LC,MC,RC> unzipp(Collection<? extends T> c, Throwables.BiConsumer<? super T,Triple<L,M,R>,E> unzip, IntFunction<? extends Collection<?>> supplier) throws E extends Exception
T - L - M - R - LC - MC - RC - E - c - unzip - the second parameter is an output parameter.supplier - E - the eE extends Exceptionpublic static boolean isPrimitiveType(Class<?> cls)
cls - public static boolean isWrapperType(Class<?> cls)
cls - public static boolean isPrimitiveArrayType(Class<?> cls)
cls - public static Class<?> wrap(Class<?> cls)
type if it is a primitive type; otherwise
returns type itself. Idempotent.
wrap(int.class) == Integer.class
wrap(Integer.class) == Integer.class
wrap(String.class) == String.class
cls - public static Class<?> unwrap(Class<?> cls)
type if it is a wrapper type; otherwise
returns type itself. Idempotent.
unwrap(Integer.class) == int.class
unwrap(int.class) == int.class
unwrap(String.class) == String.class
cls - @Beta public static void invert(boolean[] a)
fromIndex to toIndex: set it to true if it's false, or set it to false if it's true.a - @Beta public static void invert(boolean[] a, int fromIndex, int toIndex)
fromIndex to toIndex: set it to true if it's false, or set it to false if it's true.a - fromIndex - toIndex - @Beta public static <T,E extends Exception> void applyToEach(T[] a, Throwables.Function<? super T,? extends T,E> converter) throws E extends Exception
a with specified function converter.T - E - a - converter - EE extends Exception@Beta public static <T,E extends Exception> void applyToEach(List<T> c, Throwables.Function<? super T,? extends T,E> converter) throws E extends Exception
E extends Exceptionpublic static <T,E extends Exception> T[] copyThenApply(T[] a, Throwables.Function<? super T,? extends T,E> converter) throws E extends Exception
a first, then call converter on the copy.E - a - converter - a.EE extends Exceptionpublic static <T> com.landawn.abacus.type.Type<T> typeOf(String typeName) throws IllegalArgumentException
T - typeName - IllegalArgumentException - if the specified typeName is null.public static <T> com.landawn.abacus.type.Type<T> typeOf(Class<?> cls) throws IllegalArgumentException
T - cls - IllegalArgumentException - if the specified Class is null.public static <T> T valueOf(Class<? extends T> targetClass, String str)
T - targetClass - str - public static <T> T defaultValueOf(Class<T> cls)
T - cls - public static boolean defaultIfNull(Boolean b)
b - public static boolean defaultIfNull(Boolean b, boolean defaultForNull)
b - defaultForNull - public static char defaultIfNull(Character c)
c - public static char defaultIfNull(Character c, char defaultForNull)
c - defaultForNull - public static byte defaultIfNull(Byte b)
b - public static byte defaultIfNull(Byte b, byte defaultForNull)
b - defaultForNull - public static short defaultIfNull(Short b)
b - public static short defaultIfNull(Short b, short defaultForNull)
b - defaultForNull - public static int defaultIfNull(Integer b)
b - public static int defaultIfNull(Integer b, int defaultForNull)
b - defaultForNull - public static long defaultIfNull(Long b)
b - public static long defaultIfNull(Long b, long defaultForNull)
b - defaultForNull - public static float defaultIfNull(Float b)
b - public static float defaultIfNull(Float b, float defaultForNull)
b - defaultForNull - public static double defaultIfNull(Double b)
b - public static double defaultIfNull(Double b, double defaultForNull)
b - defaultForNull - public static <T> T defaultIfNull(T obj,
T defaultForNull)
T - obj - defaultForNull - public static <T extends CharSequence> T defaultIfNullOrEmpty(T str, T defaultStr)
public static <T extends CharSequence> T defaultIfNullOrEmptyOrBlank(T str, T defaultStr)
public static String stringOf(boolean val)
val - public static String stringOf(char val)
val - public static String stringOf(byte val)
val - public static String stringOf(short val)
val - public static String stringOf(int val)
val - public static String stringOf(long val)
val - public static String stringOf(float val)
val - public static String stringOf(double val)
val - public static String stringOf(Object obj)
obj - null if the specified object is null.public static <E extends Enum<E>> ImmutableList<E> enumListOf(Class<E> enumClass)
E - enumClass - public static <E extends Enum<E>> ImmutableSet<E> enumSetOf(Class<E> enumClass)
E - enumClass - public static <E extends Enum<E>> ImmutableBiMap<E,String> enumMapOf(Class<E> enumClass)
E - enumClass - public static <T> T newInstance(Class<T> cls)
T - cls - public static <T> T newProxyInstance(Class<T> interfaceClass, InvocationHandler h)
T - interfaceClass - h - public static <T> T newProxyInstance(Class<?>[] interfaceClasses, InvocationHandler h)
java.lang.reflectT - interfaceClasses - h - public static <T> T newArray(Class<?> componentType, int length)
T - componentType - length - public static <T> T newEntity(Class<T> cls)
T - cls - public static <T> T newEntity(Class<T> cls, String entityName)
T - cls - entityName - public static <E> Set<E> newSetFromMap(Map<E,Boolean> map)
E - map - the backing mapCollections.newSetFromMap(Map)public static <T> ArrayList<T> newArrayList()
T - public static <T> ArrayList<T> newArrayList(int initialCapacity)
T - initialCapacity - public static <T> ArrayList<T> newArrayList(Collection<? extends T> c)
T - c - public static <T> LinkedList<T> newLinkedList()
T - public static <T> LinkedList<T> newLinkedList(Collection<? extends T> c)
T - c - public static <T> Set<T> newHashSet()
T - public static <T> Set<T> newHashSet(int initialCapacity)
T - initialCapacity - public static <T> Set<T> newHashSet(Collection<? extends T> c)
T - c - public static <T> Set<T> newLinkedHashSet()
T - public static <T> Set<T> newLinkedHashSet(int initialCapacity)
T - initialCapacity - public static <T> Set<T> newLinkedHashSet(Collection<? extends T> c)
T - c - public static <T extends Comparable<? super T>> TreeSet<T> newTreeSet()
T - public static <T> TreeSet<T> newTreeSet(Comparator<? super T> comparator)
T - comparator - public static <T extends Comparable<? super T>> TreeSet<T> newTreeSet(Collection<? extends T> c)
T - c - public static <T> TreeSet<T> newTreeSet(SortedSet<T> c)
T - c - public static <T> Multiset<T> newMultiset()
T - public static <T> Multiset<T> newMultiset(int initialCapacity)
T - initialCapacity - public static <T> Multiset<T> newMultiset(Class<? extends Map> valueMapType)
T - valueMapType - public static <T> Multiset<T> newMultiset(Supplier<? extends Map<T,?>> mapSupplier)
T - mapSupplier - public static <T> Multiset<T> newMultiset(Collection<? extends T> c)
T - c - public static <T> ArrayDeque<T> newArrayDeque()
T - public static <T> ArrayDeque<T> newArrayDeque(int numElements)
T - numElements - lower bound on initial capacity of the deque.public static <E> ArrayDeque<E> newArrayDeque(Collection<? extends E> c)
E - c - public static <K,V> Map.Entry<K,V> newEntry(K key, V value)
K - the key typeV - the value typekey - value - public static <K,V> ImmutableEntry<K,V> newImmutableEntry(K key, V value)
K - the key typeV - the value typekey - value - public static <K,V> Map<K,V> newHashMap()
K - the key typeV - the value typepublic static <K,V> Map<K,V> newHashMap(int initialCapacity)
K - the key typeV - the value typeinitialCapacity - public static <K,V> Map<K,V> newHashMap(Map<? extends K,? extends V> m)
K - the key typeV - the value typem - public static <K,V,E extends Exception> Map<K,V> newHashMap(Collection<? extends V> c, Throwables.Function<? super V,? extends K,E> keyMapper) throws E extends Exception
K - the key typeV - the value typeE - c - keyMapper - E - the eE extends Exceptionpublic static <K,V> Map<K,V> newLinkedHashMap()
K - the key typeV - the value typepublic static <K,V> Map<K,V> newLinkedHashMap(int initialCapacity)
K - the key typeV - the value typeinitialCapacity - public static <K,V> Map<K,V> newLinkedHashMap(Map<? extends K,? extends V> m)
K - the key typeV - the value typem - public static <K,V,E extends Exception> Map<K,V> newLinkedHashMap(Collection<? extends V> c, Throwables.Function<? super V,? extends K,E> keyMapper) throws E extends Exception
K - the key typeV - the value typeE - c - keyMapper - E - the eE extends Exceptionpublic static <K extends Comparable<? super K>,V> TreeMap<K,V> newTreeMap()
K - the key typeV - the value typepublic static <C,K extends C,V> TreeMap<K,V> newTreeMap(Comparator<C> comparator)
C - K - the key typeV - the value typecomparator - public static <K extends Comparable<? super K>,V> TreeMap<K,V> newTreeMap(Map<? extends K,? extends V> m)
K - the key typeV - the value typem - public static <K,V> TreeMap<K,V> newTreeMap(SortedMap<K,? extends V> m)
K - the key typeV - the value typem - public static <K,V> IdentityHashMap<K,V> newIdentityHashMap()
K - the key typeV - the value typepublic static <K,V> IdentityHashMap<K,V> newIdentityHashMap(int initialCapacity)
K - the key typeV - the value typeinitialCapacity - public static <K,V> IdentityHashMap<K,V> newIdentityHashMap(Map<? extends K,? extends V> m)
K - the key typeV - the value typem - public static <K,V> ConcurrentHashMap<K,V> newConcurrentHashMap()
K - the key typeV - the value typepublic static <K,V> ConcurrentHashMap<K,V> newConcurrentHashMap(int initialCapacity)
K - the key typeV - the value typeinitialCapacity - public static <K,V> ConcurrentHashMap<K,V> newConcurrentHashMap(Map<? extends K,? extends V> m)
K - the key typeV - the value typem - public static <K,V> BiMap<K,V> newBiMap()
K - the key typeV - the value typepublic static <K,V> BiMap<K,V> newBiMap(int initialCapacity)
K - the key typeV - the value typeinitialCapacity - public static <K,V> BiMap<K,V> newBiMap(int initialCapacity, float loadFactor)
K - the key typeV - the value typeinitialCapacity - loadFactor - public static <K,V> BiMap<K,V> newBiMap(Class<? extends Map> keyMapType, Class<? extends Map> valueMapType)
K - the key typeV - the value typekeyMapType - valueMapType - public static <K,V> BiMap<K,V> newBiMap(Supplier<? extends Map<K,V>> keyMapSupplier, Supplier<? extends Map<V,K>> valueMapSupplier)
K - the key typeV - the value typekeyMapSupplier - valueMapSupplier - public static <K,E,V extends Collection<E>> Multimap<K,E,V> newMultimap(Supplier<? extends Map<K,V>> mapSupplier, Supplier<? extends V> valueSupplier)
K - the key typeE - V - the value typemapSupplier - valueSupplier - public static <K,E> ListMultimap<K,E> newListMultimap()
K - the key typeE - public static <K,E> ListMultimap<K,E> newListMultimap(int initialCapacity)
K - the key typeE - initialCapacity - public static <K,E> ListMultimap<K,E> newListMultimap(Map<? extends K,? extends E> m)
K - the key typeE - m - public static <K,E> ListMultimap<K,E> newListMultimap(Class<? extends Map> mapType)
K - the key typeE - mapType - public static <K,E> ListMultimap<K,E> newListMultimap(Class<? extends Map> mapType, Class<? extends List> valueType)
K - the key typeE - mapType - valueType - public static <K,E> ListMultimap<K,E> newListMultimap(Supplier<? extends Map<K,List<E>>> mapSupplier, Supplier<? extends List<E>> valueSupplier)
K - the key typeE - mapSupplier - valueSupplier - public static <K,E> ListMultimap<K,E> newLinkedListMultimap()
ListMultimap backed by LinkedHashMap. 'Linked' is about the map, not the value.K - the key typeE - public static <K,E> ListMultimap<K,E> newLinkedListMultimap(int initialCapacity)
ListMultimap backed by LinkedHashMap. 'Linked' is about the map, not the value.K - the key typeE - initialCapacity - public static <K,E> ListMultimap<K,E> newLinkedListMultimap(Map<? extends K,? extends E> m)
ListMultimap backed by LinkedHashMap. 'Linked' is about the map, not the value.K - the key typeE - m - public static <K extends Comparable<? super K>,E> ListMultimap<K,E> newSortedListMultimap()
ListMultimap backed by SortedMap. 'Sorted' is about the map, not the value.K - the key typeE - public static <K extends Comparable<? super K>,E> ListMultimap<K,E> newSortedListMultimap(Map<? extends K,? extends E> m)
ListMultimap backed by SortedMap. 'Sorted' is about the map, not the value.K - the key typeE - m - public static <K,E> SetMultimap<K,E> newSetMultimap()
K - the key typeE - public static <K,E> SetMultimap<K,E> newSetMultimap(int initialCapacity)
K - the key typeE - initialCapacity - public static <K,E> SetMultimap<K,E> newSetMultimap(Map<? extends K,? extends E> m)
K - the key typeE - m - public static <K,E> SetMultimap<K,E> newSetMultimap(Class<? extends Map> mapType)
K - the key typeE - mapType - public static <K,E> SetMultimap<K,E> newSetMultimap(Class<? extends Map> mapType, Class<? extends Set> valueType)
K - the key typeE - mapType - valueType - public static <K,E> SetMultimap<K,E> newSetMultimap(Supplier<? extends Map<K,Set<E>>> mapSupplier, Supplier<? extends Set<E>> valueSupplier)
K - the key typeE - mapSupplier - valueSupplier - public static <K,E> SetMultimap<K,E> newLinkedSetMultimap()
SetMultimap backed by LinkedHashMap. 'Linked' is about the map, not the value.K - the key typeE - public static <K,E> SetMultimap<K,E> newLinkedSetMultimap(int initialCapacity)
SetMultimap backed by LinkedHashMap. 'Linked' is about the map, not the value.K - the key typeE - initialCapacity - public static <K,E> SetMultimap<K,E> newLinkedSetMultimap(Map<? extends K,? extends E> m)
SetMultimap backed by LinkedHashMap. 'Linked' is about the map, not the value.K - the key typeE - m - public static <K extends Comparable<? super K>,E> SetMultimap<K,E> newSortedSetMultimap()
SetMultimap backed by SortedMap. 'Sorted' is about the map, not the value.K - the key typeE - public static <K extends Comparable<? super K>,E> SetMultimap<K,E> newSortedSetMultimap(Map<? extends K,? extends E> m)
SetMultimap backed by SortedMap. 'Sorted' is about the map, not the value.K - the key typeE - m - public static DataSet newEmptyDataSet()
public static DataSet newEmptyDataSet(Collection<String> columnNames)
columnNames - public static DataSet newDataSet(String keyColumnName, String valueColumnName, Map<?,?> m)
DataSet: one column is for keys and one column is for values.keyColumnName - valueColumnName - m - public static <T> DataSet newDataSet(Collection<T> rows)
T - rows - list of row which can be: Map/Entity/Array/Listpublic static <T> DataSet newDataSet(Collection<String> columnNames, Collection<T> rowList)
columnNames is null or empty, the first row will be used as column names if its type is array or list,
or obtain the column names from first row if its type is entity or map.T - columnNames - rows - list of row which can be: Map/Entity/Array/Listpublic static DataSet newDataSet(Collection<String> columnNames, Object[][] rowList)
public static <C extends Collection<?>> DataSet newDataSet(Map<String,C> map)
C - map - keys are column names, values are columnspublic static DataSet merge(Collection<? extends DataSet> dss)
public static Object[] toArray(Collection<?> c)
c - public static Object[] toArray(Collection<?> c, int fromIndex, int toIndex)
c - fromIndex - toIndex - public static <A,T extends A> A[] toArray(Collection<T> c, A[] a) throws IllegalArgumentException
A - T - c - a - IllegalArgumentException - if the specified Array is null.public static <A,T extends A> A[] toArray(Collection<T> c, int fromIndex, int toIndex, A[] a) throws IllegalArgumentException
A - T - c - fromIndex - toIndex - a - IllegalArgumentException - if the specified Array is null.public static <A,T extends A> A[] toArray(Collection<T> c, IntFunction<A[]> arraySupplier)
A - T - c - arraySupplier - public static <A,T extends A> A[] toArray(Collection<T> c, int fromIndex, int toIndex, IntFunction<A[]> arraySupplier)
A - T - c - fromIndex - toIndex - arraySupplier - public static <A,T extends A> A[] toArray(Class<A[]> targetClass, Collection<T> c) throws IllegalArgumentException
A - T - targetClass - c - IllegalArgumentException - if the specified Class is null.public static <A,T extends A> A[] toArray(Class<A[]> targetClass, Collection<T> c, int fromIndex, int toIndex) throws IllegalArgumentException
A - T - targetClass - c - fromIndex - toIndex - IllegalArgumentException - if the specified Class is null.public static boolean[] toBooleanArray(Collection<Boolean> c)
c - public static boolean[] toBooleanArray(Collection<Boolean> c, int fromIndex, int toIndex)
c - fromIndex - toIndex - public static boolean[] toBooleanArray(Collection<Boolean> c, boolean defaultForNull)
c - defaultForNull - public static boolean[] toBooleanArray(Collection<Boolean> c, int fromIndex, int toIndex, boolean defaultForNull)
c - fromIndex - toIndex - defaultForNull - public static boolean[] toBooleanArray(byte[] a)
public static char[] toCharArray(Collection<Character> c)
c - public static char[] toCharArray(Collection<Character> c, int fromIndex, int toIndex)
c - fromIndex - toIndex - public static char[] toCharArray(Collection<Character> c, char defaultForNull)
c - defaultForNull - public static char[] toCharArray(Collection<Character> c, int fromIndex, int toIndex, char defaultForNull)
c - fromIndex - toIndex - defaultForNull - public static byte[] toByteArray(Collection<? extends Number> c)
c - public static byte[] toByteArray(Collection<? extends Number> c, int fromIndex, int toIndex)
c - fromIndex - toIndex - public static byte[] toByteArray(Collection<? extends Number> c, byte defaultForNull)
c - defaultForNull - public static byte[] toByteArray(Collection<? extends Number> c, int fromIndex, int toIndex, byte defaultForNull)
c - fromIndex - toIndex - defaultForNull - public static byte[] toByteArray(boolean[] a)
public static short[] toShortArray(Collection<? extends Number> c)
c - public static short[] toShortArray(Collection<? extends Number> c, int fromIndex, int toIndex)
c - fromIndex - toIndex - public static short[] toShortArray(Collection<? extends Number> c, short defaultForNull)
c - defaultForNull - public static short[] toShortArray(Collection<? extends Number> c, int fromIndex, int toIndex, short defaultForNull)
c - fromIndex - toIndex - defaultForNull - public static int[] toIntArray(Collection<? extends Number> c)
c - public static int[] toIntArray(Collection<? extends Number> c, int fromIndex, int toIndex)
c - fromIndex - toIndex - public static int[] toIntArray(Collection<? extends Number> c, int defaultForNull)
c - defaultForNull - public static int[] toIntArray(Collection<? extends Number> c, int fromIndex, int toIndex, int defaultForNull)
c - fromIndex - toIndex - defaultForNull - public static int[] toIntArray(char[] a)
public static long[] toLongArray(Collection<? extends Number> c)
c - public static long[] toLongArray(Collection<? extends Number> c, int fromIndex, int toIndex)
c - fromIndex - toIndex - public static long[] toLongArray(Collection<? extends Number> c, long defaultForNull)
c - defaultForNull - public static long[] toLongArray(Collection<? extends Number> c, int fromIndex, int toIndex, long defaultForNull)
c - fromIndex - toIndex - defaultForNull - public static float[] toFloatArray(Collection<? extends Number> c)
c - public static float[] toFloatArray(Collection<? extends Number> c, int fromIndex, int toIndex)
c - fromIndex - toIndex - public static float[] toFloatArray(Collection<? extends Number> c, float defaultForNull)
c - defaultForNull - public static float[] toFloatArray(Collection<? extends Number> c, int fromIndex, int toIndex, float defaultForNull)
c - fromIndex - toIndex - defaultForNull - public static double[] toDoubleArray(Collection<? extends Number> c)
c - public static double[] toDoubleArray(Collection<? extends Number> c, int fromIndex, int toIndex)
c - fromIndex - toIndex - public static double[] toDoubleArray(Collection<? extends Number> c, double defaultForNull)
c - defaultForNull - public static double[] toDoubleArray(Collection<? extends Number> c, int fromIndex, int toIndex, double defaultForNull)
c - fromIndex - toIndex - defaultForNull - public static List<Boolean> toList(boolean[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static List<Character> toList(char[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static List<Byte> toList(byte[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static List<Short> toList(short[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static List<Integer> toList(int[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static List<Long> toList(long[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static List<Float> toList(float[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static List<Double> toList(double[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static <T> List<T> toList(T[] a)
T - a - public static <T> List<T> toList(T[] a, int fromIndex, int toIndex)
T - a - fromIndex - toIndex - public static Set<Boolean> toSet(boolean[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static Set<Character> toSet(char[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static Set<Byte> toSet(byte[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static Set<Short> toSet(short[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static Set<Integer> toSet(int[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static Set<Long> toSet(long[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static Set<Float> toSet(float[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static Set<Double> toSet(double[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static <T> Set<T> toSet(T[] a)
T - a - public static <T> Set<T> toSet(T[] a, int fromIndex, int toIndex)
T - a - fromIndex - toIndex - public static <C extends Collection<Boolean>> C toCollection(boolean[] a, IntFunction<? extends C> supplier)
C - a - supplier - public static <C extends Collection<Boolean>> C toCollection(boolean[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier)
C - a - fromIndex - toIndex - supplier - public static <C extends Collection<Character>> C toCollection(char[] a, IntFunction<? extends C> supplier)
C - a - supplier - public static <C extends Collection<Character>> C toCollection(char[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier)
C - a - fromIndex - toIndex - supplier - public static <C extends Collection<Byte>> C toCollection(byte[] a, IntFunction<? extends C> supplier)
C - a - supplier - public static <C extends Collection<Byte>> C toCollection(byte[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier)
C - a - fromIndex - toIndex - supplier - public static <C extends Collection<Short>> C toCollection(short[] a, IntFunction<? extends C> supplier)
C - a - supplier - public static <C extends Collection<Short>> C toCollection(short[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier)
C - a - fromIndex - toIndex - supplier - public static <C extends Collection<Integer>> C toCollection(int[] a, IntFunction<? extends C> supplier)
C - a - supplier - public static <C extends Collection<Integer>> C toCollection(int[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier)
C - a - fromIndex - toIndex - supplier - public static <C extends Collection<Long>> C toCollection(long[] a, IntFunction<? extends C> supplier)
C - a - supplier - public static <C extends Collection<Long>> C toCollection(long[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier)
C - a - fromIndex - toIndex - supplier - public static <C extends Collection<Float>> C toCollection(float[] a, IntFunction<? extends C> supplier)
C - a - supplier - public static <C extends Collection<Float>> C toCollection(float[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier)
C - a - fromIndex - toIndex - supplier - public static <C extends Collection<Double>> C toCollection(double[] a, IntFunction<? extends C> supplier)
C - a - supplier - public static <C extends Collection<Double>> C toCollection(double[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier)
C - a - fromIndex - toIndex - supplier - public static <T,C extends Collection<T>> C toCollection(T[] a, IntFunction<? extends C> supplier)
T - C - a - supplier - public static <T,C extends Collection<T>> C toCollection(T[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier)
T - C - a - fromIndex - toIndex - supplier - public static <T,C extends Collection<T>> C toCollection(Iterator<? extends T> iter, Supplier<? extends C> supplier)
@SafeVarargs public static <T> T[] asArray(T... a)
T - a - public static <K,V> Map<K,V> asMap(K k1, V v1)
K - the key typeV - the value typek - v - k1 - v1 - public static <K,V> Map<K,V> asMap(K k1, V v1, K k2, V v2)
K - the key typeV - the value typek - v - k1 - v1 - k2 - v2 - public static <K,V> Map<K,V> asMap(K k1, V v1, K k2, V v2, K k3, V v3)
K - the key typeV - the value typek - v - k1 - v1 - k2 - v2 - k3 - v3 - public static <K,V> Map<K,V> asMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
K - the key typeV - the value typek - v - k1 - v1 - k2 - v2 - k3 - v3 - k4 - v4 - public static <K,V> Map<K,V> asMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5)
K - the key typeV - the value typek - v - k1 - v1 - k2 - v2 - k3 - v3 - k4 - v4 - k5 - v5 - public static <K,V> Map<K,V> asMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6)
K - the key typeV - the value typek - v - k1 - v1 - k2 - v2 - k3 - v3 - k4 - v4 - k5 - v5 - k6 - v6 - public static <K,V> Map<K,V> asMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7)
K - the key typeV - the value typek - v - k1 - v1 - k2 - v2 - k3 - v3 - k4 - v4 - k5 - v5 - k6 - v6 - k7 - v7 - @Deprecated @SafeVarargs @NullSafe public static <K,V> Map<K,V> asMap(Object... a)
K - the key typeV - the value typea - public static <K,V> Map<K,V> asLinkedHashMap(K k1, V v1)
K - the key typeV - the value typek - v - k1 - v1 - public static <K,V> Map<K,V> asLinkedHashMap(K k1, V v1, K k2, V v2)
K - the key typeV - the value typek - v - k1 - v1 - k2 - v2 - public static <K,V> Map<K,V> asLinkedHashMap(K k1, V v1, K k2, V v2, K k3, V v3)
K - the key typeV - the value typek - v - k1 - v1 - k2 - v2 - k3 - v3 - public static <K,V> Map<K,V> asLinkedHashMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
K - the key typeV - the value typek - v - k1 - v1 - k2 - v2 - k3 - v3 - k4 - v4 - public static <K,V> Map<K,V> asLinkedHashMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5)
K - the key typeV - the value typek - v - k1 - v1 - k2 - v2 - k3 - v3 - k4 - v4 - k5 - v5 - public static <K,V> Map<K,V> asLinkedHashMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6)
K - the key typeV - the value typek - v - k1 - v1 - k2 - v2 - k3 - v3 - k4 - v4 - k5 - v5 - k6 - v6 - public static <K,V> Map<K,V> asLinkedHashMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7)
K - the key typeV - the value typek - v - k1 - v1 - k2 - v2 - k3 - v3 - k4 - v4 - k5 - v5 - k6 - v6 - k7 - v7 - @Deprecated @SafeVarargs public static <K,V> Map<K,V> asLinkedHashMap(Object... a)
K - the key typeV - the value typea - public static Map<String,Object> asProps(String propName1, Object propValue1, String propName2, Object propValue2)
public static Map<String,Object> asProps(String propName1, Object propValue1, String propName2, Object propValue2, String propName3, Object propValue3)
public static Map<String,Object> asProps(String propName1, Object propValue1, String propName2, Object propValue2, String propName3, Object propValue3, String propName4, Object propValue4)
public static Map<String,Object> asProps(String propName1, Object propValue1, String propName2, Object propValue2, String propName3, Object propValue3, String propName4, Object propValue4, String propName5, Object propValue5)
@Deprecated @SafeVarargs public static Map<String,Object> asProps(Object... a)
a - pairs of property name and value or a Java Entity Object what
allows access to properties using getter and setter methods.public static <T> List<T> asList(T e)
T - e - public static <T> List<T> asList(T e1, T e2)
T - e1 - e2 - public static <T> List<T> asList(T e1, T e2, T e3)
T - e1 - e2 - e3 - public static <T> List<T> asList(T e1, T e2, T e3, T e4)
T - e1 - e2 - e3 - e4 - public static <T> List<T> asList(T e1, T e2, T e3, T e4, T e5)
T - e1 - e2 - e3 - e4 - e5 - public static <T> List<T> asList(T e1, T e2, T e3, T e4, T e5, T e6)
T - e1 - e2 - e3 - e4 - e5 - e6 - public static <T> List<T> asList(T e1, T e2, T e3, T e4, T e5, T e6, T e7)
T - e1 - e2 - e3 - e4 - e5 - e6 - e7 - public static <T> List<T> asList(T e1, T e2, T e3, T e4, T e5, T e6, T e7, T e8)
T - e1 - e2 - e3 - e4 - e5 - e6 - e7 - e8 - public static <T> List<T> asList(T e1, T e2, T e3, T e4, T e5, T e6, T e7, T e8, T e9)
T - e1 - e2 - e3 - e4 - e5 - e6 - e7 - e8 - e9 - @SafeVarargs @NullSafe public static <T> List<T> asList(T... a)
T - a - public static <T> LinkedList<T> asLinkedList(T e)
T - e - public static <T> LinkedList<T> asLinkedList(T e1, T e2)
T - e1 - e2 - public static <T> LinkedList<T> asLinkedList(T e1, T e2, T e3)
T - e1 - e2 - e3 - public static <T> LinkedList<T> asLinkedList(T e1, T e2, T e3, T e4)
T - e1 - e2 - e3 - e4 - public static <T> LinkedList<T> asLinkedList(T e1, T e2, T e3, T e4, T e5)
T - e1 - e2 - e3 - e4 - e5 - public static <T> LinkedList<T> asLinkedList(T e1, T e2, T e3, T e4, T e5, T e6)
T - e1 - e2 - e3 - e4 - e5 - e6 - public static <T> LinkedList<T> asLinkedList(T e1, T e2, T e3, T e4, T e5, T e6, T e7)
T - e1 - e2 - e3 - e4 - e5 - e6 - e7 - @SafeVarargs @NullSafe public static <T> LinkedList<T> asLinkedList(T... a)
T - a - public static <T> Set<T> asSet(T e)
T - e - public static <T> Set<T> asSet(T e1, T e2)
T - e1 - e2 - public static <T> Set<T> asSet(T e1, T e2, T e3)
T - e1 - e2 - e3 - public static <T> Set<T> asSet(T e1, T e2, T e3, T e4)
T - e1 - e2 - e3 - e4 - public static <T> Set<T> asSet(T e1, T e2, T e3, T e4, T e5)
T - e1 - e2 - e3 - e4 - e5 - public static <T> Set<T> asSet(T e1, T e2, T e3, T e4, T e5, T e6)
T - e1 - e2 - e3 - e4 - e5 - e6 - public static <T> Set<T> asSet(T e1, T e2, T e3, T e4, T e5, T e6, T e7)
T - e1 - e2 - e3 - e4 - e5 - e6 - e7 - public static <T> Set<T> asSet(T e1, T e2, T e3, T e4, T e5, T e6, T e7, T e8)
T - e1 - e2 - e3 - e4 - e5 - e6 - e7 - e8 - public static <T> Set<T> asSet(T e1, T e2, T e3, T e4, T e5, T e6, T e7, T e8, T e9)
T - e1 - e2 - e3 - e4 - e5 - e6 - e7 - e8 - e9 - @SafeVarargs @NullSafe public static <T> Set<T> asSet(T... a)
T - a - public static <T> Set<T> asLinkedHashSet(T e)
T - e - public static <T> Set<T> asLinkedHashSet(T e1, T e2)
T - e1 - e2 - public static <T> Set<T> asLinkedHashSet(T e1, T e2, T e3)
T - e1 - e2 - e3 - public static <T> Set<T> asLinkedHashSet(T e1, T e2, T e3, T e4)
T - e1 - e2 - e3 - e4 - public static <T> Set<T> asLinkedHashSet(T e1, T e2, T e3, T e4, T e5)
T - e1 - e2 - e3 - e4 - e5 - public static <T> Set<T> asLinkedHashSet(T e1, T e2, T e3, T e4, T e5, T e6)
T - e1 - e2 - e3 - e4 - e5 - e6 - public static <T> Set<T> asLinkedHashSet(T e1, T e2, T e3, T e4, T e5, T e6, T e7)
T - e1 - e2 - e3 - e4 - e5 - e6 - e7 - @SafeVarargs @NullSafe public static <T> Set<T> asLinkedHashSet(T... a)
T - a - @SafeVarargs @NullSafe public static <T> SortedSet<T> asSortedSet(T... a)
T - a - @SafeVarargs public static <T> NavigableSet<T> asNavigableSet(T... a)
T - a - @SafeVarargs public static <T> Queue<T> asQueue(T... a)
T - a - @SafeVarargs public static <T> ArrayBlockingQueue<T> asArrayBlockingQueue(T... a)
T - a - @SafeVarargs public static <T> LinkedBlockingQueue<T> asLinkedBlockingQueue(T... a)
T - a - @SafeVarargs public static <T> ConcurrentLinkedQueue<T> asConcurrentLinkedQueue(T... a)
T - a - @SafeVarargs public static <T extends Delayed> DelayQueue<T> asDelayQueue(T... a)
T - a - @SafeVarargs public static <T> PriorityQueue<T> asPriorityQueue(T... a)
T - a - @SafeVarargs public static <T> Deque<T> asDeque(T... a)
T - a - @SafeVarargs public static <T> ArrayDeque<T> asArrayDeque(T... a)
T - a - @SafeVarargs public static <T> LinkedBlockingDeque<T> asLinkedBlockingDeque(T... a)
T - a - @SafeVarargs public static <T> ConcurrentLinkedDeque<T> asConcurrentLinkedDeque(T... a)
T - a - @SafeVarargs public static <T> Multiset<T> asMultiset(T... a)
T - a - @Immutable public static <T> List<T> asSingletonList(T o)
T - o - Collections.singletonList(Object)@Immutable public static <T> Set<T> asSingletonSet(T o)
T - o - Collections.singleton(Object)@Immutable public static <K,V> Map<K,V> asSingletonMap(K key, V value)
K - the key typeV - the value typekey - value - Collections.singletonMap(Object, Object)public static <T> T convert(Object obj, Class<? extends T> targetClass)
obj to the specified
targetClass. Default value of targetClass is returned if
sourceObject is null. An instance of targetClass is returned if
convert successfullyT - obj - targetClass - public static <T> T convert(Object obj, com.landawn.abacus.type.Type<? extends T> targetType)
T - obj - targetType - public static boolean parseBoolean(String str)
Boolean with a value represented by the specified
string. The Boolean returned represents a true value if the
string argument is not null and is equal, ignoring case, to
the string "true".str - a string.public static char parseChar(String str)
str - @Deprecated public static byte parseByte(String str) throws NumberFormatException
Numbers.toByte(String)Byte.valueOf(String) if str
is not null, otherwise, the default value 0 for byte is
returned.str - NumberFormatException - If the string is not a parsable byte.Numbers.toByte(String)@Deprecated public static short parseShort(String str) throws NumberFormatException
Numbers.toShort(String)Short.valueOf(String) if str
is not null, otherwise, the default value 0 for short is
returned.str - NumberFormatException - If the string is not a parsable short.Numbers.toShort(String)@Deprecated public static int parseInt(String str) throws NumberFormatException
Numbers.toInt(String)Integer.valueOf(String) if
str is not null, otherwise, the default value 0 for
int is returned.str - NumberFormatException - If the string is not a parsable int.Numbers.toInt(String)@Deprecated public static long parseLong(String str) throws NumberFormatException
Numbers.toLong(String)Long.valueOf(String) if str
is not null, otherwise, the default value 0 for long is
returned.str - NumberFormatException - If the string is not a parsable long.Numbers.toLong(String)@Deprecated public static float parseFloat(String str) throws NumberFormatException
Numbers.toFloat(String)Float.valueOf(String) if str
is not null, otherwise, the default value 0f for float is
returned.str - NumberFormatException - If the string is not a parsable float.Numbers.toFloat(String)@Deprecated public static double parseDouble(String str) throws NumberFormatException
Numbers.toDouble(String)Double.valueOf(String) if str
is not null, otherwise, the default value 0d for double is
returned.str - NumberFormatException - If the string is not a parsable double.Numbers.toDouble(String)public static String base64Encode(byte[] binaryData)
binaryData - public static String base64EncodeChunked(byte[] binaryData)
binaryData - public static byte[] base64Decode(String base64String)
base64String - public static String base64DecodeToString(String base64String)
base64String - public static String base64UrlEncode(byte[] binaryData)
binaryData - public static byte[] base64UrlDecode(String base64String)
base64String - public static String base64UrlDecodeToString(String base64String)
base64String - public static String urlEncode(Object parameters, Charset charset)
parameters - charset - public static Map<String,String> urlDecode(String urlQuery)
urlQuery - public static Map<String,String> urlDecode(String urlQuery, Charset charset)
urlQuery - charset - public static <T> T urlDecode(Class<? extends T> targetClass, String urlQuery)
T - targetClass - urlQuery - public static <T> T urlDecode(Class<? extends T> targetClass, String urlQuery, Charset charset)
T - targetClass - urlQuery - charset - public static String guid()
UUID.randomUUID().public static String uuid()
UUID.randomUUID().@Deprecated public static boolean isEntity(Class<?> cls)
ClassUtil.isEntity(Class)cls - ClassUtil.isEntity(Class)@Deprecated public static boolean isDirtyMarker(Class<?> cls)
ClassUtil.isDirtyMarker(Class)cls - DirtyMarkerUtil.isDirtyMarker(Class)public static <T> T copy(T entity)
entity.T - entity - a Java Object what allows access to properties using getter
and setter methods.public static <T> T copy(T entity,
Collection<String> selectPropNames)
T - entity - selectPropNames - public static <T> T copy(Class<? extends T> targetClass, Object entity)
T - targetClass - entity - public static <T> T copy(Class<? extends T> targetClass, Object entity, Collection<String> selectPropNames)
cls and set with
same properties retrieved by 'getXXX' method in the specified
entity.T - targetClass - a Java Object what allows access to properties using getter
and setter methods.entity - a Java Object what allows access to properties using getter
and setter methods.selectPropNames - public static <T> T copy(Class<? extends T> targetClass, Object entity, boolean ignoreUnmatchedProperty, Set<String> ignorePropNames)
T - targetClass - entity - ignoreUnmatchedProperty - ignorePropNames - public static <T> T merge(Object sourceEntity, T targetEntity)
sourceEntity - targetEntity - targetEntitypublic static <T> T merge(Object sourceEntity, T targetEntity, Collection<String> selectPropNames)
sourceEntity to the specified targetEntity.sourceEntity - a Java Object what allows access to properties using getter
and setter methods.targetEntity - a Java Object what allows access to properties using getter
and setter methods.selectPropNames - targetEntitypublic static <T> T merge(Object sourceEntity, T targetEntity, BiPredicate<String,?> filter)
sourceEntity to the specified targetEntity.sourceEntity - a Java Object what allows access to properties using getter
and setter methods.targetEntity - a Java Object what allows access to properties using getter
and setter methods.filter - targetEntitypublic static <T> T merge(Object sourceEntity, T targetEntity, boolean ignoreUnmatchedProperty, Set<String> ignorePropNames)
sourceEntity - targetEntity - ignoreUnmatchedProperty - ignorePropNames - targetEntitypublic static <T> T merge(Object sourceEntity, T targetEntity, BinaryOperator<?> mergeFunc)
sourceEntity - targetEntity - mergeFunc - the first parameter is source property value, the second parameter is target property value.targetEntitypublic static <T> T merge(Object sourceEntity, T targetEntity, Collection<String> selectPropNames, BinaryOperator<?> mergeFunc)
sourceEntity to the specified targetEntity.sourceEntity - a Java Object what allows access to properties using getter
and setter methods.targetEntity - a Java Object what allows access to properties using getter
and setter methods.selectPropNames - mergeFunc - the first parameter is source property value, the second parameter is target property value.targetEntitypublic static <T> T merge(Object sourceEntity, T targetEntity, BiPredicate<String,?> filter, BinaryOperator<?> mergeFunc)
sourceEntity to the specified targetEntity.sourceEntity - a Java Object what allows access to properties using getter
and setter methods.targetEntity - a Java Object what allows access to properties using getter
and setter methods.filter - mergeFunc - the first parameter is source property value, the second parameter is target property value.targetEntitypublic static <T> T merge(Object sourceEntity, T targetEntity, boolean ignoreUnmatchedProperty, Set<String> ignorePropNames, BinaryOperator<?> mergeFunc)
sourceEntity - targetEntity - ignoreUnmatchedProperty - ignorePropNames - mergeFunc - the first parameter is source property value, the second parameter is target property value.targetEntity@SafeVarargs public static void erase(Object entity, String... propNames)
entity - propNames - public static void erase(Object entity, Collection<String> propNames)
entity - propNames - public static void eraseAll(Object entity)
entity - @Immutable public static <T> List<T> emptyList()
List.T - Collections.emptyList()@Immutable public static <T> Set<T> emptySet()
Set.T - Collections.emptySet()@Immutable public static <K,V> Map<K,V> emptyMap()
Map.K - the key typeV - the value typeCollections.emptyMap()public static <T> Iterator<T> emptyIterator()
Iterator.T - Collections.emptyIterator()@Immutable public static <T> ListIterator<T> emptyListIterator()
ListIterator.T - Collections.emptyListIterator()@Immutable public static InputStream emptyInputStream()
InputStream.public static <T> boolean anyNull(T a,
T b)
T - a - b - public static <T> boolean anyNull(T a,
T b,
T c)
T - a - b - c - @SafeVarargs public static <T> boolean anyNull(T... a)
T - a - public static <T> boolean anyNull(Collection<T> c)
T - c - public static <T> boolean allNull(T a,
T b)
T - a - b - public static <T> boolean allNull(T a,
T b,
T c)
T - a - b - c - @SafeVarargs public static <T> boolean allNull(T... a)
T - a - public static <T> boolean allNull(Collection<T> c)
T - c - public static boolean anyNullOrEmpty(CharSequence a, CharSequence b)
a - b - public static boolean anyNullOrEmpty(CharSequence a, CharSequence b, CharSequence c)
a - b - c - @SafeVarargs public static boolean anyNullOrEmpty(CharSequence... css)
css - public static boolean anyNullOrEmpty(Collection<? extends CharSequence> css)
css - public static <T> boolean anyNullOrEmpty(T[] a,
T[] b)
T - a - b - public static <T> boolean anyNullOrEmpty(T[] a,
T[] b,
T[] c)
T - a - b - c - public static <T extends Collection<?>> boolean anyNullOrEmpty(T a, T b)
T - a - b - public static <T extends Collection<?>> boolean anyNullOrEmpty(T a, T b, T c)
T - a - b - c - public static boolean allNullOrEmpty(CharSequence cs1, CharSequence cs2)
cs1 - cs2 - public static boolean allNullOrEmpty(CharSequence cs1, CharSequence cs2, CharSequence cs3)
cs1 - cs2 - cs3 - @SafeVarargs public static boolean allNullOrEmpty(CharSequence... css)
css - public static boolean allNullOrEmpty(Collection<? extends CharSequence> css)
css - public static <T> boolean allNullOrEmpty(T[] a,
T[] b)
T - a - b - public static <T> boolean allNullOrEmpty(T[] a,
T[] b,
T[] c)
T - a - b - c - public static <T extends Collection<?>> boolean allNullOrEmpty(T a, T b)
T - a - b - public static <T extends Collection<?>> boolean allNullOrEmpty(T a, T b, T c)
T - a - b - c - public static <T> u.Nullable<T> first(Collection<T> c)
T - c - public static <T> u.Nullable<T> first(Iterator<T> iter)
T - iter - public static <T> u.Nullable<T> last(Collection<T> c)
T - c - public static <T> u.Nullable<T> last(Iterator<T> iter)
T - iter - public static <T> u.Optional<T> firstNonNull(T a, T b)
T - a - b - public static <T> u.Optional<T> firstNonNull(T a, T b, T c)
T - a - b - c - @SafeVarargs public static <T> u.Optional<T> firstNonNull(T... a)
T - a - public static <T> u.Optional<T> firstNonNull(Collection<T> c)
T - c - public static <T> u.Optional<T> firstNonNull(Iterator<T> iter)
T - iter - public static <T> u.Optional<T> lastNonNull(T a, T b)
T - a - b - public static <T> u.Optional<T> lastNonNull(T a, T b, T c)
T - a - b - c - @SafeVarargs public static <T> u.Optional<T> lastNonNull(T... a)
T - a - public static <T> u.Optional<T> lastNonNull(Collection<T> c)
T - c - public static <T> u.Optional<T> lastNonNull(Iterator<T> iter)
T - iter - public static <T extends CharSequence> u.Optional<T> firstNonEmpty(T a, T b)
T - a - b - public static <T extends CharSequence> u.Optional<T> firstNonEmpty(T a, T b, T c)
T - a - b - c - public static <T extends CharSequence> u.Optional<T> firstNonBlank(T a, T b)
T - a - b - public static <T extends CharSequence> u.Optional<T> firstNonBlank(T a, T b, T c)
T - a - b - c - public static <T> u.Optional<T[]> firstNonEmpty(T[] a, T[] b)
T - a - b - public static <T> u.Optional<T[]> firstNonEmpty(T[] a, T[] b, T[] c)
T - a - b - c - public static <T extends Collection<?>> u.Optional<T> firstNonEmpty(T a, T b)
T - a - b - public static <T extends Collection<?>> u.Optional<T> firstNonEmpty(T a, T b, T c)
T - a - b - c - public static <K,V> u.Optional<Map.Entry<K,V>> firstEntry(Map<K,V> map)
K - the key typeV - the value typemap - public static <K,V> u.Optional<Map.Entry<K,V>> lastEntry(Map<K,V> map)
K - the key typeV - the value typemap - public static <T> T firstOrNullIfEmpty(T[] a)
T - a - public static <T> T firstOrNullIfEmpty(Collection<T> c)
T - c - public static <T> T firstOrNullIfEmpty(Iterator<T> iter)
T - iter - public static <T> T firstOrDefaultIfEmpty(T[] a,
T defaultValueForEmpty)
T - a - defaultValueForEmpty - public static <T> T firstOrDefaultIfEmpty(Collection<T> c, T defaultValueForEmpty)
T - c - defaultValueForEmpty - public static <T> T firstOrDefaultIfEmpty(Iterator<T> iter, T defaultValueForEmpty)
T - iter - defaultValueForEmpty - public static <T> T lastOrNullIfEmpty(T[] a)
T - a - public static <T> T lastOrNullIfEmpty(Collection<T> c)
T - c - public static <T> T lastOrNullIfEmpty(Iterator<T> iter)
T - iter - public static <T> T lastOrDefaultIfEmpty(T[] a,
T defaultValueForEmpty)
T - a - defaultValueForEmpty - public static <T> T lastOrDefaultIfEmpty(Collection<T> c, T defaultValueForEmpty)
T - c - defaultValueForEmpty - public static <T> T lastOrDefaultIfEmpty(Iterator<T> iter, T defaultValueForEmpty)
T - iter - defaultValueForEmpty - public static <T,E extends Exception> u.Nullable<T> findFirst(T[] a, Throwables.Predicate<? super T,E> predicate) throws E extends Exception
T - the generic typeE - the element typea - the apredicate - the predicateE - the eE extends Exceptionpublic static <T,E extends Exception> u.Nullable<T> findFirst(Collection<? extends T> c, Throwables.Predicate<? super T,E> predicate) throws E extends Exception
T - the generic typeE - the element typec - the cpredicate - the predicateE - the eE extends Exceptionpublic static <T,E extends Exception> u.Nullable<T> findFirst(Iterator<? extends T> iter, Throwables.Predicate<? super T,E> predicate) throws E extends Exception
T - E - iter - predicate - EE extends Exceptionpublic static <T,E extends Exception> u.Nullable<T> findLast(T[] a, Throwables.Predicate<? super T,E> predicate) throws E extends Exception
T - the generic typeE - the element typea - the apredicate - the predicateE - the eE extends Exceptionpublic static <T,E extends Exception> u.Nullable<T> findLast(Collection<? extends T> c, Throwables.Predicate<? super T,E> predicate) throws E extends Exception
T - the generic typeE - the element typec - the cpredicate - the predicateE - the eE extends Exceptionpublic static <T,E extends Exception> u.Optional<T> findFirstNonNull(T[] a, Throwables.Predicate<? super T,E> predicate) throws E extends Exception
T - the generic typeE - the element typea - the apredicate - the predicateE - the eE extends Exceptionpublic static <T,E extends Exception> u.Optional<T> findFirstNonNull(Collection<? extends T> c, Throwables.Predicate<? super T,E> predicate) throws E extends Exception
T - the generic typeE - the element typec - the cpredicate - the predicateE - the eE extends Exceptionpublic static <T,E extends Exception> u.Optional<T> findFirstNonNull(Iterator<? extends T> iter, Throwables.Predicate<? super T,E> predicate) throws E extends Exception
T - E - iter - predicate - EE extends Exceptionpublic static <T,E extends Exception> u.Optional<T> findLastNonNull(T[] a, Throwables.Predicate<? super T,E> predicate) throws E extends Exception
T - the generic typeE - the element typea - the apredicate - the predicateE - the eE extends Exceptionpublic static <T,E extends Exception> u.Optional<T> findLastNonNull(Collection<? extends T> c, Throwables.Predicate<? super T,E> predicate) throws E extends Exception
T - the generic typeE - the element typec - the cpredicate - the predicateE - the eE extends Exceptionpublic static <T> List<T> first(Collection<? extends T> c, int n)
n elements.T - the generic typec - the cn - the npublic static <T> List<T> last(Collection<? extends T> c, int n)
n elements.T - the generic typec - the cn - the npublic static <T> ImmutableList<? extends T> slice(T[] a, int fromIndex, int toIndex)
Seq.T - the generic typea - the afromIndex - the from indextoIndex - the to indexpublic static <T> ImmutableList<? extends T> slice(List<? extends T> c, int fromIndex, int toIndex)
ImmutableCollection.T - the generic typec - the cfromIndex - the from indextoIndex - the to indexpublic static <T> ImmutableCollection<? extends T> slice(Collection<? extends T> c, int fromIndex, int toIndex)
ImmutableCollection.T - the generic typec - the cfromIndex - the from indextoIndex - the to indexpublic static <T> ObjIterator<T> slice(Iterator<T> iter, long fromIndex, long toIndex)
T - iter - fromIndex - toIndex - public static int len(CharSequence s)
Array/Collection/Map/CharSequence, or 0 if it's empty or null.s - public static int len(boolean[] a)
Array/Collection/Map/CharSequence, or 0 if it's empty or null.a - public static int len(char[] a)
Array/Collection/Map/CharSequence, or 0 if it's empty or null.a - public static int len(byte[] a)
Array/Collection/Map/CharSequence, or 0 if it's empty or null.a - public static int len(short[] a)
Array/Collection/Map/CharSequence, or 0 if it's empty or null.a - public static int len(int[] a)
Array/Collection/Map/CharSequence, or 0 if it's empty or null.a - public static int len(long[] a)
Array/Collection/Map/CharSequence, or 0 if it's empty or null.a - public static int len(float[] a)
Array/Collection/Map/CharSequence, or 0 if it's empty or null.a - public static int len(double[] a)
Array/Collection/Map/CharSequence, or 0 if it's empty or null.a - public static int len(Object[] a)
Array/Collection/Map/CharSequence, or 0 if it's empty or null.a - public static int size(Collection<?> c)
Array/Collection/Map/CharSequence, or 0 if it's empty or null.c - public static int size(Map<?,?> m)
Array/Collection/Map/CharSequence, or 0 if it's empty or null.m - public static <T> List<T> nullToEmpty(List<T> list)
null, otherwise itself is returned.T - list - public static <T> Set<T> nullToEmpty(Set<T> set)
null, otherwise itself is returned.T - set - public static <K,V> Map<K,V> nullToEmpty(Map<K,V> map)
null, otherwise itself is returned.K - the key typeV - the value typemap - public static <T> Iterator<T> nullToEmpty(Iterator<T> iter)
Iterator if the specified Iterator is null, otherwise itself is returned.T - iter - public static <T> ListIterator<T> nullToEmpty(ListIterator<T> iter)
ListIterator if the specified ListIterator is null, otherwise itself is returned.T - iter - public static boolean[] nullToEmpty(boolean[] a)
a - public static char[] nullToEmpty(char[] a)
a - public static byte[] nullToEmpty(byte[] a)
a - public static short[] nullToEmpty(short[] a)
a - public static int[] nullToEmpty(int[] a)
a - public static long[] nullToEmpty(long[] a)
a - public static float[] nullToEmpty(float[] a)
a - public static double[] nullToEmpty(double[] a)
a - @Deprecated public static Object[] nullToEmpty(Object[] a)
CommonUtil.nullToEmpty(Object[], Class)a - @Deprecated public static <T> T[] nullToEmpty(Class<T[]> arrayType, T[] a)
CommonUtil.nullToEmpty(Object[], Class)T - arrayType - a - public static <T> T[] nullToEmpty(T[] a,
Class<T[]> arrayType)
T - a - arrayType - public static <T> ImmutableCollection<T> nullToEmpty(ImmutableCollection<T> c)
null, otherwise itself is returned.T - c - public static <T> ImmutableList<T> nullToEmpty(ImmutableList<T> list)
null, otherwise itself is returned.T - list - public static <T> ImmutableSet<T> nullToEmpty(ImmutableSet<T> set)
null, otherwise itself is returned.T - set - public static <T> ImmutableSortedSet<T> nullToEmpty(ImmutableSortedSet<T> set)
null, otherwise itself is returned.T - set - public static <T> ImmutableNavigableSet<T> nullToEmpty(ImmutableNavigableSet<T> set)
null, otherwise itself is returned.T - set - public static <K,V> ImmutableMap<K,V> nullToEmpty(ImmutableMap<K,V> map)
null, otherwise itself is returned.K - the key typeV - the value typemap - public static <K,V> ImmutableSortedMap<K,V> nullToEmpty(ImmutableSortedMap<K,V> map)
null, otherwise itself is returned.K - the key typeV - the value typemap - public static <K,V> ImmutableNavigableMap<K,V> nullToEmpty(ImmutableNavigableMap<K,V> map)
null, otherwise itself is returned.K - the key typeV - the value typemap - public static <K,V> ImmutableBiMap<K,V> nullToEmpty(ImmutableBiMap<K,V> map)
null, otherwise itself is returned.K - the key typeV - the value typemap - public static boolean isNullOrEmpty(CharSequence s)
s - public static boolean isNullOrEmpty(boolean[] a)
a - public static boolean isNullOrEmpty(char[] a)
a - public static boolean isNullOrEmpty(byte[] a)
a - public static boolean isNullOrEmpty(short[] a)
a - public static boolean isNullOrEmpty(int[] a)
a - public static boolean isNullOrEmpty(long[] a)
a - public static boolean isNullOrEmpty(float[] a)
a - public static boolean isNullOrEmpty(double[] a)
a - public static boolean isNullOrEmpty(Object[] a)
a - public static boolean isNullOrEmpty(Collection<?> c)
c - public static boolean isNullOrEmpty(Map<?,?> m)
m - public static boolean isNullOrEmpty(Multiset<?> s)
s - public static boolean isNullOrEmpty(Multimap<?,?,?> m)
m - public static boolean isNullOrEmpty(DataSet rs)
rs - public static boolean isNullOrEmptyOrBlank(CharSequence s)
s - public static boolean notNullOrEmpty(CharSequence s)
s - public static boolean notNullOrEmpty(boolean[] a)
a - public static boolean notNullOrEmpty(char[] a)
a - public static boolean notNullOrEmpty(byte[] a)
a - public static boolean notNullOrEmpty(short[] a)
a - public static boolean notNullOrEmpty(int[] a)
a - public static boolean notNullOrEmpty(long[] a)
a - public static boolean notNullOrEmpty(float[] a)
a - public static boolean notNullOrEmpty(double[] a)
a - public static boolean notNullOrEmpty(Object[] a)
a - public static boolean notNullOrEmpty(Collection<?> c)
c - public static boolean notNullOrEmpty(Map<?,?> m)
m - public static boolean notNullOrEmpty(Multiset<?> s)
s - public static boolean notNullOrEmpty(Multimap<?,?,?> m)
m - public static boolean notNullOrEmpty(DataSet rs)
rs - public static boolean notNullOrEmptyOrBlank(CharSequence s)
s - public static void checkIndex(int index,
int length)
throws IndexOutOfBoundsException
index - length - IndexOutOfBoundsException - the index out of bounds exceptionpublic static void checkFromToIndex(int fromIndex,
int toIndex,
int length)
throws IndexOutOfBoundsException
fromIndex - toIndex - length - IndexOutOfBoundsException - the index out of bounds exceptionpublic static void checkFromIndexSize(int fromIndex,
int size,
int length)
throws IndexOutOfBoundsException
fromIndex - the lower-bound (inclusive) of the sub-intervalsize - the size of the sub-rangelength - the upper-bound (exclusive) of the rangeIndexOutOfBoundsException - the index out of bounds exceptionpublic static void checkArgument(boolean expression)
expression - a boolean expressionIllegalArgumentException - if expression is falsepublic static void checkArgument(boolean expression,
String errorMessage)
expression - a boolean expressionerrorMessage - the exception message to use if the check fails; will be converted to a
string using String.valueOf(Object)IllegalArgumentException - if expression is falsepublic static void checkArgument(boolean b,
String errorMessageTemplate,
boolean p)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p - public static void checkArgument(boolean b,
String errorMessageTemplate,
boolean p1,
boolean p2)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - public static void checkArgument(boolean b,
String errorMessageTemplate,
boolean p1,
boolean p2,
boolean p3)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - p3 - public static void checkArgument(boolean b,
String errorMessageTemplate,
char p)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p - public static void checkArgument(boolean b,
String errorMessageTemplate,
byte p)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p - public static void checkArgument(boolean b,
String errorMessageTemplate,
short p)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p - public static void checkArgument(boolean b,
String errorMessageTemplate,
int p)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p - public static void checkArgument(boolean b,
String errorMessageTemplate,
int p1,
int p2)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - public static void checkArgument(boolean b,
String errorMessageTemplate,
int p1,
int p2,
int p3)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - p3 - public static void checkArgument(boolean b,
String errorMessageTemplate,
long p)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p - public static void checkArgument(boolean b,
String errorMessageTemplate,
long p1,
long p2)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - public static void checkArgument(boolean b,
String errorMessageTemplate,
long p1,
long p2,
long p3)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - p3 - public static void checkArgument(boolean b,
String errorMessageTemplate,
float p)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p - public static void checkArgument(boolean b,
String errorMessageTemplate,
float p1,
float p2)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - public static void checkArgument(boolean b,
String errorMessageTemplate,
float p1,
float p2,
float p3)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - p3 - public static void checkArgument(boolean b,
String errorMessageTemplate,
double p)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p - public static void checkArgument(boolean b,
String errorMessageTemplate,
double p1,
double p2)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - public static void checkArgument(boolean b,
String errorMessageTemplate,
double p1,
double p2,
double p3)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - p3 - public static void checkArgument(boolean b,
String errorMessageTemplate,
Object p)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p - public static void checkArgument(boolean b,
String errorMessageTemplate,
Object p1,
Object p2)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - public static void checkArgument(boolean b,
String errorMessageTemplate,
Object p1,
Object p2,
Object p3)
See #checkArgument(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - p3 - public static void checkArgument(boolean b,
Supplier<String> errorMessageSupplier)
E - b - errorMessageSupplier - public static <T> T checkArgNotNull(T obj)
T - obj - IllegalArgumentException - if obj is nullpublic static <T> T checkArgNotNull(T obj,
String errorMessage)
T - obj - errorMessage - IllegalArgumentException - if obj is nullpublic static <T extends CharSequence> T checkArgNotNullOrEmpty(T arg, String argNameOrErrorMsg)
arg is null or empty, and throws IllegalArgumentException if it is.T - arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is null or empty.public static boolean[] checkArgNotNullOrEmpty(boolean[] arg,
String argNameOrErrorMsg)
arg is null or empty, and throws IllegalArgumentException if it is.arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is null or empty.public static char[] checkArgNotNullOrEmpty(char[] arg,
String argNameOrErrorMsg)
arg is null or empty, and throws IllegalArgumentException if it is.arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is null or empty.public static byte[] checkArgNotNullOrEmpty(byte[] arg,
String argNameOrErrorMsg)
arg is null or empty, and throws IllegalArgumentException if it is.arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is null or empty.public static short[] checkArgNotNullOrEmpty(short[] arg,
String argNameOrErrorMsg)
arg is null or empty, and throws IllegalArgumentException if it is.arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is null or empty.public static int[] checkArgNotNullOrEmpty(int[] arg,
String argNameOrErrorMsg)
arg is null or empty, and throws IllegalArgumentException if it is.arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is null or empty.public static long[] checkArgNotNullOrEmpty(long[] arg,
String argNameOrErrorMsg)
arg is null or empty, and throws IllegalArgumentException if it is.arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is null or empty.public static float[] checkArgNotNullOrEmpty(float[] arg,
String argNameOrErrorMsg)
arg is null or empty, and throws IllegalArgumentException if it is.arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is null or empty.public static double[] checkArgNotNullOrEmpty(double[] arg,
String argNameOrErrorMsg)
arg is null or empty, and throws IllegalArgumentException if it is.arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is null or empty.public static <T> T[] checkArgNotNullOrEmpty(T[] arg,
String argNameOrErrorMsg)
arg is null or empty, and throws IllegalArgumentException if it is.T - arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is null or empty.public static <T extends Collection<?>> T checkArgNotNullOrEmpty(T arg, String argNameOrErrorMsg)
arg is null or empty, and throws IllegalArgumentException if it is.T - arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is null or empty.public static <T extends Map<?,?>> T checkArgNotNullOrEmpty(T arg, String argNameOrErrorMsg)
arg is null or empty, and throws IllegalArgumentException if it is.T - arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is null or empty.public static <T extends CharSequence> T checkArgNotNullOrEmptyOrBlank(T arg, String msg)
T - arg - msg - name of parameter or error messageIllegalArgumentException - if the specified parameter is null or empty.public static int checkArgNotNegative(int arg,
String argNameOrErrorMsg)
arg is not negative, and throws IllegalArgumentException if it is.arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is negative.public static long checkArgNotNegative(long arg,
String argNameOrErrorMsg)
arg is not negative, and throws IllegalArgumentException if it is.arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is negative.public static double checkArgNotNegative(double arg,
String argNameOrErrorMsg)
arg is not negative, and throws IllegalArgumentException if it is.arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is negative.public static int checkArgPositive(int arg,
String argNameOrErrorMsg)
arg is positive, and throws IllegalArgumentException if it is not.arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is negative.public static long checkArgPositive(long arg,
String argNameOrErrorMsg)
arg is positive, and throws IllegalArgumentException if it is not.arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is negative.public static double checkArgPositive(double arg,
String argNameOrErrorMsg)
arg is positive, and throws IllegalArgumentException if it is not.arg - argNameOrErrorMsg - IllegalArgumentException - if the specified arg is negative.public static void checkState(boolean expression)
expression - a boolean expressionIllegalStateException - if expression is falsepublic static void checkState(boolean expression,
String errorMessage)
expression - a boolean expressionerrorMessage - the exception message to use if the check fails; will be converted to a
string using String.valueOf(Object)IllegalStateException - if expression is falsepublic static void checkState(boolean b,
String errorMessageTemplate,
int p)
See #checkState(boolean, String, Object...) for details.
b - errorMessageTemplate - p - public static void checkState(boolean b,
String errorMessageTemplate,
int p1,
int p2)
See #checkState(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - public static void checkState(boolean b,
String errorMessageTemplate,
int p1,
int p2,
int p3)
See #checkState(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - p3 - public static void checkState(boolean b,
String errorMessageTemplate,
long p)
See #checkState(boolean, String, Object...) for details.
b - errorMessageTemplate - p - public static void checkState(boolean b,
String errorMessageTemplate,
long p1,
long p2)
See #checkState(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - public static void checkState(boolean b,
String errorMessageTemplate,
long p1,
long p2,
long p3)
See #checkState(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - p3 - public static void checkState(boolean b,
String errorMessageTemplate,
float p)
See #checkState(boolean, String, Object...) for details.
b - errorMessageTemplate - p - public static void checkState(boolean b,
String errorMessageTemplate,
float p1,
float p2)
See #checkState(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - public static void checkState(boolean b,
String errorMessageTemplate,
float p1,
float p2,
float p3)
See #checkState(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - p3 - public static void checkState(boolean b,
String errorMessageTemplate,
double p)
See #checkState(boolean, String, Object...) for details.
b - errorMessageTemplate - p - public static void checkState(boolean b,
String errorMessageTemplate,
double p1,
double p2)
See #checkState(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - public static void checkState(boolean b,
String errorMessageTemplate,
double p1,
double p2,
double p3)
See #checkState(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - p3 - public static void checkState(boolean b,
String errorMessageTemplate,
Object p)
See #checkState(boolean, String, Object...) for details.
b - errorMessageTemplate - p - public static void checkState(boolean b,
String errorMessageTemplate,
Object p1,
Object p2)
See #checkState(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - public static void checkState(boolean b,
String errorMessageTemplate,
Object p1,
Object p2,
Object p3)
See #checkState(boolean, String, Object...) for details.
b - errorMessageTemplate - p1 - p2 - p3 - public static void checkState(boolean b,
Supplier<String> errorMessageSupplier)
E - b - errorMessageSupplier - public static int compare(boolean a,
boolean b)
a - b - public static int compare(byte a,
byte b)
a - b - public static int compare(short a,
short b)
a - b - public static int compare(int a,
int b)
a - b - public static int compare(long a,
long b)
a - b - public static int compare(float a,
float b)
a - b - public static int compare(double a,
double b)
a - b - public static <T extends Comparable<? super T>> int compare(T a, T b)
T - a - b - public static <T> int compare(T a,
T b,
Comparator<? super T> cmp)
c.compare(a, b)
otherwise. Consequently, if both arguments are null 0 is
returned.
Note that if one of the arguments is null, a
NullPointerException may or may not be thrown depending on what
ordering policy, if any, the Comparator chooses to
have for null values.
T - the type of the objects being compareda - an objectb - an object to be compared with acmp - the Comparator to compare the first two argumentsc.compare(a, b)
otherwise.Comparable,
Comparatorpublic static <T1 extends Comparable<T1>,T2 extends Comparable<T2>> int compare(T1 a1, T1 b1, T2 a2, T2 b2)
(a1, b1), (a2, b2) until they're not equal.
0 is returned if all of the pairs of values are equal.T1 - T2 - a1 - b1 - a2 - b2 - public static <T1 extends Comparable<T1>,T2 extends Comparable<T2>,T3 extends Comparable<T3>> int compare(T1 a1, T1 b1, T2 a2, T2 b2, T3 a3, T3 b3)
(a1, b1), (a2, b2), (a3, b3) until they're not equal.
0 is returned if all of the pairs of values are equal.T1 - T2 - T3 - a1 - b1 - a2 - b2 - a3 - b3 - public static <T1 extends Comparable<T1>,T2 extends Comparable<T2>,T3 extends Comparable<T3>,T4 extends Comparable<T4>> int compare(T1 a1, T1 b1, T2 a2, T2 b2, T3 a3, T3 b3, T4 a4, T4 b4)
(a1, b1), (a2, b2), (a3, b3), (a4, b4) until they're not equal.
0 is returned if all of the pairs of values are equal.T1 - T2 - T3 - T4 - a1 - b1 - a2 - b2 - a3 - b3 - a4 - b4 - public static <T1 extends Comparable<T1>,T2 extends Comparable<T2>,T3 extends Comparable<T3>,T4 extends Comparable<T4>,T5 extends Comparable<T5>> int compare(T1 a1, T1 b1, T2 a2, T2 b2, T3 a3, T3 b3, T4 a4, T4 b4, T5 a5, T5 b5)
(a1, b1), (a2, b2), (a3, b3), (a4, b4), (a5, b5) until they're not equal.
0 is returned if all of the pairs of values are equal.T1 - T2 - T3 - T4 - T5 - a1 - b1 - a2 - b2 - a3 - b3 - a4 - b4 - a5 - b5 - public static <T1 extends Comparable<T1>,T2 extends Comparable<T2>,T3 extends Comparable<T3>,T4 extends Comparable<T4>,T5 extends Comparable<T5>,T6 extends Comparable<T6>> int compare(T1 a1, T1 b1, T2 a2, T2 b2, T3 a3, T3 b3, T4 a4, T4 b4, T5 a5, T5 b5, T6 a6, T6 b6)
(a1, b1), (a2, b2), (a3, b3), (a4, b4), (a5, b5), (a6, b6) until they're not equal.
0 is returned if all of the pairs of values are equal.T1 - T2 - T3 - T4 - T5 - T6 - a1 - b1 - a2 - b2 - a3 - b3 - a4 - b4 - a5 - b5 - a6 - b6 - public static <T1 extends Comparable<T1>,T2 extends Comparable<T2>,T3 extends Comparable<T3>,T4 extends Comparable<T4>,T5 extends Comparable<T5>,T6 extends Comparable<T6>,T7 extends Comparable<T7>> int compare(T1 a1, T1 b1, T2 a2, T2 b2, T3 a3, T3 b3, T4 a4, T4 b4, T5 a5, T5 b5, T6 a6, T6 b6, T7 a7, T7 b7)
(a1, b1), (a2, b2), (a3, b3), (a4, b4), (a5, b5), (a6, b6), (a7, b7) until they're not equal.
0 is returned if all of the pairs of values are equal.T1 - T2 - T3 - T4 - T5 - T6 - T7 - a1 - b1 - a2 - b2 - a3 - b3 - a4 - b4 - a5 - b5 - a6 - b6 - a7 - b7 - public static int compare(boolean[] a,
boolean[] b)
a - b - public static int compare(boolean[] a,
int fromIndexA,
boolean[] b,
int fromIndexB,
int len)
a - fromIndexA - b - fromIndexB - len - public static int compare(char[] a,
char[] b)
a - b - public static int compare(char[] a,
int fromIndexA,
char[] b,
int fromIndexB,
int len)
a - fromIndexA - b - fromIndexB - len - public static int compare(byte[] a,
byte[] b)
a - b - public static int compare(byte[] a,
int fromIndexA,
byte[] b,
int fromIndexB,
int len)
a - fromIndexA - b - fromIndexB - len - public static int compare(short[] a,
short[] b)
a - b - public static int compare(short[] a,
int fromIndexA,
short[] b,
int fromIndexB,
int len)
a - fromIndexA - b - fromIndexB - len - public static int compare(int[] a,
int[] b)
a - b - public static int compare(int[] a,
int fromIndexA,
int[] b,
int fromIndexB,
int len)
a - fromIndexA - b - fromIndexB - len - public static int compare(long[] a,
long[] b)
a - b - public static int compare(long[] a,
int fromIndexA,
long[] b,
int fromIndexB,
int len)
a - fromIndexA - b - fromIndexB - len - public static int compare(float[] a,
float[] b)
a - b - public static int compare(float[] a,
int fromIndexA,
float[] b,
int fromIndexB,
int len)
a - fromIndexA - b - fromIndexB - len - public static int compare(double[] a,
double[] b)
a - b - public static int compare(double[] a,
int fromIndexA,
double[] b,
int fromIndexB,
int len)
a - fromIndexA - b - fromIndexB - len - public static <T extends Comparable<? super T>> int compare(T[] a, T[] b)
T - a - b - public static <T extends Comparable<? super T>> int compare(T[] a, int fromIndexA, T[] b, int fromIndexB, int len)
T - a - fromIndexA - b - fromIndexB - len - public static <T> int compare(T[] a,
T[] b,
Comparator<? super T> cmp)
T - a - b - cmp - public static <T> int compare(T[] a,
int fromIndexA,
T[] b,
int fromIndexB,
int len,
Comparator<? super T> cmp)
T - a - fromIndexA - b - fromIndexB - len - cmp - public static <T extends Comparable<? super T>> int compare(Collection<T> a, Collection<T> b)
T - a - b - public static <T> int compare(Collection<T> a, int fromIndexA, Collection<T> b, int fromIndexB, int len)
T - a - fromIndexA - b - fromIndexB - len - public static <T> int compare(Collection<T> a, Collection<T> b, Comparator<? super T> cmp)
T - a - b - cmp - public static <T> int compare(Collection<T> a, int fromIndexA, Collection<T> b, int fromIndexB, int len, Comparator<? super T> cmp)
T - a - fromIndexA - b - fromIndexB - len - cmp - public static int compareIgnoreCase(String a, String b)
a - b - public static <T extends Comparable<? super T>> boolean lessThan(T a, T b)
true is a < b, otherwise false is returned.T - a - b - public static <T extends Comparable<? super T>> boolean lessEqual(T a, T b)
true is a <= b, otherwise false is returned.T - a - b - public static <T extends Comparable<? super T>> boolean greaterThan(T a, T b)
true is a > b, otherwise false is returned.T - a - b - public static <T extends Comparable<? super T>> boolean greaterEqual(T a, T b)
true is a >= b, otherwise false is returned.T - a - b - public static <T extends Comparable<? super T>> boolean gtAndLt(T value, T min, T max)
true is min < value < max, otherwise false is returned.T - value - min - max - public static <T extends Comparable<? super T>> boolean geAndLt(T value, T min, T max)
true is min <= value < max, otherwise false is returned.T - value - min - max - public static <T extends Comparable<? super T>> boolean geAndLe(T value, T min, T max)
true is min <= value <= max, otherwise false is returned.T - value - min - max - public static <T extends Comparable<? super T>> boolean gtAndLe(T value, T min, T max)
true is min < value <= max, otherwise false is returned.T - value - min - max - public static boolean equals(boolean a,
boolean b)
a - b - public static boolean equals(char a,
char b)
a - b - public static boolean equals(byte a,
byte b)
a - b - public static boolean equals(short a,
short b)
a - b - public static boolean equals(int a,
int b)
a - b - public static boolean equals(long a,
long b)
a - b - public static boolean equals(float a,
float b)
a - b - public static boolean equals(double a,
double b)
a - b - public static boolean equalsIgnoreCase(String a, String b)
a - b - public static boolean deepEquals(Object a, Object b)
a - b - public static boolean equals(boolean[] a,
boolean[] b)
a - b - Arrays.equals(boolean[], boolean[])public static boolean equals(boolean[] a,
int fromIndexA,
boolean[] b,
int fromIndexB,
int len)
a - fromIndexA - b - fromIndexB - len - public static boolean equals(char[] a,
char[] b)
a - b - Arrays.equals(char[], char[])public static boolean equals(char[] a,
int fromIndexA,
char[] b,
int fromIndexB,
int len)
a - fromIndexA - b - fromIndexB - len - public static boolean equals(byte[] a,
byte[] b)
a - b - Arrays.equals(byte[], byte[])public static boolean equals(byte[] a,
int fromIndexA,
byte[] b,
int fromIndexB,
int len)
a - fromIndexA - b - fromIndexB - len - public static boolean equals(short[] a,
short[] b)
a - b - Arrays.equals(short[], short[])public static boolean equals(short[] a,
int fromIndexA,
short[] b,
int fromIndexB,
int len)
a - fromIndexA - b - fromIndexB - len - public static boolean equals(int[] a,
int[] b)
a - b - Arrays.equals(int[], int[])public static boolean equals(int[] a,
int fromIndexA,
int[] b,
int fromIndexB,
int len)
a - fromIndexA - b - fromIndexB - len - public static boolean equals(long[] a,
long[] b)
a - b - Arrays.equals(long[], long[])public static boolean equals(long[] a,
int fromIndexA,
long[] b,
int fromIndexB,
int len)
a - fromIndexA - b - fromIndexB - len - public static boolean equals(float[] a,
float[] b)
a - b - Arrays.equals(float[], float[])public static boolean equals(float[] a,
int fromIndexA,
float[] b,
int fromIndexB,
int len)
a - fromIndexA - b - fromIndexB - len - public static boolean equals(double[] a,
double[] b)
a - b - Arrays.equals(double[], double[])public static boolean equals(double[] a,
int fromIndexA,
double[] b,
int fromIndexB,
int len)
a - fromIndexA - b - fromIndexB - len - public static boolean equals(Object[] a, Object[] b)
a - b - Arrays.equals(Object[], Object[])public static boolean equals(Object[] a, int fromIndexA, Object[] b, int fromIndexB, int len)
a - fromIndexA - b - fromIndexB - len - public static boolean deepEquals(Object[] a, Object[] b)
a - b - Arrays.deepEquals(Object[], Object[])public static boolean deepEquals(Object[] a, int fromIndexA, Object[] b, int fromIndexB, int len)
a - fromIndexA - b - fromIndexB - len - public static boolean equalsIgnoreCase(String[] a, String[] b)
a - b - public static boolean equalsIgnoreCase(String[] a, int fromIndexA, String[] b, int fromIndexB, int len)
a - fromIndexA - b - fromIndexB - len - public static int hashCode(boolean value)
value - public static int hashCode(char value)
value - public static int hashCode(byte value)
value - public static int hashCode(short value)
value - public static int hashCode(int value)
value - public static int hashCode(long value)
value - public static int hashCode(float value)
value - public static int hashCode(double value)
value - public static int hashCode(Object obj)
obj - public static int deepHashCode(Object obj)
obj - public static int hashCode(boolean[] a)
a - Arrays.hashCode(boolean[])public static int hashCode(boolean[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static int hashCode(char[] a)
a - Arrays.hashCode(char[])public static int hashCode(char[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static int hashCode(byte[] a)
a - Arrays.hashCode(byte[])public static int hashCode(byte[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static int hashCode(short[] a)
a - Arrays.hashCode(short[])public static int hashCode(short[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static int hashCode(int[] a)
a - Arrays.hashCode(int[])public static int hashCode(int[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static int hashCode(long[] a)
a - Arrays.hashCode(long[])public static int hashCode(long[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static int hashCode(float[] a)
a - Arrays.hashCode(float[])public static int hashCode(float[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static int hashCode(double[] a)
a - Arrays.hashCode(double[])public static int hashCode(double[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static int hashCode(Object[] a)
a - Arrays.hashCode(Object[])public static int hashCode(Object[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static int deepHashCode(Object[] a)
a - Arrays.deepHashCode(Object[])public static int deepHashCode(Object[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static String toString(boolean value)
value - public static String toString(char value)
value - public static String toString(byte value)
value - public static String toString(short value)
value - public static String toString(int value)
value - public static String toString(long value)
value - public static String toString(float value)
value - public static String toString(double value)
value - public static String toString(boolean[] a)
a - Arrays.toString(boolean[])public static String toString(boolean[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static String toString(char[] a)
a - Arrays.toString(char[])public static String toString(char[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static String toString(byte[] a)
a - Arrays.toString(byte[])public static String toString(byte[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static String toString(short[] a)
a - Arrays.toString(short[])public static String toString(short[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static String toString(int[] a)
a - Arrays.toString(int[])public static String toString(int[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static String toString(long[] a)
a - Arrays.toString(long[])public static String toString(long[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static String toString(float[] a)
a - Arrays.toString(float[])public static String toString(float[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static String toString(double[] a)
a - Arrays.toString(double[])public static String toString(double[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static String toString(Object[] a)
a - Arrays.toString(Object[])public static String toString(Object[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static String toString(Object a, String defaultIfNull)
a - defaultIfNull - public static String deepToString(Object[] a)
a - Arrays.deepToString(Object[])public static String deepToString(Object[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static String deepToString(Object[] a, String defaultIfNull)
a - defaultIfNull - public static void reverse(boolean[] a)
Reverses the order of the given array.
a - public static void reverse(boolean[] a,
int fromIndex,
int toIndex)
Reverses the order of the given array in the given range.
a - fromIndex - toIndex - public static void reverse(char[] a)
Reverses the order of the given array.
a - public static void reverse(char[] a,
int fromIndex,
int toIndex)
Reverses the order of the given array in the given range.
a - fromIndex - toIndex - public static void reverse(byte[] a)
Reverses the order of the given array.
a - public static void reverse(byte[] a,
int fromIndex,
int toIndex)
Reverses the order of the given array in the given range.
a - fromIndex - toIndex - public static void reverse(short[] a)
Reverses the order of the given array.
a - public static void reverse(short[] a,
int fromIndex,
int toIndex)
Reverses the order of the given array in the given range.
a - fromIndex - toIndex - public static void reverse(int[] a)
Reverses the order of the given array.
a - public static void reverse(int[] a,
int fromIndex,
int toIndex)
Reverses the order of the given array in the given range.
a - fromIndex - toIndex - public static void reverse(long[] a)
Reverses the order of the given array.
a - public static void reverse(long[] a,
int fromIndex,
int toIndex)
Reverses the order of the given array in the given range.
a - fromIndex - toIndex - public static void reverse(float[] a)
Reverses the order of the given array.
a - public static void reverse(float[] a,
int fromIndex,
int toIndex)
Reverses the order of the given array in the given range.
a - fromIndex - toIndex - public static void reverse(double[] a)
Reverses the order of the given array.
a - public static void reverse(double[] a,
int fromIndex,
int toIndex)
Reverses the order of the given array in the given range.
a - fromIndex - toIndex - public static void reverse(Object[] a)
Reverses the order of the given array.
There is no special handling for multi-dimensional arrays.
a - public static void reverse(Object[] a, int fromIndex, int toIndex)
Reverses the order of the given array in the given range.
a - fromIndex - toIndex - public static void reverse(List<?> list)
list - public static void reverse(List<?> list, int fromIndex, int toIndex)
list - fromIndex - toIndex - public static void reverse(Collection<?> c)
c - public static void rotate(boolean[] a,
int distance)
a - distance - public static void rotate(char[] a,
int distance)
a - distance - public static void rotate(byte[] a,
int distance)
a - distance - public static void rotate(short[] a,
int distance)
a - distance - public static void rotate(int[] a,
int distance)
a - distance - public static void rotate(long[] a,
int distance)
a - distance - public static void rotate(float[] a,
int distance)
a - distance - public static void rotate(double[] a,
int distance)
a - distance - public static void rotate(Object[] a, int distance)
a - distance - public static void rotate(List<?> list, int distance)
list - distance - Collections.rotate(List, int)public static void rotate(Collection<?> c, int distance)
c - distance - public static void shuffle(boolean[] a)
a - public static void shuffle(boolean[] a,
Random rnd)
a - rnd - public static void shuffle(char[] a)
a - public static void shuffle(char[] a,
Random rnd)
a - rnd - public static void shuffle(byte[] a)
a - public static void shuffle(byte[] a,
Random rnd)
a - rnd - public static void shuffle(short[] a)
a - public static void shuffle(short[] a,
Random rnd)
a - rnd - public static void shuffle(int[] a)
a - public static void shuffle(int[] a,
Random rnd)
a - rnd - public static void shuffle(long[] a)
a - public static void shuffle(long[] a,
Random rnd)
a - rnd - public static void shuffle(float[] a)
a - public static void shuffle(float[] a,
Random rnd)
a - rnd - public static void shuffle(double[] a)
a - public static void shuffle(double[] a,
Random rnd)
a - rnd - public static <T> void shuffle(T[] a)
T - a - public static <T> void shuffle(T[] a,
Random rnd)
T - a - rnd - public static void shuffle(List<?> list)
list - public static void shuffle(List<?> list, Random rnd)
list - rnd - Collections.shuffle(List, Random)public static void shuffle(Collection<?> c)
c - public static void shuffle(Collection<?> c, Random rnd)
c - rnd - public static void swap(boolean[] a,
int i,
int j)
a - i - j - public static void swap(char[] a,
int i,
int j)
a - i - j - public static void swap(byte[] a,
int i,
int j)
a - i - j - public static void swap(short[] a,
int i,
int j)
a - i - j - public static void swap(int[] a,
int i,
int j)
a - i - j - public static void swap(long[] a,
int i,
int j)
a - i - j - public static void swap(float[] a,
int i,
int j)
a - i - j - public static void swap(double[] a,
int i,
int j)
a - i - j - public static void swap(Object[] a, int i, int j)
a - i - j - public static void swap(List<?> list, int i, int j)
list - i - j - public static <T> void swap(Pair<T,T> pair)
T - pair - public static <T,E extends Exception> boolean swapIf(Pair<T,T> pair, Throwables.Predicate<? super Pair<T,T>,E> predicate) throws E extends Exception
T - E - pair - predicate - E - the eE extends Exceptionpublic static <T,M> void swap(Triple<T,M,T> triple)
T - M - triple - public static <T,M,E extends Exception> boolean swapIf(Triple<T,M,T> triple, Throwables.Predicate<? super Triple<T,M,T>,E> predicate) throws E extends Exception
T - M - E - triple - predicate - E - the eE extends Exceptionpublic static void fill(boolean[] a,
boolean val)
a - val - public static void fill(boolean[] a,
int fromIndex,
int toIndex,
boolean val)
a - fromIndex - toIndex - val - public static void fill(char[] a,
char val)
a - val - public static void fill(char[] a,
int fromIndex,
int toIndex,
char val)
a - fromIndex - toIndex - val - public static void fill(byte[] a,
byte val)
a - val - public static void fill(byte[] a,
int fromIndex,
int toIndex,
byte val)
a - fromIndex - toIndex - val - public static void fill(short[] a,
short val)
a - val - public static void fill(short[] a,
int fromIndex,
int toIndex,
short val)
a - fromIndex - toIndex - val - public static void fill(int[] a,
int val)
a - val - public static void fill(int[] a,
int fromIndex,
int toIndex,
int val)
a - fromIndex - toIndex - val - public static void fill(long[] a,
long val)
a - val - public static void fill(long[] a,
int fromIndex,
int toIndex,
long val)
a - fromIndex - toIndex - val - public static void fill(float[] a,
float val)
a - val - public static void fill(float[] a,
int fromIndex,
int toIndex,
float val)
a - fromIndex - toIndex - val - public static void fill(double[] a,
double val)
a - val - public static void fill(double[] a,
int fromIndex,
int toIndex,
double val)
a - fromIndex - toIndex - val - public static void fill(Object[] a, int fromIndex, int toIndex, Object val)
a - fromIndex - toIndex - val - public static <T> void fill(List<? super T> list, T val)
T - list - val - public static <T> void fill(List<? super T> list, int fromIndex, int toIndex, T val)
T - list - fromIndex - toIndex - val - public static <T> List<T> repeat(T value, int n)
T - value - n - public static <T> List<T> repeatEach(Collection<T> c, int n)
repeatEach(N.asList(1, 2, 3), 2) => [1, 1, 2, 2, 3, 3]
T - c - n - public static <T> List<T> repeatAll(Collection<T> c, int n)
repeatAll(N.asList(1, 2, 3), 2) => [1, 2, 3, 1, 2, 3]
T - c - n - public static <T> List<T> repeatEachToSize(Collection<T> c, int size)
repeatEachToSize(N.asList(1, 2, 3), 5) => [1, 1, 2, 2, 3]
T - c - size - public static <T> List<T> repeatAllToSize(Collection<T> c, int size)
repeatAllToSize(N.asList(1, 2, 3), 5) => [1, 2, 3, 1, 2]
T - c - size - public static <T> void copy(List<? extends T> src, List<? super T> dest)
This method runs in linear time.
T - src - dest - IndexOutOfBoundsException - if the destination list is too small
to contain the entire source List.UnsupportedOperationException - if the destination list's
list-iterator does not support the set operation.Collections.copy(List, List)public static <T> void copy(List<? extends T> src, int srcPos, List<? super T> dest, int destPos, int length)
T - src - srcPos - dest - destPos - length - public static void copy(boolean[] src,
int srcPos,
boolean[] dest,
int destPos,
int length)
src - srcPos - dest - destPos - length - public static void copy(char[] src,
int srcPos,
char[] dest,
int destPos,
int length)
src - srcPos - dest - destPos - length - public static void copy(byte[] src,
int srcPos,
byte[] dest,
int destPos,
int length)
src - srcPos - dest - destPos - length - public static void copy(short[] src,
int srcPos,
short[] dest,
int destPos,
int length)
src - srcPos - dest - destPos - length - public static void copy(int[] src,
int srcPos,
int[] dest,
int destPos,
int length)
src - srcPos - dest - destPos - length - public static void copy(long[] src,
int srcPos,
long[] dest,
int destPos,
int length)
src - srcPos - dest - destPos - length - public static void copy(float[] src,
int srcPos,
float[] dest,
int destPos,
int length)
src - srcPos - dest - destPos - length - public static void copy(double[] src,
int srcPos,
double[] dest,
int destPos,
int length)
src - srcPos - dest - destPos - length - public static void copy(Object[] src, int srcPos, Object[] dest, int destPos, int length)
src - srcPos - dest - destPos - length - public static void copy(Object src, int srcPos, Object dest, int destPos, int length)
src - srcPos - dest - destPos - length - is calledpublic static boolean[] copyOf(boolean[] original,
int newLength)
original - newLength - Arrays.copyOf(boolean[], int)public static char[] copyOf(char[] original,
int newLength)
original - newLength - Arrays.copyOf(char[], int)public static byte[] copyOf(byte[] original,
int newLength)
original - newLength - Arrays.copyOf(byte[], int)public static short[] copyOf(short[] original,
int newLength)
original - newLength - Arrays.copyOf(short[], int)public static int[] copyOf(int[] original,
int newLength)
original - newLength - Arrays.copyOf(int[], int)public static long[] copyOf(long[] original,
int newLength)
original - newLength - Arrays.copyOf(long[], int)public static float[] copyOf(float[] original,
int newLength)
original - newLength - Arrays.copyOf(float[], int)public static double[] copyOf(double[] original,
int newLength)
original - newLength - Arrays.copyOf(double[], int)public static <T> T[] copyOf(T[] original,
int newLength)
T - original - newLength - Arrays.copyOf(Object[], int)public static <T,U> T[] copyOf(U[] original,
int newLength,
Class<? extends T[]> newType)
T - U - original - newLength - newType - Arrays.copyOf(Object[], int, Class)public static boolean[] copyOfRange(boolean[] original,
int fromIndex,
int toIndex)
original - fromIndex - toIndex - Arrays.copyOfRange(boolean[], int, int)public static boolean[] copyOfRange(boolean[] original,
int fromIndex,
int toIndex,
int step)
original, through to-from, by step.original - fromIndex - toIndex - step - CommonUtil.copyOfRange(int[], int, int, int)public static char[] copyOfRange(char[] original,
int fromIndex,
int toIndex)
original - fromIndex - toIndex - Arrays.copyOfRange(char[], int, int)public static char[] copyOfRange(char[] original,
int fromIndex,
int toIndex,
int step)
original, through to-from, by step.original - fromIndex - toIndex - step - CommonUtil.copyOfRange(int[], int, int, int)public static byte[] copyOfRange(byte[] original,
int fromIndex,
int toIndex)
original - fromIndex - toIndex - Arrays.copyOfRange(byte[], int, int)public static byte[] copyOfRange(byte[] original,
int fromIndex,
int toIndex,
int step)
original, through to-from, by step.original - fromIndex - toIndex - step - CommonUtil.copyOfRange(int[], int, int, int)public static short[] copyOfRange(short[] original,
int fromIndex,
int toIndex)
original - fromIndex - toIndex - Arrays.copyOfRange(short[], int, int)public static short[] copyOfRange(short[] original,
int fromIndex,
int toIndex,
int step)
original, through to-from, by step.original - fromIndex - toIndex - step - CommonUtil.copyOfRange(int[], int, int, int)public static int[] copyOfRange(int[] original,
int fromIndex,
int toIndex)
original - fromIndex - toIndex - Arrays.copyOfRange(int[], int, int)public static int[] copyOfRange(int[] original,
int fromIndex,
int toIndex,
int step)
original, through to-from, by step.
int[] a = { 0, 1, 2, 3, 4, 5 };
N.copyOfRange(a, 1, 5, 1)); // [1, 2, 3, 4]
N.copyOfRange(a, 1, 5, 2); // [1, 3]
N.copyOfRange(a, 5, 1, -1); // [5, 4, 3, 2]
N.copyOfRange(a, 5, 1, -2); // [5, 3]
N.copyOfRange(a, 5, -1, -1); // [5, 4, 3, 2, 1, 0]
N.copyOfRange(a, 6, -1, -1); // [5, 4, 3, 2, 1, 0]
original - fromIndex - toIndex - step - public static long[] copyOfRange(long[] original,
int fromIndex,
int toIndex)
original - fromIndex - toIndex - Arrays.copyOfRange(long[], int, int)public static long[] copyOfRange(long[] original,
int fromIndex,
int toIndex,
int step)
original, through to-from, by step.original - fromIndex - toIndex - step - CommonUtil.copyOfRange(int[], int, int, int)public static float[] copyOfRange(float[] original,
int fromIndex,
int toIndex)
original - fromIndex - toIndex - Arrays.copyOfRange(float[], int, int)public static float[] copyOfRange(float[] original,
int fromIndex,
int toIndex,
int step)
original, through to-from, by step.original - fromIndex - toIndex - step - CommonUtil.copyOfRange(int[], int, int, int)public static double[] copyOfRange(double[] original,
int fromIndex,
int toIndex)
original - fromIndex - toIndex - Arrays.copyOfRange(double[], int, int)public static double[] copyOfRange(double[] original,
int fromIndex,
int toIndex,
int step)
original, through to-from, by step.original - fromIndex - toIndex - step - CommonUtil.copyOfRange(int[], int, int, int)public static <T> T[] copyOfRange(T[] original,
int fromIndex,
int toIndex)
T - original - fromIndex - toIndex - Arrays#copyOfRange(T[], int, int)public static <T> T[] copyOfRange(T[] original,
int fromIndex,
int toIndex,
int step)
original, through to-from, by step.T - original - fromIndex - toIndex - step - public static <T,U> T[] copyOfRange(U[] original,
int fromIndex,
int toIndex,
Class<? extends T[]> newType)
T - U - original - fromIndex - toIndex - newType - public static <T> T[] copyOfRange(T[] original,
int fromIndex,
int toIndex,
int step,
Class<? extends T[]> newType)
original, through to-from, by step.T - original - fromIndex - toIndex - step - newType - CommonUtil.copyOfRange(int[], int, int, int)public static <T> List<T> copyOfRange(List<T> c, int fromIndex, int toIndex)
T - c - fromIndex - toIndex - Arrays#copyOfRange(T[], int, int)public static <T> List<T> copyOfRange(List<T> c, int fromIndex, int toIndex, int step)
original, through to-from, by step.T - c - fromIndex - toIndex - step - public static String copyOfRange(String str, int fromIndex, int toIndex)
str - fromIndex - toIndex - public static String copyOfRange(String str, int fromIndex, int toIndex, int step)
str - fromIndex - toIndex - step - CommonUtil.copyOfRange(int[], int, int, int)public static boolean[] clone(boolean[] original)
null is returned if the input array is null.original - public static char[] clone(char[] original)
null is returned if the input array is null.original - public static byte[] clone(byte[] original)
null is returned if the input array is null.original - public static short[] clone(short[] original)
null is returned if the input array is null.original - public static int[] clone(int[] original)
null is returned if the input array is null.original - public static long[] clone(long[] original)
null is returned if the input array is null.original - public static float[] clone(float[] original)
null is returned if the input array is null.original - public static double[] clone(double[] original)
null is returned if the input array is null.original - public static <T> T[] clone(T[] original)
null is returned if the input array is null.T - original - public static boolean[][] clone(boolean[][] original)
null is returned if the input array is null.original - public static char[][] clone(char[][] original)
null is returned if the input array is null.original - public static byte[][] clone(byte[][] original)
null is returned if the input array is null.original - public static short[][] clone(short[][] original)
null is returned if the input array is null.original - public static int[][] clone(int[][] original)
null is returned if the input array is null.original - public static long[][] clone(long[][] original)
null is returned if the input array is null.original - public static float[][] clone(float[][] original)
null is returned if the input array is null.original - public static double[][] clone(double[][] original)
null is returned if the input array is null.original - public static <T> T[][] clone(T[][] original)
null is returned if the input array is null.T - original - public static boolean[][][] clone(boolean[][][] original)
null is returned if the input array is null.original - public static char[][][] clone(char[][][] original)
null is returned if the input array is null.original - public static byte[][][] clone(byte[][][] original)
null is returned if the input array is null.original - public static short[][][] clone(short[][][] original)
null is returned if the input array is null.original - public static int[][][] clone(int[][][] original)
null is returned if the input array is null.original - public static long[][][] clone(long[][][] original)
null is returned if the input array is null.original - public static float[][][] clone(float[][][] original)
null is returned if the input array is null.original - public static double[][][] clone(double[][][] original)
null is returned if the input array is null.original - public static <T> T[][][] clone(T[][][] original)
null is returned if the input array is null.T - original - public static <T> T[] copy(Class<T[]> newType, Object[] a)
T - newType - a - public static <T> T[][] copy(Class<T[][]> newType, Object[][] a)
T - newType - a - public static <T> T[][][] copy(Class<T[][][]> newType, Object[][][] a)
T - newType - a - public static boolean isSorted(boolean[] a)
public static boolean isSorted(boolean[] a,
int fromIndex,
int toIndex)
public static boolean isSorted(char[] a)
public static boolean isSorted(char[] a,
int fromIndex,
int toIndex)
public static boolean isSorted(byte[] a)
public static boolean isSorted(byte[] a,
int fromIndex,
int toIndex)
public static boolean isSorted(short[] a)
public static boolean isSorted(short[] a,
int fromIndex,
int toIndex)
public static boolean isSorted(int[] a)
public static boolean isSorted(int[] a,
int fromIndex,
int toIndex)
public static boolean isSorted(long[] a)
public static boolean isSorted(long[] a,
int fromIndex,
int toIndex)
public static boolean isSorted(float[] a)
public static boolean isSorted(float[] a,
int fromIndex,
int toIndex)
public static boolean isSorted(double[] a)
public static boolean isSorted(double[] a,
int fromIndex,
int toIndex)
public static <T extends Comparable<? super T>> boolean isSorted(T[] a)
public static <T extends Comparable<? super T>> boolean isSorted(T[] a, int fromIndex, int toIndex)
public static <T> boolean isSorted(T[] a,
Comparator<? super T> cmp)
public static <T> boolean isSorted(T[] a,
int fromIndex,
int toIndex,
Comparator<? super T> cmp)
public static <T extends Comparable<? super T>> boolean isSorted(Collection<T> c)
public static <T extends Comparable<? super T>> boolean isSorted(Collection<T> c, int fromIndex, int toIndex)
public static <T> boolean isSorted(Collection<T> c, Comparator<? super T> cmp)
public static <T> boolean isSorted(Collection<T> c, int fromIndex, int toIndex, Comparator<? super T> cmp)
public static void sort(boolean[] a)
a - public static void sort(char[] a)
a - public static void sort(char[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static void sort(byte[] a)
a - public static void sort(byte[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static void sort(short[] a)
a - public static void sort(short[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static void sort(int[] a)
a - public static void sort(int[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static void sort(long[] a)
a - public static void sort(long[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static void sort(float[] a)
a - public static void sort(float[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static void sort(double[] a)
a - public static void sort(double[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static void sort(Object[] a)
a - public static void sort(Object[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static <T> void sort(T[] a,
Comparator<? super T> cmp)
T - a - cmp - public static <T> void sort(T[] a,
int fromIndex,
int toIndex,
Comparator<? super T> cmp)
T - a - fromIndex - toIndex - cmp - public static <T extends Comparable<? super T>> void sort(List<? extends T> list)
T - list - public static <T extends Comparable<? super T>> void sort(List<? extends T> list, int fromIndex, int toIndex)
T - list - fromIndex - toIndex - public static <T> void sort(List<? extends T> list, Comparator<? super T> cmp)
T - list - cmp - public static <T> void sort(List<? extends T> list, int fromIndex, int toIndex, Comparator<? super T> cmp)
T - list - fromIndex - toIndex - cmp - public static <T,U extends Comparable<? super U>> void sortBy(T[] a, Function<? super T,? extends U> keyMapper)
T - U - a - keyMapper - public static <T,U extends Comparable<? super U>> void sortBy(List<? extends T> list, Function<? super T,? extends U> keyMapper)
T - U - list - keyMapper - public static <T> void sortByInt(T[] a,
ToIntFunction<? super T> keyMapper)
T - a - keyMapper - public static <T> void sortByInt(List<? extends T> list, ToIntFunction<? super T> keyMapper)
T - list - keyMapper - public static <T> void sortByLong(T[] a,
ToLongFunction<? super T> keyMapper)
T - a - keyMapper - public static <T> void sortByLong(List<? extends T> list, ToLongFunction<? super T> keyMapper)
T - list - keyMapper - public static <T> void sortByFloat(T[] a,
ToFloatFunction<? super T> keyMapper)
T - a - keyMapper - public static <T> void sortByFloat(List<? extends T> c, ToFloatFunction<? super T> keyMapper)
T - c - keyMapper - public static <T> void sortByDouble(T[] a,
ToDoubleFunction<? super T> keyMapper)
T - a - keyMapper - public static <T> void sortByDouble(List<? extends T> list, ToDoubleFunction<? super T> keyMapper)
T - list - keyMapper - public static void reverseSort(boolean[] a)
a - public static void reverseSort(char[] a)
a - public static void reverseSort(char[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static void reverseSort(byte[] a)
a - public static void reverseSort(byte[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static void reverseSort(short[] a)
a - public static void reverseSort(short[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static void reverseSort(int[] a)
a - public static void reverseSort(int[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static void reverseSort(long[] a)
a - public static void reverseSort(long[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static void reverseSort(float[] a)
a - public static void reverseSort(float[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static void reverseSort(double[] a)
a - public static void reverseSort(double[] a,
int fromIndex,
int toIndex)
a - fromIndex - toIndex - public static void reverseSort(Object[] a)
a - public static void reverseSort(Object[] a, int fromIndex, int toIndex)
a - fromIndex - toIndex - public static <T extends Comparable<? super T>> void reverseSort(List<? extends T> list)
T - list - public static <T extends Comparable<? super T>> void reverseSort(List<? extends T> list, int fromIndex, int toIndex)
T - list - fromIndex - toIndex - public static <T,U extends Comparable<? super U>> void reverseSortBy(T[] a, Function<? super T,? extends U> keyMapper)
T - U - a - keyMapper - public static <T,U extends Comparable<? super U>> void reverseSortBy(List<? extends T> list, Function<? super T,? extends U> keyMapper)
T - U - list - keyMapper - public static int binarySearch(char[] a,
char valueToFind)
a - valueToFind - public static int binarySearch(char[] a,
int fromIndex,
int toIndex,
char valueToFind)
a - fromIndex - toIndex - valueToFind - public static int binarySearch(byte[] a,
byte valueToFind)
a - valueToFind - public static int binarySearch(byte[] a,
int fromIndex,
int toIndex,
byte valueToFind)
a - fromIndex - toIndex - valueToFind - public static int binarySearch(short[] a,
short valueToFind)
a - valueToFind - public static int binarySearch(short[] a,
int fromIndex,
int toIndex,
short valueToFind)
a - fromIndex - toIndex - valueToFind - public static int binarySearch(int[] a,
int valueToFind)
a - valueToFind - public static int binarySearch(int[] a,
int fromIndex,
int toIndex,
int valueToFind)
a - fromIndex - toIndex - valueToFind - public static int binarySearch(long[] a,
long valueToFind)
a - valueToFind - public static int binarySearch(long[] a,
int fromIndex,
int toIndex,
long valueToFind)
a - fromIndex - toIndex - valueToFind - public static int binarySearch(float[] a,
float valueToFind)
a - valueToFind - public static int binarySearch(float[] a,
int fromIndex,
int toIndex,
float valueToFind)
a - fromIndex - toIndex - valueToFind - public static int binarySearch(double[] a,
double valueToFind)
a - valueToFind - public static int binarySearch(double[] a,
int fromIndex,
int toIndex,
double valueToFind)
a - fromIndex - toIndex - valueToFind - public static int binarySearch(Object[] a, Object valueToFind)
a - valueToFind - public static int binarySearch(Object[] a, int fromIndex, int toIndex, Object valueToFind)
a - fromIndex - toIndex - valueToFind - public static <T> int binarySearch(T[] a,
T valueToFind,
Comparator<? super T> cmp)
T - a - valueToFind - cmp - public static <T> int binarySearch(T[] a,
int fromIndex,
int toIndex,
T valueToFind,
Comparator<? super T> cmp)
T - a - fromIndex - toIndex - valueToFind - cmp - public static <T extends Comparable<? super T>> int binarySearch(List<? extends T> list, T valueToFind)
T - list - valueToFind - public static <T extends Comparable<? super T>> int binarySearch(List<? extends T> list, int fromIndex, int toIndex, T valueToFind)
T - list - fromIndex - toIndex - valueToFind - public static <T> int binarySearch(List<? extends T> list, T valueToFind, Comparator<? super T> cmp)
T - list - valueToFind - cmp - public static <T> int binarySearch(List<? extends T> list, int fromIndex, int toIndex, T valueToFind, Comparator<? super T> cmp)
T - list - fromIndex - toIndex - valueToFind - cmp - Collections.binarySearch(List, Object, Comparator)public static <T,U extends Comparable<? super U>> int binarySearchBy(T[] a, T valueToFind, Function<? super T,? extends U> valueToFindMapper)
T - U - a - valueToFind - valueToFindMapper - public static <T,U extends Comparable<? super U>> int binarySearchBy(List<? extends T> list, T valueToFind, Function<? super T,? extends U> valueToFindMapper)
T - U - list - valueToFind - valueToFindMapper - public static int indexOf(boolean[] a,
boolean valueToFind)
a - valueToFind - public static int indexOf(boolean[] a,
int startIndex,
boolean valueToFind)
a - startIndex - the index from which to start the search.valueToFind - public static int indexOf(char[] a,
char valueToFind)
a - valueToFind - public static int indexOf(char[] a,
int startIndex,
char valueToFind)
a - startIndex - the index from which to start the search.valueToFind - public static int indexOf(byte[] a,
byte valueToFind)
a - valueToFind - public static int indexOf(byte[] a,
int startIndex,
byte valueToFind)
a - startIndex - the index from which to start the search.valueToFind - public static int indexOf(short[] a,
short valueToFind)
a - valueToFind - public static int indexOf(short[] a,
int startIndex,
short valueToFind)
a - startIndex - the index from which to start the search.valueToFind - public static int indexOf(int[] a,
int valueToFind)
a - valueToFind - public static int indexOf(int[] a,
int startIndex,
int valueToFind)
a - startIndex - the index from which to start the search.valueToFind - public static int indexOf(long[] a,
long valueToFind)
a - valueToFind - public static int indexOf(long[] a,
int startIndex,
long valueToFind)
a - startIndex - the index from which to start the search.valueToFind - public static int indexOf(float[] a,
float valueToFind)
a - valueToFind - public static int indexOf(float[] a,
int startIndex,
float valueToFind)
a - startIndex - the index from which to start the search.valueToFind - public static int indexOf(double[] a,
double valueToFind)
a - valueToFind - public static int indexOf(double[] a,
int startIndex,
double valueToFind)
a - startIndex - the index from which to start the search.valueToFind - public static int indexOf(double[] a,
double valueToFind,
double tolerance)
Finds the index of the given value within a given tolerance in the array. This method will return the index of the first value which falls between the region defined by valueToFind - tolerance and valueToFind + tolerance.
This method returns INDEX_NOT_FOUND (-1) for a null input array.
a - the array to search through for the object, may be nullvalueToFind - the value to findtolerance - tolerance of the searchINDEX_NOT_FOUND (-1) if not found or null array inputpublic static int indexOf(double[] a,
int startIndex,
double valueToFind,
double tolerance)
Finds the index of the given value in the array starting at the given index. This method will return the index of the first value which falls between the region defined by valueToFind - tolerance and valueToFind + tolerance.
This method returns INDEX_NOT_FOUND (-1) for a null input array.
A negative startIndex is treated as zero. A startIndex larger than the array
length will return INDEX_NOT_FOUND (-1).
a - the array to search through for the object, may be nullvalueToFind - the value to findstartIndex - the index to start searching attolerance - tolerance of the searchINDEX_NOT_FOUND (-1) if not found or null array inputpublic static int indexOf(Object[] a, Object valueToFind)
a - valueToFind - public static int indexOf(Object[] a, int startIndex, Object valueToFind)
a - startIndex - the index from which to start the search.valueToFind - public static int indexOf(Collection<?> c, Object valueToFind)
c - valueToFind - public static int indexOf(Collection<?> c, int startIndex, Object valueToFind)
list - startIndex - the index from which to start the search.valueToFind - public static int indexOfSubList(List<?> sourceList, List<?> subListToFind)
sourceList - subListToFind - Collections.indexOfSubList(List, List)public static int lastIndexOf(boolean[] a,
boolean valueToFind)
a - valueToFind - public static int lastIndexOf(boolean[] a,
int startIndexFromBack,
boolean valueToFind)
a - startIndexFromBack - the start index to traverse backwards fromvalueToFind - public static int lastIndexOf(char[] a,
char valueToFind)
a - valueToFind - public static int lastIndexOf(char[] a,
int startIndexFromBack,
char valueToFind)
a - startIndexFromBack - the start index to traverse backwards fromvalueToFind - public static int lastIndexOf(byte[] a,
byte valueToFind)
a - valueToFind - public static int lastIndexOf(byte[] a,
int startIndexFromBack,
byte valueToFind)
a - startIndexFromBack - the start index to traverse backwards fromvalueToFind - public static int lastIndexOf(short[] a,
short valueToFind)
a - valueToFind - public static int lastIndexOf(short[] a,
int startIndexFromBack,
short valueToFind)
a - startIndexFromBack - the start index to traverse backwards fromvalueToFind - public static int lastIndexOf(int[] a,
int valueToFind)
a - valueToFind - public static int lastIndexOf(int[] a,
int startIndexFromBack,
int valueToFind)
a - startIndexFromBack - the start index to traverse backwards fromvalueToFind - public static int lastIndexOf(long[] a,
long valueToFind)
a - valueToFind - public static int lastIndexOf(long[] a,
int startIndexFromBack,
long valueToFind)
a - startIndexFromBack - the start index to traverse backwards fromvalueToFind - public static int lastIndexOf(float[] a,
float valueToFind)
a - valueToFind - public static int lastIndexOf(float[] a,
int startIndexFromBack,
float valueToFind)
a - startIndexFromBack - the start index to traverse backwards fromvalueToFind - public static int lastIndexOf(double[] a,
double valueToFind)
a - valueToFind - public static int lastIndexOf(double[] a,
int startIndexFromBack,
double valueToFind)
a - startIndexFromBack - the start index to traverse backwards fromvalueToFind - public static int lastIndexOf(double[] a,
double valueToFind,
double tolerance)
Finds the last index of the given value within a given tolerance in the array. This method will return the index of the last value which falls between the region defined by valueToFind - tolerance and valueToFind + tolerance.
This method returns INDEX_NOT_FOUND (-1) for a null input array.
a - the array to search through for the object, may be nullvalueToFind - the value to findtolerance - tolerance of the searchINDEX_NOT_FOUND (-1) if not found or null array inputpublic static int lastIndexOf(double[] a,
int startIndexFromBack,
double valueToFind,
double tolerance)
Finds the last index of the given value in the array starting at the given index. This method will return the index of the last value which falls between the region defined by valueToFind - tolerance and valueToFind + tolerance.
This method returns INDEX_NOT_FOUND (-1) for a null input array.
A negative startIndex will return INDEX_NOT_FOUND (-1). A startIndex larger than the
array length will search from the end of the array.
a - the array to traverse for looking for the object, may be nullvalueToFind - the value to findstartIndexFromBack - the start index to traverse backwards fromtolerance - search for value within plus/minus this amountINDEX_NOT_FOUND (-1) if not found or null array inputpublic static int lastIndexOf(Object[] a, Object valueToFind)
a - valueToFind - public static int lastIndexOf(Object[] a, int startIndexFromBack, Object valueToFind)
a - startIndexFromBack - the start index to traverse backwards fromvalueToFind - public static int lastIndexOf(Collection<?> c, Object valueToFind)
c - valueToFind - public static int lastIndexOf(Collection<?> c, int startIndexFromBack, Object valueToFind)
c - startIndexFromBack - the start index to traverse backwards fromvalueToFind - public static int lastIndexOfSubList(List<?> sourceList, List<?> subListToFind)
sourceList - subListToFind - Collections.lastIndexOfSubList(List, List)public static <T,E extends Exception> u.OptionalInt findFirstIndex(T[] a, Throwables.Predicate<? super T,E> predicate) throws E extends Exception
T - the generic typeE - the element typea - the apredicate - the predicateE - the eE extends Exceptionpublic static <T,E extends Exception> u.OptionalInt findFirstIndex(Collection<? extends T> c, Throwables.Predicate<? super T,E> predicate) throws E extends Exception
T - the generic typeE - the element typec - the cpredicate - the predicateE - the eE extends Exceptionpublic static <T,E extends Exception> u.OptionalInt findLastIndex(T[] a, Throwables.Predicate<? super T,E> predicate) throws E extends Exception
T - the generic typeE - the element typea - the apredicate - the predicateE - the eE extends Exceptionpublic static <T,E extends Exception> u.OptionalInt findLastIndex(Collection<? extends T> c, Throwables.Predicate<? super T,E> predicate) throws E extends Exception
T - the generic typeE - the element typec - the cpredicate - the predicateE - the eE extends ExceptionCopyright © 2021. All rights reserved.