Class N
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... -
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean[]
An empty immutableboolean
array.static final Boolean[]
An empty immutableBoolean
array.static final byte[]
An empty immutablebyte
array.static final Byte[]
An empty immutableByte
array.static final char[]
An empty immutablechar
array.static final Character[]
An empty immutableCharacter
array.static final Date[]
An empty immutableDate
array.static final double[]
An empty immutabledouble
array.static final Double[]
An empty immutableDouble
array.static final float[]
An empty immutablefloat
array.static final Float[]
An empty immutableFloat
array.static final int[]
An empty immutableint
array.static final Integer[]
An empty immutableInteger
array.static final long[]
An empty immutablelong
array.static final Long[]
An empty immutableLong
array.static final Object[]
An empty immutableObject
array.static final short[]
An empty immutableshort
array.static final Short[]
An empty immutableShort
array.static final String
static final String[]
An empty immutableString
array.static final int
The index value when an element is not found in a list or array:-1
. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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[]
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 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[]
Adds all the elementToAdds of the given arrays into a new array.static <T> boolean
addAll
(Collection<T> c, Iterator<? extends T> elementsToAdd) static <T> boolean
addAll
(Collection<T> c, T... elementsToAdd) static <T> T[]
addAll
(T[] a, T... elementsToAdd) Adds all the elementToAdds of the given arrays into a new array.static boolean
allFalse
(boolean[] a) static <T,
E extends Exception>
booleanallMatch
(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter) static <T,
E extends Exception>
booleanallMatch
(Iterator<? extends T> iter, Throwables.Predicate<? super T, E> filter) static <T,
E extends Exception>
booleanallMatch
(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<?>>
booleanallNullOrEmpty
(T a, T b) static <T extends Collection<?>>
booleanallNullOrEmpty
(T a, T b, T c) static boolean
allTrue
(boolean[] a) static boolean
anyFalse
(boolean[] a) static <T,
E extends Exception>
booleananyMatch
(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter) static <T,
E extends Exception>
booleananyMatch
(Iterator<? extends T> iter, Throwables.Predicate<? super T, E> filter) static <T,
E extends Exception>
booleananyMatch
(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
Any null or empty.static boolean
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<?>>
booleananyNullOrEmpty
(T a, T b) static <T extends Collection<?>>
booleananyNullOrEmpty
(T a, T b, T c) static boolean
anyTrue
(boolean[] a) static <T,
E extends Exception>
voidapplyToEach
(List<T> c, Throwables.Function<? super T, ? extends T, E> converter) static <T,
E extends Exception>
voidapplyToEach
(T[] a, Throwables.Function<? super T, ? extends T, E> converter) Updates each element in the specified arraya
with specified functionconverter
.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>
DelayQueue<T>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
(Object... a) Deprecated.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 <T> Set<T>
asLinkedHashSet
(T e) As linked linked hash set.static <T> Set<T>
asLinkedHashSet
(T... a) As 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 e) As linked list.static <T> LinkedList<T>
asLinkedList
(T... a) 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 e) static <T> List<T>
asList
(T... a) 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> Deprecated.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 <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.Deprecated.asProps
(String propName1, Object propValue1, String propName2, Object propValue2, String propName3, Object propValue3) asProps
(String propName1, Object propValue1, String propName2, Object propValue2, String propName3, Object propValue3, String propName4, Object propValue4) 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 e) static <T> Set<T>
asSet
(T... a) 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 ContinuableFuture<Void>
asyncExecute
(Throwables.Runnable<? extends Exception> command) static List<ContinuableFuture<Void>>
asyncExecute
(Throwables.Runnable<? extends Exception>... commands) static ContinuableFuture<Void>
asyncExecute
(Throwables.Runnable<? extends Exception> cmd, int retryTimes, long retryIntervalInMillis, Predicate<? super Exception> retryCondition) static ContinuableFuture<Void>
asyncExecute
(Throwables.Runnable<? extends Exception> command, long delayInMillis) static ContinuableFuture<Void>
asyncExecute
(Throwables.Runnable<? extends Exception> command, Executor executor) static <R> List<ContinuableFuture<R>>
asyncExecute
(Collection<? extends Callable<R>> commands) static <R> ContinuableFuture<R>
asyncExecute
(Callable<R> command) static <R> List<ContinuableFuture<R>>
asyncExecute
(Callable<R>... commands) static <R> ContinuableFuture<R>
asyncExecute
(Callable<R> cmd, int retryTimes, long retryIntervalInMillis, BiPredicate<? super R, ? super Exception> retryCondition) static <R> ContinuableFuture<R>
asyncExecute
(Callable<R> command, long delayInMillis) static <R> ContinuableFuture<R>
asyncExecute
(Callable<R> command, Executor executor) static List<ContinuableFuture<Void>>
asyncExecute
(List<? extends Throwables.Runnable<? extends Exception>> commands) static double
average
(byte... a) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static double
average
(byte[] a, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static double
average
(char... a) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static double
average
(char[] a, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static double
average
(double... a) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static double
average
(double[] a, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static double
average
(float... a) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static double
average
(float[] a, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static double
average
(int... a) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static double
average
(int[] a, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static double
average
(long... a) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static double
average
(long[] a, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static double
average
(short... a) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static double
average
(short[] a, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static BigDecimal
averageBigDecimal
(Iterable<? extends BigDecimal> c) static <T,
E extends Exception>
BigDecimalaverageBigDecimal
(Iterable<? extends T> c, Throwables.Function<? super T, BigDecimal, E> func) static BigDecimal
averageBigInteger
(Iterable<? extends BigInteger> c) static <T,
E extends Exception>
BigDecimalaverageBigInteger
(Iterable<? extends T> c, Throwables.Function<? super T, BigInteger, E> func) static <T extends Number>
doubleaverageDouble
(Iterable<? extends T> c) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
doubleaverageDouble
(Iterable<? extends T> c, Throwables.ToDoubleFunction<? super T, E> func) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
doubleaverageDouble
(Collection<? extends T> c, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
doubleaverageDouble
(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T, E> func) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
doubleaverageDouble
(T[] a) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
doubleaverageDouble
(T[] a, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
doubleaverageDouble
(T[] a, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T, E> func) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
doubleaverageDouble
(T[] a, Throwables.ToDoubleFunction<? super T, E> func) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
doubleaverageInt
(Iterable<? extends T> c) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
doubleaverageInt
(Iterable<? extends T> c, Throwables.ToIntFunction<? super T, E> func) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
doubleaverageInt
(Collection<? extends T> c, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
doubleaverageInt
(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T, E> func) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
doubleaverageInt
(T[] a) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
doubleaverageInt
(T[] a, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
doubleaverageInt
(T[] a, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T, E> func) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
doubleaverageInt
(T[] a, Throwables.ToIntFunction<? super T, E> func) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
doubleaverageLong
(Iterable<? extends T> c) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
doubleaverageLong
(Iterable<? extends T> c, Throwables.ToLongFunction<? super T, E> func) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
doubleaverageLong
(Collection<? extends T> c, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
doubleaverageLong
(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T, E> func) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
doubleaverageLong
(T[] a) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
doubleaverageLong
(T[] a, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
doubleaverageLong
(T[] a, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T, E> func) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
doubleaverageLong
(T[] a, Throwables.ToLongFunction<? super T, E> func) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == 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
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 <T extends Comparable<? super T>>
booleanbetween
(T value, T min, T max) Deprecated.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 int
binarySearch
(long[] a, int fromIndex, int toIndex, long valueToFind) static int
binarySearch
(long[] a, long valueToFind) static int
binarySearch
(short[] a, int fromIndex, int toIndex, short valueToFind) static int
binarySearch
(short[] a, short valueToFind) static int
binarySearch
(Object[] a, int fromIndex, int toIndex, Object valueToFind) static int
binarySearch
(Object[] a, Object valueToFind) static <T extends Comparable<? super T>>
intbinarySearch
(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>>
intbinarySearch
(List<? extends T> list, T valueToFind) static <T> int
binarySearch
(List<? extends T> list, T valueToFind, Comparator<? super T> cmp) 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>>
intbinarySearchBy
(List<? extends T> list, T valueToFind, Function<? super T, ? extends U> valueToFindMapper) Binary search by.static <T,
U extends Comparable<? super U>>
intbinarySearchBy
(T[] a, T valueToFind, Function<? super T, ? extends U> valueToFindMapper) Binary search by.static void
bucketSort
(double[] a) static void
bucketSort
(double[] a, int fromIndex, int toIndex) static void
bucketSort
(float[] a) static void
bucketSort
(float[] a, int fromIndex, int toIndex) static void
bucketSort
(int[] a) static void
bucketSort
(int[] a, int fromIndex, int toIndex) static void
bucketSort
(long[] a) static void
bucketSort
(long[] a, int fromIndex, int toIndex) static void
bucketSort
(Object[] a) Note: All the objects with same value will be replaced by first element with the same value.static void
bucketSort
(Object[] a, int fromIndex, int toIndex) Note: All the objects with same value will be replaced by first element with the same value.static <T> void
bucketSort
(List<? extends T> list, int fromIndex, int toIndex, Comparator<? super T> cmp) Note: All the objects with same value will be replaced by first element with the same value.static <T> void
bucketSort
(List<? extends T> list, Comparator<? super T> cmp) Note: All the objects with same value will be replaced by first element with the same value.static <T extends Comparable<? super T>>
voidbucketSort
(List<T> list) Note: All the objects with same value will be replaced by first element with the same value.static <T extends Comparable<? super T>>
voidbucketSort
(List<T> list, int fromIndex, int toIndex) Note: All the objects with same value will be replaced by first element with the same value.static <T> void
bucketSort
(T[] a, int fromIndex, int toIndex, Comparator<? super T> cmp) Note: All the objects with same value will be replaced by first element with the same value.static <T> void
bucketSort
(T[] a, Comparator<? super T> cmp) static <T,
U extends Comparable<? super U>>
voidbucketSortBy
(List<? extends T> list, Function<? super T, ? extends U> keyMapper) Bucket sort by.static <T,
U extends Comparable<? super U>>
voidbucketSortBy
(T[] a, Function<? super T, ? extends U> keyMapper) Bucket sort by.static <R,
R2> Tuple.Tuple2<R, R2> callInParallel
(Callable<R> command, Callable<R2> command2) Executes and complete the input commands in parallel.static <R,
R2, R3> Tuple.Tuple3<R, R2, R3> callInParallel
(Callable<R> command, Callable<R2> command2, Callable<R3> command3) Executes and complete the input commands in parallel.static <R,
R2, R3, R4>
Tuple.Tuple4<R,R2, R3, R4> callInParallel
(Callable<R> command, Callable<R2> command2, Callable<R3> command3, Callable<R4> command4) Executes and complete the input commands in parallel.static <R,
R2, R3, R4, R5>
Tuple.Tuple5<R,R2, R3, R4, R5> callInParallel
(Callable<R> command, Callable<R2> command2, Callable<R3> command3, Callable<R4> command4, Callable<R5> command5) Executes and complete the input commands in parallel.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
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<? extends T> targetType) Returns an emptyNullable
ifval
isnull
whiletargetType
is primitive or can not be assigned totargetType
.static double
checkArgNotNegative
(double arg, String argNameOrErrorMsg) Checks if the specifiedarg
is not negative, and throwsIllegalArgumentException
if it is.static int
checkArgNotNegative
(int arg, String argNameOrErrorMsg) Checks if the specifiedarg
is not negative, and throwsIllegalArgumentException
if it is.static long
checkArgNotNegative
(long arg, String argNameOrErrorMsg) Checks if the specifiedarg
is not negative, and throwsIllegalArgumentException
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 specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.static byte[]
checkArgNotNullOrEmpty
(byte[] arg, String argNameOrErrorMsg) Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.static char[]
checkArgNotNullOrEmpty
(char[] arg, String argNameOrErrorMsg) Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.static double[]
checkArgNotNullOrEmpty
(double[] arg, String argNameOrErrorMsg) Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.static float[]
checkArgNotNullOrEmpty
(float[] arg, String argNameOrErrorMsg) Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.static int[]
checkArgNotNullOrEmpty
(int[] arg, String argNameOrErrorMsg) Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.static long[]
checkArgNotNullOrEmpty
(long[] arg, String argNameOrErrorMsg) Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.static short[]
checkArgNotNullOrEmpty
(short[] arg, String argNameOrErrorMsg) Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.static <T> T[]
checkArgNotNullOrEmpty
(T[] arg, String argNameOrErrorMsg) Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.static <T extends CharSequence>
TcheckArgNotNullOrEmpty
(T arg, String argNameOrErrorMsg) Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.static <T extends CharSequence>
TcheckArgNotNullOrEmptyOrBlank
(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 specifiedarg
is positive, and throwsIllegalArgumentException
if it is not.static int
checkArgPositive
(int arg, String argNameOrErrorMsg) Checks if the specifiedarg
is positive, and throwsIllegalArgumentException
if it is not.static long
checkArgPositive
(long arg, String argNameOrErrorMsg) Checks if the specifiedarg
is positive, and throwsIllegalArgumentException
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, short p) 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, Supplier<String> errorMessageSupplier) static void
Check if the specifiedCollection
contains anynull
element.static void
checkElementNotNull
(Collection<?> c, String errorMessage) Check if the specifiedCollection
contains anynull
element.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
checkKeyNotNull
(Map<?, ?> m) Check if the specifiedMap
contains anynull
key.static void
checkKeyNotNull
(Map<?, ?> m, String errorMessage) Check if the specifiedMap
contains anynull
key.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 void
checkValueNotNull
(Map<?, ?> m) Check if the specifiedMap
contains anynull
value.static void
checkValueNotNull
(Map<?, ?> m, String errorMessage) Check if the specifiedMap
contains anynull
value.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
Deeply copy by: obj -> serialize -> kryo/Json -> deserialize -> new object.static <T> T
clone
(T obj) 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) static <T> Set<T>
commonSet
(Collection<? extends T> a, Collection<?> b) 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 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> 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 <T extends Comparable<? super T>>
intcompare
(Collection<T> a, Collection<T> b) static <T> int
compare
(Collection<T> a, Collection<T> b, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
intcompare
(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>>
intcompare
(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>>
intcompare
(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>>
intcompare
(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>>
intcompare
(T1 a1, T1 b1, T2 a2, T2 b2, T3 a3, T3 b3, T4 a4, T4 b4) Deprecated.please useBuilder.ComparisonBuilder
static <T1 extends Comparable<T1>,
T2 extends Comparable<T2>, T3 extends Comparable<T3>, T4 extends Comparable<T4>, T5 extends Comparable<T5>>
intcompare
(T1 a1, T1 b1, T2 a2, T2 b2, T3 a3, T3 b3, T4 a4, T4 b4, T5 a5, T5 b5) Deprecated.please useBuilder.ComparisonBuilder
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>>
intcompare
(T1 a1, T1 b1, T2 a2, T2 b2, T3 a3, T3 b3, T4 a4, T4 b4, T5 a5, T5 b5, T6 a6, T6 b6) Deprecated.please useBuilder.ComparisonBuilder
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>>
intcompare
(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) Deprecated.please useBuilder.ComparisonBuilder
static <T extends Comparable<? super T>>
intcompare
(T a, T b) static <T> int
compare
(T a, T b, Comparator<? super T> cmp) Returns 0 if the arguments are identical andc.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 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 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> List<T>
static <T> List<T>
static <T> List<T>
concat
(Collection<? extends Iterable<? extends T>> c) static <T,
C extends Collection<T>>
Cconcat
(Collection<? extends Iterable<? extends T>> c, IntFunction<? extends C> supplier) static <T> ObjIterator<T>
static <T> ObjIterator<T>
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
(double[] a, double valueToFind) static boolean
contains
(float[] a, float valueToFind) static boolean
contains
(int[] a, int valueToFind) static boolean
contains
(long[] a, long valueToFind) static boolean
contains
(short[] a, short valueToFind) static boolean
static boolean
contains
(Collection<?> c, Object valueToFind) static boolean
static boolean
containsAll
(Collection<?> c, Object[] valuesToFind) static boolean
containsAll
(Collection<?> c, Collection<?> valuesToFind) static boolean
containsAll
(Iterator<?> iter, Collection<?> valuesToFind) static boolean
containsAny
(Collection<?> c, Object[] valuesToFind) static boolean
containsAny
(Collection<?> c, Collection<?> valuesToFind) static boolean
containsAny
(Iterator<?> iter, Set<?> valuesToFind) static <T> T
static <T> T
Try to convert the specifiedobj
to the specifiedtargetClass
.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 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 void
copy
(long[] src, int srcPos, long[] dest, int destPos, int length) static void
copy
(short[] src, int srcPos, short[] dest, int destPos, int length) static <T> T[][][]
static <T> T[][]
static <T> T[]
static void
static <T> T
copy
(Object entity, boolean ignoreUnmatchedProperty, Set<String> ignorePropNames, Class<? extends T> targetClass) static void
static <T> T
static <T> T
copy
(Object entity, Collection<String> selectPropNames, Class<? extends T> targetClass) Returns a new created instance of the specifiedcls
and set with same properties retrieved by 'getXXX' method in the specifiedentity
.static <T> void
static <T> void
Copies all of the elements from one list into another.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 specifiedentity
.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[] 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 inoriginal
, throughto
-from
, bystep
.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 inoriginal
, throughto
-from
, bystep
.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 inoriginal
, throughto
-from
, bystep
.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 inoriginal
, throughto
-from
, bystep
.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 inoriginal
, throughto
-from
, bystep
.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 inoriginal
, throughto
-from
, bystep
.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 inoriginal
, throughto
-from
, bystep
.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 inoriginal
, throughto
-from
, bystep
.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> 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 inoriginal
, throughto
-from
, bystep
.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 inoriginal
, throughto
-from
, bystep
.static <T> T[]
copyOfRange
(T[] original, int fromIndex, int toIndex, int step, Class<? extends T[]> newType) Copy all the elements inoriginal
, throughto
-from
, bystep
.static <T,
U> T[] copyOfRange
(U[] original, int fromIndex, int toIndex, Class<? extends T[]> newType) static <T,
E extends Exception>
T[]copyThenApply
(T[] a, Throwables.Function<? super T, ? extends T, E> converter) Copy the specified arraya
first, then callconverter
on the copy.static <E extends Exception>
intcount
(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>
intcount
(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>
intcount
(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>
intcount
(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>
intcount
(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>
intcount
(char[] a, Throwables.CharPredicate<E> filter) Mostly it's designed for one-step operation to complete the operation in one step.static <E extends Exception>
intcount
(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>
intcount
(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>
intcount
(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>
intcount
(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>
intcount
(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>
intcount
(int[] a, Throwables.IntPredicate<E> filter) Mostly it's designed for one-step operation to complete the operation in one step.static <E extends Exception>
intcount
(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>
intcount
(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>
intcount
(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>
intcount
(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>
intcount
(Iterable<? 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 <T,
E extends Exception>
intcount
(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 int
static <T,
E extends Exception>
intcount
(Iterator<? extends T> iter, Throwables.Predicate<? super T, E> filter) static <T,
E extends Exception>
intcount
(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>
intcount
(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
Default if null.static boolean
defaultIfNull
(Boolean b, boolean defaultForNull) Default if null.static byte
Default if null.static byte
defaultIfNull
(Byte b, byte defaultForNull) Default if null.static char
Default if null.static char
defaultIfNull
(Character c, char defaultForNull) Default if null.static double
Default if null.static double
defaultIfNull
(Double b, double defaultForNull) Default if null.static float
Default if null.static float
defaultIfNull
(Float b, float defaultForNull) Default if null.static int
Default if null.static int
defaultIfNull
(Integer b, int defaultForNull) Default if null.static long
Default if null.static long
defaultIfNull
(Long b, long defaultForNull) Default if null.static short
Default if null.static short
defaultIfNull
(Short b, short defaultForNull) Default if null.static <T> T
defaultIfNull
(T obj, Supplier<? extends T> supplierForDefault) Default if null.static <T> T
defaultIfNull
(T obj, T defaultForNull) Default if null.static <T extends CharSequence>
TdefaultIfNullOrEmpty
(T str, T defaultStr) static <T extends CharSequence>
TdefaultIfNullOrEmptyOrBlank
(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 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[]
static boolean
Removes the elements at the specified positions from the specified List.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 fromfromIndex
totoIndex
.static byte[]
deleteRange
(byte[] a, int fromIndex, int toIndex) Deletes the values fromfromIndex
totoIndex
.static char[]
deleteRange
(char[] a, int fromIndex, int toIndex) Deletes the values fromfromIndex
totoIndex
.static double[]
deleteRange
(double[] a, int fromIndex, int toIndex) Deletes the values fromfromIndex
totoIndex
.static float[]
deleteRange
(float[] a, int fromIndex, int toIndex) Deletes the values fromfromIndex
totoIndex
.static int[]
deleteRange
(int[] a, int fromIndex, int toIndex) Deletes the values fromfromIndex
totoIndex
.static long[]
deleteRange
(long[] a, int fromIndex, int toIndex) Deletes the values fromfromIndex
totoIndex
.static short[]
deleteRange
(short[] a, int fromIndex, int toIndex) Deletes the values fromfromIndex
totoIndex
.static String[]
deleteRange
(String[] a, int fromIndex, int toIndex) static String
deleteRange
(String str, int fromIndex, int toIndex) static <T> boolean
deleteRange
(List<T> c, int fromIndex, int toIndex) Returnstrue
if theList
is updated whenfromIndex < toIndex
, otherwisefalse
is returned whenfromIndex == toIndex
.static <T> T[]
deleteRange
(T[] a, int fromIndex, int toIndex) Deletes the values fromfromIndex
totoIndex
.static boolean[]
difference
(boolean[] a, boolean[] b) Returns the elements froma
, but exclude the elements inb
by occurrences.static byte[]
difference
(byte[] a, byte[] b) Returns the elements froma
, but exclude the elements inb
by occurrences.static char[]
difference
(char[] a, char[] b) Returns the elements froma
, but exclude the elements inb
by occurrences.static double[]
difference
(double[] a, double[] b) Returns the elements froma
, but exclude the elements inb
by occurrences.static float[]
difference
(float[] a, float[] b) Returns the elements froma
, but exclude the elements inb
by occurrences.static int[]
difference
(int[] a, int[] b) Returns the elements froma
, but exclude the elements inb
by occurrences.static long[]
difference
(long[] a, long[] b) Returns the elements froma
, but exclude the elements inb
by occurrences.static short[]
difference
(short[] a, short[] b) Returns the elements froma
, but exclude the elements inb
by occurrences.static <T> List<T>
difference
(Collection<? extends T> a, Collection<?> b) Returns the elements froma
, but exclude the elements inb
by occurrences.static <T> List<T>
difference
(T[] a, Object[] b) Returns the elements froma
, but exclude the elements inb
by occurrences.static <T> Set<T>
differentSet
(Collection<? extends T> a, Collection<?> b) static boolean
static boolean
disjoint
(Collection<?> c1, Collection<?> c2) Returnstrue
if the two specified arrays have no elements in common.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 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>
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 <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.distinctBy
(Iterable<? extends T> c, Throwables.Function<? super T, ?, E> keyMapper) Distinct by the value mapped fromkeyMapper
.static <T,
C extends Collection<T>, E extends Exception>
CdistinctBy
(Iterable<? extends T> c, Throwables.Function<? super T, ?, E> keyMapper, Supplier<C> supplier) Distinct by the value mapped fromkeyMapper
.distinctBy
(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Function<? super T, ?, E> keyMapper) Distinct by the value mapped fromkeyMapper
.distinctBy
(T[] a, int fromIndex, int toIndex, Throwables.Function<? super T, ?, E> keyMapper) Distinct by the value mapped fromkeyMapper
.distinctBy
(T[] a, Throwables.Function<? super T, ?, E> keyMapper) Distinct by the value mapped fromkeyMapper
.static <T,
C extends Collection<T>, E extends Exception>
CdistinctBy
(T[] a, Throwables.Function<? super T, ?, E> keyMapper, Supplier<C> supplier) Distinct by the value mapped fromkeyMapper
.dropWhile
(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter) dropWhile
(T[] a, Throwables.Predicate<? super T, E> filter) static InputStream
Returns an empty immutableInputStream
.static <T> Iterator<T>
Returns an empty immutableIterator
.static <T> List<T>
Returns an empty immutableList
.static <T> ListIterator<T>
Returns an empty immutableListIterator
.static <K,
V> Map<K, V> emptyMap()
Returns an empty immutableMap
.static <K,
V> NavigableMap<K, V> Returns an empty immutableNavigableMap
.static <T> NavigableSet<T>
Returns an empty immutableNavigableSet
.static <T> Set<T>
emptySet()
Returns an empty immutableSet
.static <K,
V> SortedMap<K, V> Returns an empty immutableSortedMap
.static <T> SortedSet<T>
Returns an empty immutableSortedSet
.static <E extends Enum<E>>
ImmutableList<E>enumListOf
(Class<E> enumClass) Enum list of.static <E extends Enum<E>>
ImmutableBiMap<E,String> Enum map of.static <E extends Enum<E>>
ImmutableSet<E>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
(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
static boolean
static boolean
static boolean
static boolean
equalsByCommonProps
(Object entity1, Object entity2) static boolean
equalsByCommonProps
(Object entity1, Object entity2, Collection<String> propNamesToCompare) 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
static void
erase
(Object entity, Collection<String> propNames) static void
static <T> List<T>
exclude
(Collection<T> c, Object objToExclude) Returns a newList
with specifiedobjToExclude
excluded.static <T> List<T>
excludeAll
(Collection<T> c, Collection<?> objsToExclude) Returns a newList
with specifiedobjsToExclude
excluded.static <T> Set<T>
excludeAllToSet
(Collection<T> c, Collection<?> objsToExclude) Returns a newSet
with specifiedobjsToExclude
excluded.static <T> Set<T>
excludeToSet
(Collection<T> c, Object objToExclude) Returns a newSet
with specifiedobjToExclude
excluded.static void
execute
(Throwables.Runnable<? extends Exception> cmd, int retryTimes, long retryInterval, Predicate<? super Exception> retryCondition) static <R> R
execute
(Callable<R> cmd, int retryTimes, long retryInterval, BiPredicate<? super R, ? super Exception> retryCondition) 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 void
fill
(long[] a, int fromIndex, int toIndex, long val) static void
fill
(long[] a, long val) static void
fill
(short[] a, int fromIndex, int toIndex, short val) static void
fill
(short[] a, short val) static <T> T
Fill the properties of the entity with random values.static <T> List<T>
Fill the properties of the entity with random values.static void
Fill the properties of the entity with random values.static void
static void
static <T> void
The specified value will be added/inserted into the specified List.static <T> void
static <E extends Exception>
boolean[]filter
(boolean[] a, int fromIndex, int toIndex, Throwables.BooleanPredicate<E> filter) static <E extends Exception>
boolean[]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>
boolean[]filter
(boolean[] a, Throwables.BooleanPredicate<E> filter) static <E extends Exception>
boolean[]filter
(boolean[] a, Throwables.BooleanPredicate<E> filter, int max) static <E extends Exception>
byte[]filter
(byte[] a, int fromIndex, int toIndex, Throwables.BytePredicate<E> filter) static <E extends Exception>
byte[]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>
byte[]filter
(byte[] a, Throwables.BytePredicate<E> filter) static <E extends Exception>
byte[]filter
(byte[] a, Throwables.BytePredicate<E> filter, int max) static <E extends Exception>
char[]filter
(char[] a, int fromIndex, int toIndex, Throwables.CharPredicate<E> filter) static <E extends Exception>
char[]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>
char[]filter
(char[] a, Throwables.CharPredicate<E> filter) static <E extends Exception>
char[]filter
(char[] a, Throwables.CharPredicate<E> filter, int max) static <E extends Exception>
double[]filter
(double[] a, int fromIndex, int toIndex, Throwables.DoublePredicate<E> filter) static <E extends Exception>
double[]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>
double[]filter
(double[] a, Throwables.DoublePredicate<E> filter) static <E extends Exception>
double[]filter
(double[] a, Throwables.DoublePredicate<E> filter, int max) static <E extends Exception>
float[]filter
(float[] a, int fromIndex, int toIndex, Throwables.FloatPredicate<E> filter) static <E extends Exception>
float[]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>
float[]filter
(float[] a, Throwables.FloatPredicate<E> filter) static <E extends Exception>
float[]filter
(float[] a, Throwables.FloatPredicate<E> filter, int max) static <E extends Exception>
int[]filter
(int[] a, int fromIndex, int toIndex, Throwables.IntPredicate<E> filter) static <E extends Exception>
int[]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>
int[]filter
(int[] a, Throwables.IntPredicate<E> filter) static <E extends Exception>
int[]filter
(int[] a, Throwables.IntPredicate<E> filter, int max) static <E extends Exception>
long[]filter
(long[] a, int fromIndex, int toIndex, Throwables.LongPredicate<E> filter) static <E extends Exception>
long[]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>
long[]filter
(long[] a, Throwables.LongPredicate<E> filter) static <E extends Exception>
long[]filter
(long[] a, Throwables.LongPredicate<E> filter, int max) static <E extends Exception>
short[]filter
(short[] a, int fromIndex, int toIndex, Throwables.ShortPredicate<E> filter) static <E extends Exception>
short[]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>
short[]filter
(short[] a, Throwables.ShortPredicate<E> filter) static <E extends Exception>
short[]filter
(short[] a, Throwables.ShortPredicate<E> filter, int max) filter
(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter) filter
(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter, int max) static <T,
R extends Collection<T>, E extends Exception>
Rfilter
(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter, int max, IntFunction<R> supplier) static <T,
R extends Collection<T>, E extends Exception>
Rfilter
(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter, IntFunction<R> supplier) filter
(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Predicate<? super T, E> filter) 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>
Rfilter
(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Predicate<? super T, E> filter, int max, IntFunction<R> supplier) static <T,
R extends Collection<T>, E extends Exception>
Rfilter
(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Predicate<? super T, E> filter, IntFunction<R> supplier) filter
(T[] a, int fromIndex, int toIndex, Throwables.Predicate<? super T, E> filter) 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>
Rfilter
(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,
R extends Collection<T>, E extends Exception>
Rfilter
(T[] a, int fromIndex, int toIndex, Throwables.Predicate<? super T, E> filter, IntFunction<R> supplier) filter
(T[] a, Throwables.Predicate<? super T, E> filter) filter
(T[] a, Throwables.Predicate<? super T, E> filter, int max) static <T,
R extends Collection<T>, E extends Exception>
Rfilter
(T[] a, Throwables.Predicate<? super T, E> filter, int max, IntFunction<R> supplier) static <T,
R extends Collection<T>, E extends Exception>
Rfilter
(T[] a, Throwables.Predicate<? super T, E> filter, IntFunction<R> supplier) static <T,
E extends Exception>
u.Nullable<T>findFirst
(Collection<? extends T> c, Throwables.Predicate<? super T, E> predicate) static <T,
E extends Exception>
u.Nullable<T>findFirst
(Iterator<? extends T> iter, Throwables.Predicate<? super T, E> predicate) static <T,
E extends Exception>
u.Nullable<T>findFirst
(T[] a, Throwables.Predicate<? super T, E> predicate) static <T,
E extends Exception>
u.OptionalIntfindFirstIndex
(Collection<? extends T> c, Throwables.Predicate<? super T, E> predicate) Find first index.static <T,
U, E extends Exception>
u.OptionalIntfindFirstIndex
(Collection<? extends T> c, U valueToFind, Throwables.BiPredicate<? super T, ? super U, E> predicate) Find first index.static <T,
E extends Exception>
u.OptionalIntfindFirstIndex
(T[] a, Throwables.Predicate<? super T, E> predicate) Find first index.static <T,
U, E extends Exception>
u.OptionalIntfindFirstIndex
(T[] a, U valueToFind, Throwables.BiPredicate<? super T, ? super U, E> predicate) Find first index.static <T,
E extends Exception>
u.Optional<T>findFirstNonNull
(Collection<? extends T> c, Throwables.Predicate<? super T, E> predicate) Find first non null.static <T,
E extends Exception>
u.Optional<T>findFirstNonNull
(Iterator<? extends T> iter, Throwables.Predicate<? super T, E> predicate) static <T,
E extends Exception>
u.Optional<T>findFirstNonNull
(T[] a, Throwables.Predicate<? super T, E> predicate) Find first non null.static <T,
E extends Exception>
u.Nullable<T>findLast
(Collection<? extends T> c, Throwables.Predicate<? super T, E> predicate) static <T,
E extends Exception>
u.Nullable<T>findLast
(T[] a, Throwables.Predicate<? super T, E> predicate) static <T,
E extends Exception>
u.OptionalIntfindLastIndex
(Collection<? extends T> c, Throwables.Predicate<? super T, E> predicate) Find last index.static <T,
U, E extends Exception>
u.OptionalIntfindLastIndex
(Collection<? extends T> c, U valueToFind, Throwables.BiPredicate<? super T, ? super U, E> predicate) static <T,
E extends Exception>
u.OptionalIntfindLastIndex
(T[] a, Throwables.Predicate<? super T, E> predicate) Find last index.static <T,
U, E extends Exception>
u.OptionalIntfindLastIndex
(T[] a, U valueToFind, Throwables.BiPredicate<? super T, ? super U, E> predicate) Find last index.static <T,
E extends Exception>
u.Optional<T>findLastNonNull
(Collection<? extends T> c, Throwables.Predicate<? super T, E> predicate) Find last non null.static <T,
E extends Exception>
u.Optional<T>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 firstn
elements.static <T> u.Nullable<T>
first
(Collection<T> c) static <T> u.Nullable<T>
static Throwable
Returns the specifiedThrowable 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>
u.Optional<T>firstNonBlank
(T a, T b) static <T extends CharSequence>
u.Optional<T>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>
u.Optional<T>firstNonEmpty
(T a, T b) static <T extends CharSequence>
u.Optional<T>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.flatmap
(Iterable<? extends T> c, Throwables.Function<? super T, ? extends R[], E> func) static <T,
R, C extends Collection<R>, E extends Exception>
Cflatmap
(Iterable<? extends T> c, Throwables.Function<? super T, ? extends R[], E> func, IntFunction<? extends C> supplier) flatmap
(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>
Cflatmap
(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.flatmap
(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>
Cflatmap
(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.flatmap
(T[] a, Throwables.Function<? super T, ? extends R[], E> func) static <T,
R, C extends Collection<R>, E extends Exception>
Cflatmap
(T[] a, Throwables.Function<? super T, ? extends R[], E> func, IntFunction<? extends C> supplier) flatMap
(Iterable<? extends T> c, Throwables.Function<? super T, ? extends Collection<? extends R>, E> func) static <T,
R, C extends Collection<R>, E extends Exception>
CflatMap
(Iterable<? extends T> c, Throwables.Function<? super T, ? extends Collection<? extends R>, E> func, IntFunction<? extends C> supplier) flatMap
(Iterable<? 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>
CflatMap
(Iterable<? 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.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>
CflatMap
(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.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>
CflatMap
(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.flatMap
(T[] a, Throwables.Function<? super T, ? extends Collection<? extends R>, E> func) static <T,
R, C extends Collection<R>, E extends Exception>
CflatMap
(T[] a, Throwables.Function<? super T, ? extends Collection<? extends R>, E> func, IntFunction<? extends C> supplier) 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>
CflatMap
(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 boolean[]
flatten
(boolean[][] a) static byte[]
flatten
(byte[][] a) static char[]
flatten
(char[][] a) static double[]
flatten
(double[][] a) static float[]
flatten
(float[][] a) static int[]
flatten
(int[][] a) static long[]
flatten
(long[][] a) static short[]
flatten
(short[][] a) static <T> List<T>
flatten
(Collection<? extends Collection<? extends T>> c) static <T,
C extends Collection<T>>
Cflatten
(Collection<? extends Collection<? extends T>> c, IntFunction<? extends C> supplier) static <T> T[]
flatten
(T[][] a) static <T> T[]
static <E extends Exception>
voidforEach
(int startInclusive, int endExclusive, int step, Throwables.IntConsumer<E> action) static <E extends Exception>
voidforEach
(int startInclusive, int endExclusive, int step, Throwables.Runnable<E> action) static <T,
E extends Exception>
voidforEach
(int startInclusive, int endExclusive, int step, T a, Throwables.ObjIntConsumer<? super T, E> action) Deprecated.use traditional for-loopstatic <E extends Exception>
voidforEach
(int startInclusive, int endExclusive, Throwables.IntConsumer<E> action) static <E extends Exception>
voidforEach
(int startInclusive, int endExclusive, Throwables.Runnable<E> action) static <T,
E extends Exception>
voidforEach
(int startInclusive, int endExclusive, T a, Throwables.ObjIntConsumer<? super T, E> action) Deprecated.use traditional for-loopstatic <A,
B, E extends Exception>
voidforEach
(A[] a, B[] b, A valueForNoneA, B valueForNoneB, Throwables.BiConsumer<? super A, ? super B, E> action) static <A,
B, C, E extends Exception>
voidforEach
(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>
voidforEach
(A[] a, B[] b, C[] c, Throwables.TriConsumer<? super A, ? super B, ? super C, E> action) static <A,
B, E extends Exception>
voidforEach
(A[] a, B[] b, Throwables.BiConsumer<? super A, ? super B, E> action) static <T,
E extends Exception>
voidforEach
(Iterable<? extends T> c, Throwables.Consumer<? super T, E> action) static <A,
B, E extends Exception>
voidforEach
(Iterable<A> a, Iterable<B> b, A valueForNoneA, B valueForNoneB, Throwables.BiConsumer<? super A, ? super B, E> action) static <A,
B, E extends Exception>
voidforEach
(Iterable<A> a, Iterable<B> b, Throwables.BiConsumer<? super A, ? super B, E> action) static <A,
B, C, E extends Exception>
voidforEach
(Iterable<A> a, Iterable<B> b, Iterable<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>
voidforEach
(Iterable<A> a, Iterable<B> b, Iterable<C> c, Throwables.TriConsumer<? super A, ? super B, ? super C, E> action) forEach
(Iterable<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) forEach
(Iterable<T> c, Throwables.Function<? super T, ? extends Collection<U>, E> flatMapper, Throwables.BiConsumer<? super T, ? super U, E2> action) static <T,
E extends Exception>
voidforEach
(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>
voidforEach
(Iterator<? extends T> iter, Throwables.Consumer<? super T, E> action) 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) 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>
voidforEach
(Iterator<A> a, Iterator<B> b, A valueForNoneA, B valueForNoneB, Throwables.BiConsumer<? super A, ? super B, E> action) static <A,
B, E extends Exception>
voidforEach
(Iterator<A> a, Iterator<B> b, Throwables.BiConsumer<? super A, ? super B, E> action) static <A,
B, C, E extends Exception>
voidforEach
(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>
voidforEach
(Iterator<A> a, Iterator<B> b, Iterator<C> c, Throwables.TriConsumer<? super A, ? super B, ? super C, E> action) static <K,
V, E extends Exception>
voidforEach
(Map<K, V> map, Throwables.Consumer<? super Map.Entry<K, V>, E> action) static <T,
E extends Exception>
voidforEach
(T[] a, int fromIndex, int toIndex, Throwables.Consumer<? super T, E> action) static <T,
E extends Exception>
voidforEach
(T[] a, Throwables.Consumer<? super T, E> action) 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) 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>
voidforEachIndexed
(Iterable<? extends T> c, Throwables.IndexedConsumer<? super T, E> action) static <T,
E extends Exception>
voidforEachIndexed
(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>
voidforEachIndexed
(Iterator<? extends T> iter, Throwables.IndexedConsumer<? super T, E> action) static <K,
V, E extends Exception>
voidforEachIndexed
(Map<K, V> map, Throwables.IndexedConsumer<? super Map.Entry<K, V>, E> action) static <T,
E extends Exception>
voidforEachIndexed
(T[] a, int fromIndex, int toIndex, Throwables.IndexedConsumer<? super T, E> action) static <T,
E extends Exception>
voidforEachIndexed
(T[] a, Throwables.IndexedConsumer<? super T, E> action) static <T,
E extends Exception>
voidforEachNonNull
(Iterable<T> c, Throwables.Consumer<? super T, E> action) For each non null.forEachNonNull
(Iterable<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.forEachNonNull
(Iterable<T> c, Throwables.Function<? super T, ? extends Collection<U>, E> flatMapper, Throwables.BiConsumer<? super T, ? super U, E2> action) For each non null.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.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>
voidforEachNonNull
(T[] a, Throwables.Consumer<? super T, E> action) For each non null.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.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>
voidforEachPair
(Iterable<? extends T> c, Throwables.BiConsumer<? super T, ? super T, E> action) For each pair.static <T,
E extends Exception>
voidforEachPair
(Iterable<? extends T> c, Throwables.BiConsumer<? super T, ? super T, E> action, int increment) For each pair.static <T,
E extends Exception>
voidforEachPair
(Iterator<? extends T> iter, Throwables.BiConsumer<? super T, ? super T, E> action) For each pair.static <T,
E extends Exception>
voidforEachPair
(Iterator<? extends T> iter, Throwables.BiConsumer<? super T, ? super T, E> action, int increment) For each pair.static <T,
E extends Exception>
voidforEachPair
(T[] a, Throwables.BiConsumer<? super T, ? super T, E> action) For each pair.static <T,
E extends Exception>
voidforEachPair
(T[] a, Throwables.BiConsumer<? super T, ? super T, E> action, int increment) For each pair.static <T,
E extends Exception>
voidforEachTriple
(Iterable<? extends T> c, Throwables.TriConsumer<? super T, ? super T, ? super T, E> action) For each triple.static <T,
E extends Exception>
voidforEachTriple
(Iterable<? extends T> c, Throwables.TriConsumer<? super T, ? super T, ? super T, E> action, int increment) For each triple.static <T,
E extends Exception>
voidforEachTriple
(Iterator<? extends T> iter, Throwables.TriConsumer<? super T, ? super T, ? super T, E> action) For each triple.static <T,
E extends Exception>
voidforEachTriple
(Iterator<? extends T> iter, Throwables.TriConsumer<? super T, ? super T, ? super T, E> action, int increment) For each triple.static <T,
E extends Exception>
voidforEachTriple
(T[] a, Throwables.TriConsumer<? super T, ? super T, ? super T, E> action) For each triple.static <T,
E extends Exception>
voidforEachTriple
(T[] a, Throwables.TriConsumer<? super T, ? super T, ? super T, E> action, int increment) For each triple.static String
formatJSON
(com.landawn.abacus.type.Type<?> type, String json) static String
formatJSON
(Class<?> type, String json) static String
formatJSON
(String json) static String
static String
static String
static <T> T[]
static <T> T
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
static <T> T
fromJSON
(com.landawn.abacus.type.Type<? extends T> targetType, Reader json, JSONDeserializationConfig config) static <T> T
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
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
static <T> T
fromJSON
(Class<? extends T> targetClass, Reader json, JSONDeserializationConfig config) static <T> T
static <T> T
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
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
static <T> T
fromXML
(com.landawn.abacus.type.Type<? extends T> targetType, Reader xml, XMLDeserializationConfig config) static <T> T
static <T> T
fromXML
(com.landawn.abacus.type.Type<? extends T> targetType, String xml, XMLDeserializationConfig config) static <T> T
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
static <T> T
fromXML
(Class<? extends T> targetClass, Reader xml, XMLDeserializationConfig config) static <T> T
static <T> T
fromXML
(Class<? extends T> targetClass, String xml, XMLDeserializationConfig config) static <T extends Comparable<? super T>>
booleangeAndLe
(T value, T min, T max) Returnstrue
ismin <= value <= max
, otherwisefalse
is returned.static <T extends Comparable<? super T>>
booleangeAndLt
(T value, T min, T max) Returnstrue
ismin <= value < max
, otherwisefalse
is returned.static <T> T
getElement
(Collection<? extends T> c, int index) 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>>
booleangreaterEqual
(T a, T b) Returnstrue
isa >= b
, otherwisefalse
is returned.static <T extends Comparable<? super T>>
booleangreaterThan
(T a, T b) Returnstrue
isa > b
, otherwisefalse
is returned.groupBy
(Iterable<? extends T> iter, Throwables.Function<? super T, ? extends K, E> keyExtractor) groupBy
(Iterable<? extends T> iter, Throwables.Function<? super T, ? extends K, E> keyExtractor, Supplier<M> mapSupplier) groupBy
(Iterator<? extends T> iter, Throwables.Function<? super T, ? extends K, E> keyExtractor) groupBy
(Iterator<? extends T> iter, Throwables.Function<? super T, ? extends K, E> keyExtractor, Supplier<M> mapSupplier) groupBy
(T[] a, int fromIndex, int toIndex, Throwables.Function<? super T, ? extends K, E> keyExtractor) groupBy
(T[] a, int fromIndex, int toIndex, Throwables.Function<? super T, ? extends K, E> keyExtractor, Supplier<M> mapSupplier) groupBy
(T[] a, Throwables.Function<? super T, ? extends K, E> keyExtractor) groupBy
(T[] a, Throwables.Function<? super T, ? extends K, E> keyExtractor, Supplier<M> mapSupplier) static <T extends Comparable<? super T>>
booleangtAndLe
(T value, T min, T max) Returnstrue
ismin < value <= max
, otherwisefalse
is returned.static <T extends Comparable<? super T>>
booleangtAndLt
(T value, T min, T max) Returnstrue
ismin < value < max
, otherwisefalse
is returned.static String
guid()
Returns the UUID without '-'.static boolean
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
(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 boolean
hasDuplicates
(Collection<?> c) Checks for duplicates.static boolean
hasDuplicates
(Collection<?> c, 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
(short value) static int
hashCode
(short[] a) static int
hashCode
(short[] a, int fromIndex, int toIndex) static int
static int
static int
ifOrElse
(boolean b, Throwables.Runnable<E1> actionForTrue, Throwables.Runnable<E2> actionForFalse) If or else.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>
u.Nullable<R>ifOrEmpty
(boolean b, Throwables.Supplier<R, E> supplier) Returns aNullable
with value got from the specifiedsupplier
ifb
istrue
, otherwise returns an emptyNullable
ifb
is false.static <T,
R, E extends Exception>
u.Nullable<R>ifOrEmpty
(boolean b, T init, Throwables.Function<? super T, ? extends R, E> func) Returns aNullable
with value returned byfunc.apply(init)
ifb
istrue
, otherwise returns an emptyNullable
ifb
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
(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
(long[] a, int startIndex, long valueToFind) static int
indexOf
(long[] a, long valueToFind) static int
indexOf
(short[] a, int startIndex, short valueToFind) static int
indexOf
(short[] a, short valueToFind) static int
static int
static int
indexOf
(Collection<?> c, int startIndex, Object valueToFind) static int
indexOf
(Collection<?> c, Object valueToFind) static int
static int
static int
indexOfIgnoreCase
(String[] a, String 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[]
static String
Returns a new Stringstatic <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[]
static <T> T[]
insertAll
(T[] a, int index, T... elementsToInsert) Inserts the specified elementToInserts at the specified position in the array.static boolean[]
intersection
(boolean[] a, boolean[] b) static byte[]
intersection
(byte[] a, byte[] b) static char[]
intersection
(char[] a, char[] b) static double[]
intersection
(double[] a, double[] b) static float[]
intersection
(float[] a, float[] b) static int[]
intersection
(int[] a, int[] b) Returns a new array with all the elements inb
removed by occurrences.static long[]
intersection
(long[] a, long[] b) static short[]
intersection
(short[] a, short[] b) 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 fromfromIndex
totoIndex
: set it totrue
if it'sfalse
, or set it tofalse
if it'strue
.static void
invert
(boolean[] a, int fromIndex, int toIndex) Inverts the element fromfromIndex
totoIndex
: set it totrue
if it'sfalse
, or set it tofalse
if it'strue
.static boolean
Deprecated.replaced byClassUtil.isEntity(Class)
static boolean
isEqualCollection
(Collection<?> a, Collection<?> b) Returnstrue
if the givenCollection
s 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
(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
(short[] a) Checks if is null or empty.static boolean
isNullOrEmpty
(DataSet rs) Checks if is null or empty.static boolean
isNullOrEmpty
(LongMultiset<?> s) 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
(PrimitiveList list) Checks if is null or empty.static boolean
Checks if is null or empty.static boolean
isNullOrEmpty
(Iterable<?> iter) Not null or empty.static boolean
isNullOrEmpty
(Object[] a) Checks if is null or empty.static boolean
isNullOrEmpty
(Collection<?> c) Checks if is null or empty.static boolean
isNullOrEmpty
(Iterator<?> iter) Not null or empty.static boolean
isNullOrEmpty
(Map<?, ?> m) Checks if is null or empty.static boolean
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) Returnstrue
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 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>>
booleanisSorted
(Collection<T> c) static <T extends Comparable<? super T>>
booleanisSorted
(Collection<T> c, int fromIndex, int toIndex) static <T> boolean
isSorted
(Collection<T> c, int fromIndex, int toIndex, Comparator<? super T> cmp) static <T> boolean
isSorted
(Collection<T> c, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
booleanisSorted
(T[] a) static <T extends Comparable<? super T>>
booleanisSorted
(T[] a, int fromIndex, int toIndex) static <T> boolean
isSorted
(T[] a, int fromIndex, int toIndex, Comparator<? super T> cmp) static <T> boolean
isSorted
(T[] a, Comparator<? super T> cmp) static boolean
isSubCollection
(Collection<?> subColl, Collection<?> coll) Returnstrue
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>
static <T> ObjIterator<T>
iterate
(T[] a) static <T> ObjIterator<T>
iterate
(T[] a, int fromIndex, int toIndex) static String
Json 2 XML.static String
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 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>>
TkthLargest
(Collection<? extends T> c, int k) static <T extends Comparable<? super T>>
TkthLargest
(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 <T> T
kthLargest
(Collection<? extends T> c, int k, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
TkthLargest
(T[] a, int k) static <T extends Comparable<? super T>>
TkthLargest
(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> T
kthLargest
(T[] a, int k, Comparator<? super T> cmp) static <T> List<T>
last
(Collection<? extends T> c, int n) Return at most lastn
elements.static <T> u.Nullable<T>
last
(Collection<T> c) static <T> u.Nullable<T>
static <K,
V> u.Optional<Map.Entry<K, V>> 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
(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
(short[] a, int startIndexFromBack, short valueToFind) Last index of.static int
lastIndexOf
(short[] a, short 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
(Collection<?> c, int startIndexFromBack, Object valueToFind) Last index of.static int
lastIndexOf
(Collection<?> c, Object valueToFind) Last index of.static int
lastIndexOfIgnoreCase
(String[] a, String valueToFind) 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>
static <T,
E extends Exception>
Throwables.LazyInitializer<T,E> lazyInitialize
(Throwables.Supplier<T, E> supplier) static int
len
(boolean[] a) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.static int
len
(byte[] a) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.static int
len
(char[] a) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.static int
len
(double[] a) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.static int
len
(float[] a) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.static int
len
(int[] a) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.static int
len
(long[] a) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.static int
len
(short[] a) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.static int
len
(CharSequence s) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.static int
Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.static <T extends Comparable<? super T>>
booleanlessEqual
(T a, T b) Returnstrue
isa <= b
, otherwisefalse
is returned.static <T extends Comparable<? super T>>
booleanlessThan
(T a, T b) Returnstrue
isa < b
, otherwisefalse
is returned.map
(Iterable<? extends T> c, Throwables.Function<? super T, ? extends R, E> func) static <T,
R, C extends Collection<R>, E extends Exception>
Cmap
(Iterable<? extends T> c, Throwables.Function<? super T, ? extends R, E> func, IntFunction<? extends C> supplier) 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>
Cmap
(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.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>
Cmap
(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.map
(T[] a, Throwables.Function<? super T, ? extends R, E> func) static <T,
R, C extends Collection<R>, E extends Exception>
Cmap
(T[] a, Throwables.Function<? super T, ? extends R, E> func, IntFunction<? extends C> supplier) static <T,
E extends Exception>
boolean[]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>
boolean[]mapToBoolean
(Collection<? extends T> c, Throwables.ToBooleanFunction<? super T, E> func) Map to boolean.static <T,
E extends Exception>
boolean[]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>
boolean[]mapToBoolean
(T[] a, Throwables.ToBooleanFunction<? super T, E> func) Map to boolean.static <T,
E extends Exception>
byte[]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>
byte[]mapToByte
(Collection<? extends T> c, Throwables.ToByteFunction<? super T, E> func) Map to byte.static <T,
E extends Exception>
byte[]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>
byte[]mapToByte
(T[] a, Throwables.ToByteFunction<? super T, E> func) Map to byte.static <T,
E extends Exception>
char[]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>
char[]mapToChar
(Collection<? extends T> c, Throwables.ToCharFunction<? super T, E> func) Map to char.static <T,
E extends Exception>
char[]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>
char[]mapToChar
(T[] a, Throwables.ToCharFunction<? super T, E> func) Map to char.static <T,
E extends Exception>
double[]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>
double[]mapToDouble
(Collection<? extends T> c, Throwables.ToDoubleFunction<? super T, E> func) Map to double.static <T,
E extends Exception>
double[]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>
double[]mapToDouble
(T[] a, Throwables.ToDoubleFunction<? super T, E> func) Map to double.static <T,
E extends Exception>
float[]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>
float[]mapToFloat
(Collection<? extends T> c, Throwables.ToFloatFunction<? super T, E> func) Map to float.static <T,
E extends Exception>
float[]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>
float[]mapToFloat
(T[] a, Throwables.ToFloatFunction<? super T, E> func) Map to float.static <T,
E extends Exception>
int[]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>
int[]mapToInt
(Collection<? extends T> c, Throwables.ToIntFunction<? super T, E> func) Map to int.static <T,
E extends Exception>
int[]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>
int[]mapToInt
(T[] a, Throwables.ToIntFunction<? super T, E> func) Map to int.static <T,
E extends Exception>
long[]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>
long[]mapToLong
(Collection<? extends T> c, Throwables.ToLongFunction<? super T, E> func) Map to long.static <T,
E extends Exception>
long[]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>
long[]mapToLong
(T[] a, Throwables.ToLongFunction<? super T, E> func) Map to long.static <T,
E extends Exception>
short[]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>
short[]mapToShort
(Collection<? extends T> c, Throwables.ToShortFunction<? super T, E> func) Map to short.static <T,
E extends Exception>
short[]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>
short[]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 twobyte
values.static byte
max
(byte a, byte b, byte c) Gets the maximum of threebyte
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 twochar
values.static char
max
(char a, char b, char c) Gets the maximum of threechar
values.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 twodouble
values.static double
max
(double a, double b, double c) Gets the maximum of threedouble
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 twofloat
values.static float
max
(float a, float b, float c) Gets the maximum of threefloat
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 twoint
values.static int
max
(int a, int b, int c) Gets the maximum of threeint
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 twolong
values.static long
max
(long a, long b, long c) Gets the maximum of threelong
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 twoshort
values.static short
max
(short a, short b, short c) Gets the maximum of threeshort
values.static <T extends Comparable<? super T>>
Tstatic <T> T
max
(Iterable<? extends T> c, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
Tmax
(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 <T extends Comparable<? super T>>
Tmax
(T[] a) Returns the maximum element in the array.static <T extends Comparable<? super T>>
Tmax
(T[] a, int fromIndex, int toIndex) static <T> T
max
(T[] a, int fromIndex, int toIndex, Comparator<? super T> cmp) static <T> T
max
(T[] a, Comparator<? super T> cmp) Returns the maximum element in the array.static <T extends Comparable<? super T>>
Tmax
(T a, T b) static <T> T
max
(T a, T b, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
Tmax
(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>>
List<T>static <T> List<T>
maxAll
(Iterable<? extends T> c, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
List<T>static <T> List<T>
maxAll
(Iterator<? extends T> iter, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
List<T>maxAll
(T[] a) static <T> List<T>
maxAll
(T[] a, Comparator<? super T> cmp) static byte
median
(byte... a) Returns thelength / 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 thelength / 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 double
median
(double... a) Returns thelength / 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 thelength / 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 thelength / 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 thelength / 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 thelength / 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>>
Tmedian
(Collection<? extends T> c) Returns thelength / 2 + 1
largest value in the specified array.static <T extends Comparable<? super T>>
Tmedian
(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 <T> T
median
(Collection<? extends T> c, Comparator<? super T> cmp) Returns thelength / 2 + 1
largest value in the specified array.static <T extends Comparable<? super T>>
Tmedian
(T[] a) Returns thelength / 2 + 1
largest value in the specified array.static <T extends Comparable<? super T>>
Tmedian
(T[] a, int fromIndex, int toIndex) static <T> T
median
(T[] a, int fromIndex, int toIndex, Comparator<? super T> cmp) static <T> T
median
(T[] a, Comparator<? super T> cmp) Returns thelength / 2 + 1
largest value in the specified array.static <T extends Comparable<? super T>>
Tmedian
(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 DataSet
static DataSet
merge
(Iterable<? extends T> a, Iterable<? extends T> b, Throwables.BiFunction<? super T, ? super T, MergeResult, E> nextSelector) static <T> T
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 specifiedsourceEntity
to the specifiedtargetEntity
.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 specifiedsourceEntity
to the specifiedtargetEntity
.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 specifiedsourceEntity
to the specifiedtargetEntity
.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 specifiedsourceEntity
to the specifiedtargetEntity
.static DataSet
merge
(Collection<? extends DataSet> dss) static <T> List<T>
merge
(Collection<? extends Iterable<? extends T>> c, BiFunction<? super T, ? super T, MergeResult> nextSelector) static <T,
C extends Collection<T>>
Cmerge
(Collection<? extends Iterable<? extends T>> c, BiFunction<? super T, ? super T, MergeResult> nextSelector, IntFunction<? extends C> supplier) 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 twobyte
values.static byte
min
(byte a, byte b, byte c) Gets the minimum of threebyte
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 twochar
values.static char
min
(char a, char b, char c) Gets the minimum of threechar
values.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 twodouble
values.static double
min
(double a, double b, double c) Gets the minimum of threedouble
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 twofloat
values.static float
min
(float a, float b, float c) Gets the minimum of threefloat
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 twoint
values.static int
min
(int a, int b, int c) Gets the minimum of threeint
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 twolong
values.static long
min
(long a, long b, long c) Gets the minimum of threelong
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 twoshort
values.static short
min
(short a, short b, short c) Gets the minimum of threeshort
values.static <T extends Comparable<? super T>>
Tstatic <T> T
min
(Iterable<? extends T> c, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
Tmin
(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 <T extends Comparable<? super T>>
Tmin
(T[] a) Returns the minimum element in the array.static <T extends Comparable<? super T>>
Tmin
(T[] a, int fromIndex, int toIndex) static <T> T
min
(T[] a, int fromIndex, int toIndex, Comparator<? super T> cmp) static <T> T
min
(T[] a, Comparator<? super T> cmp) Returns the minimum element in the array.static <T extends Comparable<? super T>>
Tmin
(T a, T b) static <T> T
min
(T a, T b, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
Tmin
(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>>
List<T>static <T> List<T>
minAll
(Iterable<T> c, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
List<T>static <T> List<T>
minAll
(Iterator<? extends T> iter, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
List<T>minAll
(T[] a) static <T> List<T>
minAll
(T[] a, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
Pair<T,T> static <T> Pair<T,
T> minMax
(Iterable<? extends T> c, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
Pair<T,T> static <T> Pair<T,
T> minMax
(Iterator<? extends T> iter, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
Pair<T,T> minMax
(T[] a) static <T> Pair<T,
T> minMax
(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 void
moveRange
(long[] a, int fromIndex, int toIndex, int newPositionStartIndex) static void
moveRange
(short[] a, int fromIndex, int toIndex, int newPositionStartIndex) static String
static <T> boolean
static <T> void
moveRange
(T[] a, int fromIndex, int toIndex, int newPositionStartIndex) static <T> T
static <T> ArrayDeque<T>
New array deque.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 <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> ArrayList<T>
New array list.static <T> ArrayList<T>
newArrayList
(int initialCapacity) New array list.static <T> ArrayList<T>
newArrayList
(Collection<? extends T> c) New array list.static <K,
V> BiMap<K, V> newBiMap()
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> 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 <T> Collection<T>
newCollection
(Class<?> targetClass) static <T> Collection<T>
newCollection
(Class<?> targetClass, int size) static <K,
V> ConcurrentHashMap<K, V> 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 DataSet
newDataSet
(String keyColumnName, String valueColumnName, Map<?, ?> m) Convert the specified Map to a two columnsDataSet
: one column is for keys and one column is for values.static DataSet
newDataSet
(Collection<String> columnNames, Object[][] rowList) static <T> DataSet
newDataSet
(Collection<String> columnNames, Collection<T> rowList) If the specifiedcolumnNames
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 <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<?>>
DataSetnewDataSet
(Map<String, C> map) New data set.static DataSet
New empty data set.static DataSet
newEmptyDataSet
(Collection<String> columnNames) New empty data set.static <T> T
static <T> T
static <K,
V> Map.Entry<K, V> newEntry
(K key, V value) static <K,
V> Map<K, V> New hash map.static <K,
V> Map<K, V> newHashMap
(int initialCapacity) New hash map.newHashMap
(Collection<? extends V> c, Throwables.Function<? super V, ? extends K, E> keyMapper) New hash map.static <K,
V> Map<K, V> newHashMap
(Map<? extends K, ? extends V> m) New hash map.static <T> Set<T>
New hash set.static <T> Set<T>
newHashSet
(int initialCapacity) New hash set.static <T> Set<T>
newHashSet
(Collection<? extends T> c) New hash set.static <K,
V> IdentityHashMap<K, V> 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> New linked hash map.static <K,
V> Map<K, V> newLinkedHashMap
(int initialCapacity) New linked hash map.newLinkedHashMap
(Collection<? extends V> c, Throwables.Function<? super V, ? extends K, E> keyMapper) 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>
New linked hash set.static <T> Set<T>
newLinkedHashSet
(int initialCapacity) New linked hash set.static <T> Set<T>
newLinkedHashSet
(Collection<? extends T> c) New linked hash set.static <T> LinkedList<T>
New linked list.static <T> LinkedList<T>
newLinkedList
(Collection<? extends T> c) New linked list.static <K,
E> ListMultimap<K, E> Return aListMultimap
backed byLinkedHashMap
.static <K,
E> ListMultimap<K, E> newLinkedListMultimap
(int initialCapacity) Return aListMultimap
backed byLinkedHashMap
.static <K,
E> ListMultimap<K, E> newLinkedListMultimap
(Map<? extends K, ? extends E> m) Return aListMultimap
backed byLinkedHashMap
.static <K,
E> SetMultimap<K, E> Return aSetMultimap
backed byLinkedHashMap
.static <K,
E> SetMultimap<K, E> newLinkedSetMultimap
(int initialCapacity) Return aSetMultimap
backed byLinkedHashMap
.static <K,
E> SetMultimap<K, E> newLinkedSetMultimap
(Map<? extends K, ? extends E> m) Return aSetMultimap
backed byLinkedHashMap
.static <K,
E> ListMultimap<K, E> New list multimap.static <K,
E> ListMultimap<K, E> newListMultimap
(int initialCapacity) 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
(Supplier<? extends Map<K, List<E>>> mapSupplier, Supplier<? extends List<E>> valueSupplier) New list multimap.static <K,
E> ListMultimap<K, E> newListMultimap
(Map<? extends K, ? extends E> m) New list multimap.static <T> LongMultiset<T>
static <T> LongMultiset<T>
newLongMultiset
(int initialCapacity) static <K,
V> Map<K, V> static <K,
V> Map<K, V> static <K,
E, V extends Collection<E>>
Multimap<K,E, V> newMultimap
(Supplier<? extends Map<K, V>> mapSupplier, Supplier<? extends V> valueSupplier) static <T> Multiset<T>
static <T> Multiset<T>
newMultiset
(int initialCapacity) static <T> Multiset<T>
newMultiset
(Class<? extends Map> valueMapType) static <T> Multiset<T>
newMultiset
(Collection<? extends T> c) static <T> Multiset<T>
newMultiset
(Supplier<? extends Map<T, ?>> mapSupplier) static <T> T
newProxyInstance
(Class<?>[] interfaceClasses, InvocationHandler h) Refer tojava.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> New set multimap.static <K,
E> SetMultimap<K, E> newSetMultimap
(int initialCapacity) 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
(Supplier<? extends Map<K, Set<E>>> mapSupplier, Supplier<? extends Set<E>> valueSupplier) New set multimap.static <K,
E> SetMultimap<K, E> newSetMultimap
(Map<? extends K, ? extends E> m) New set multimap.static <K extends Comparable<? super K>,
E>
ListMultimap<K,E> Return aListMultimap
backed bySortedMap
.static <K extends Comparable<? super K>,
E>
ListMultimap<K,E> newSortedListMultimap
(Map<? extends K, ? extends E> m) Return aListMultimap
backed bySortedMap
.static <K extends Comparable<? super K>,
E>
SetMultimap<K,E> Return aSetMultimap
backed bySortedMap
.static <K extends Comparable<? super K>,
E>
SetMultimap<K,E> newSortedSetMultimap
(Map<? extends K, ? extends E> m) Return aSetMultimap
backed bySortedMap
.static <K extends Comparable<? super K>,
V>
TreeMap<K,V> New tree map.static <C,
K extends C, V>
TreeMap<K,V> newTreeMap
(Comparator<C> comparator) New tree map.static <K extends Comparable<? super K>,
V>
TreeMap<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>>
TreeSet<T>New tree set.static <T extends Comparable<? super T>>
TreeSet<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>
booleannMatch
(Iterable<? extends T> c, int atLeast, int atMost, Throwables.Predicate<? super T, E> filter) static <T,
E extends Exception>
booleannMatch
(Iterator<? extends T> iter, int atLeast, int atMost, Throwables.Predicate<? super T, E> filter) static <T,
E extends Exception>
booleannMatch
(T[] a, int atLeast, int atMost, Throwables.Predicate<? super T, E> filter) static <T,
E extends Exception>
booleannoneMatch
(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter) static <T,
E extends Exception>
booleannoneMatch
(Iterator<? extends T> iter, Throwables.Predicate<? super T, E> filter) static <T,
E extends Exception>
booleannoneMatch
(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
(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
(short[] a) Not null or empty.static boolean
Not null or empty.static boolean
notNullOrEmpty
(LongMultiset<?> s) 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
(PrimitiveList list) Not null or empty.static boolean
Not null or empty.static boolean
notNullOrEmpty
(Iterable<?> iter) Not null or empty.static boolean
notNullOrEmpty
(Object[] a) Not null or empty.static boolean
notNullOrEmpty
(Collection<?> c) Not null or empty.static boolean
notNullOrEmpty
(Iterator<?> iter) Not null or empty.static boolean
notNullOrEmpty
(Map<?, ?> m) Not null or empty.static boolean
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 double[]
nullToEmpty
(double[] a) Null to empty.static float[]
nullToEmpty
(float[] a) Null to empty.static int[]
nullToEmpty
(int[] a) Null to empty.static long[]
nullToEmpty
(long[] a) Null to empty.static short[]
nullToEmpty
(short[] a) Null to empty.static <K,
V> ImmutableBiMap<K, V> nullToEmpty
(ImmutableBiMap<K, V> map) Returns an immutable empty map if the specified ImmutableBiMap isnull
, otherwise itself is returned.static <T> ImmutableCollection<T>
Returns an immutable empty Collection if the specified ImmutableCollection isnull
, otherwise itself is returned.static <T> ImmutableList<T>
nullToEmpty
(ImmutableList<T> list) Returns an immutable empty list if the specified ImmutableList isnull
, otherwise itself is returned.static <K,
V> ImmutableMap<K, V> nullToEmpty
(ImmutableMap<K, V> map) Returns an immutable empty map if the specified ImmutableMap isnull
, otherwise itself is returned.static <K,
V> ImmutableNavigableMap<K, V> nullToEmpty
(ImmutableNavigableMap<K, V> map) Returns an immutable empty map if the specified ImmutableNavigableMap isnull
, otherwise itself is returned.static <T> ImmutableNavigableSet<T>
nullToEmpty
(ImmutableNavigableSet<T> set) Returns an immutable empty list if the specified ImmutableNavigableSet isnull
, otherwise itself is returned.static <T> ImmutableSet<T>
nullToEmpty
(ImmutableSet<T> set) Returns an immutable empty list if the specified ImmutableSet isnull
, otherwise itself is returned.static <K,
V> ImmutableSortedMap<K, V> nullToEmpty
(ImmutableSortedMap<K, V> map) Returns an immutable empty map if the specified ImmutableSortedMap isnull
, otherwise itself is returned.static <T> ImmutableSortedSet<T>
nullToEmpty
(ImmutableSortedSet<T> set) Returns an immutable empty list if the specified ImmutableSortedSet isnull
, otherwise itself is returned.static <T> T[]
nullToEmpty
(Class<T[]> arrayType, T[] a) Deprecated.replaced byCommonUtil.nullToEmpty(Object[], Class)
static Object[]
nullToEmpty
(Object[] a) Deprecated.replaced byCommonUtil.nullToEmpty(Object[], Class)
static String
nullToEmpty
(String str) Null to empty.static String[]
nullToEmpty
(String[] a) Null to empty.static <T> Iterator<T>
nullToEmpty
(Iterator<T> iter) Returns an immutable emptyIterator
if the specified Iterator isnull
, otherwise itself is returned.static <T> List<T>
nullToEmpty
(List<T> list) Returns an immutable empty list if the specified List isnull
, otherwise itself is returned.static <T> ListIterator<T>
nullToEmpty
(ListIterator<T> iter) Returns an immutable emptyListIterator
if the specified ListIterator isnull
, otherwise itself is returned.static <K,
V> Map<K, V> nullToEmpty
(Map<K, V> map) Returns an immutable empty map if the specified Map isnull
, otherwise itself is returned.static <K,
V> NavigableMap<K, V> nullToEmpty
(NavigableMap<K, V> map) Returns an immutable emptyNavigableMap
if the specified NavigableMap isnull
, otherwise itself is returned.static <T> NavigableSet<T>
nullToEmpty
(NavigableSet<T> set) Returns an immutable emptyNavigableSet
if the specified NavigableSet isnull
, otherwise itself is returned.static <T> Set<T>
nullToEmpty
(Set<T> set) Returns an immutable empty set if the specified Set isnull
, otherwise itself is returned.static <K,
V> SortedMap<K, V> nullToEmpty
(SortedMap<K, V> map) Returns an immutable emptySortedMap
if the specified SortedMap isnull
, otherwise itself is returned.static <T> SortedSet<T>
nullToEmpty
(SortedSet<T> set) Returns an immutable emptySortedSet
if the specified SortedSet isnull
, otherwise itself is returned.static <T> T[]
nullToEmpty
(T[] a, Class<T[]> arrayType) Null to empty.occurrencesMap
(Iterable<T> c) occurrencesMap
(Iterable<T> c, Supplier<Map<T, Integer>> mapSupplier) occurrencesMap
(Iterator<T> iter) occurrencesMap
(Iterator<T> iter, Supplier<Map<T, Integer>> mapSupplier) occurrencesMap
(T[] a) occurrencesMap
(T[] a, Supplier<Map<T, Integer>> mapSupplier) static int
occurrencesOf
(boolean[] a, boolean valueToFind) static int
occurrencesOf
(byte[] a, byte valueToFind) static int
occurrencesOf
(char[] a, char valueToFind) static int
occurrencesOf
(double[] a, double valueToFind) static int
occurrencesOf
(float[] a, float valueToFind) static int
occurrencesOf
(int[] a, int valueToFind) static int
occurrencesOf
(long[] a, long valueToFind) static int
occurrencesOf
(short[] a, short valueToFind) static int
occurrencesOf
(Iterable<?> c, Object valueToFind) static int
occurrencesOf
(Object[] a, Object valueToFind) static int
occurrencesOf
(String str, String substr) static long
occurrencesOf
(Iterator<?> iter, Object valueToFind) static void
parallelSort
(byte[] a) static void
parallelSort
(byte[] a, int fromIndex, int toIndex) static void
parallelSort
(char[] a) static void
parallelSort
(char[] a, int fromIndex, int toIndex) static void
parallelSort
(double[] a) static void
parallelSort
(double[] a, int fromIndex, int toIndex) static void
parallelSort
(float[] a) static void
parallelSort
(float[] a, int fromIndex, int toIndex) static void
parallelSort
(int[] a) static void
parallelSort
(int[] a, int fromIndex, int toIndex) static void
parallelSort
(long[] a) static void
parallelSort
(long[] a, int fromIndex, int toIndex) static void
parallelSort
(short[] a) static void
parallelSort
(short[] a, int fromIndex, int toIndex) static <T extends Comparable<? super T>>
voidparallelSort
(List<? extends T> list) static <T extends Comparable<? super T>>
voidparallelSort
(List<? extends T> list, int fromIndex, int toIndex) static <T> void
parallelSort
(List<? extends T> list, int fromIndex, int toIndex, Comparator<? super T> cmp) static <T> void
parallelSort
(List<? extends T> list, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
voidparallelSort
(T[] a) static <T extends Comparable<? super T>>
voidparallelSort
(T[] a, int fromIndex, int toIndex) static <T> void
parallelSort
(T[] a, int fromIndex, int toIndex, Comparator<? super T> cmp) static <T> void
parallelSort
(T[] a, Comparator<? super T> cmp) static <T,
U extends Comparable<? super U>>
voidparallelSortBy
(List<? extends T> list, Function<? super T, ? extends U> keyMapper) Parallel sort by.static <T,
U extends Comparable<? super U>>
voidparallelSortBy
(T[] a, Function<? super T, ? extends U> keyMapper) Parallel sort by.static <T> void
parallelSortByDouble
(List<? extends T> list, ToDoubleFunction<? super T> keyMapper) Parallel sort by double.static <T> void
parallelSortByDouble
(T[] a, ToDoubleFunction<? super T> keyMapper) Parallel sort by double.static <T> void
parallelSortByFloat
(List<? extends T> list, ToFloatFunction<? super T> keyMapper) Parallel sort by float.static <T> void
parallelSortByFloat
(T[] a, ToFloatFunction<? super T> keyMapper) Parallel sort by float.static <T> void
parallelSortByInt
(List<? extends T> list, ToIntFunction<? super T> keyMapper) Parallel sort by int.static <T> void
parallelSortByInt
(T[] a, ToIntFunction<? super T> keyMapper) Parallel sort by int.static <T> void
parallelSortByLong
(List<? extends T> list, ToLongFunction<? super T> keyMapper) Parallel sort by long.static <T> void
parallelSortByLong
(T[] a, ToLongFunction<? super T> keyMapper) Parallel sort by long.static boolean
parseBoolean
(String str) Returns aBoolean
with a value represented by the specified string.static byte
Deprecated.replaced byNumbers.toByte(String)
static char
Parses the char.static double
parseDouble
(String str) Deprecated.replaced byNumbers.toDouble(String)
static float
parseFloat
(String str) Deprecated.replaced byNumbers.toFloat(String)
static int
Deprecated.replaced byNumbers.toInt(String)
static long
Deprecated.replaced byNumbers.toLong(String)
static short
parseShort
(String str) Deprecated.replaced byNumbers.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 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
(List<T> sortedList) 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 BiFunction<Object,
Class<?>, Object> registerConverter
(Class<?> srcClass, BiFunction<?, Class<?>, ?> converter) 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 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[]
static <T> boolean
remove
(Collection<T> c, T elementToRemove) Removes the first occurrence of the specified elementToRemove from the specified collection.static <T> T[]
remove
(T[] a, T elementToRemove) Removes the first occurrence of the specified elementToRemove from the specified array.static boolean[]
removeAll
(boolean[] a, boolean... elementsToRemove) Returns a new array with removes all the occurrences of specified elementsToRemove froma
.static byte[]
removeAll
(byte[] a, byte... elementsToRemove) Returns a new array with removes all the occurrences of specified elementsToRemove froma
.static char[]
removeAll
(char[] a, char... elementsToRemove) Returns a new array with removes all the occurrences of specified elementsToRemove froma
.static double[]
removeAll
(double[] a, double... elementsToRemove) Returns a new array with removes all the occurrences of specified elementsToRemove froma
.static float[]
removeAll
(float[] a, float... elementsToRemove) Returns a new array with removes all the occurrences of specified elementsToRemove froma
.static int[]
removeAll
(int[] a, int... elementsToRemove) Returns a new array with removes all the occurrences of specified elementsToRemove froma
.static long[]
removeAll
(long[] a, long... elementsToRemove) Returns a new array with removes all the occurrences of specified elementsToRemove froma
.static short[]
removeAll
(short[] a, short... elementsToRemove) Returns a new array with removes all the occurrences of specified elementsToRemove froma
.static String[]
Returns a new array with removes all the occurrences of specified elementsToRemove froma
.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 <T> T[]
removeAll
(T[] a, T... elementsToRemove) Returns a new array with removes all the occurrences of specified elementsToRemove froma
.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 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> boolean
removeAllOccurrences
(Collection<T> c, T elementToRemove) Removes the all occurrences.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 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 boolean
removeDuplicates
(Collection<?> c) Removes the duplicates.static boolean
removeDuplicates
(Collection<?> c, boolean isSorted) Removes the duplicates.static <T> T[]
removeDuplicates
(T[] a) Removes all duplicates elementsstatic <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>
voidreplaceAll
(boolean[] a, Throwables.BooleanUnaryOperator<E> operator) static int
replaceAll
(byte[] a, byte oldVal, byte newVal) static <E extends Exception>
voidreplaceAll
(byte[] a, Throwables.ByteUnaryOperator<E> operator) static int
replaceAll
(char[] a, char oldVal, char newVal) static <E extends Exception>
voidreplaceAll
(char[] a, Throwables.CharUnaryOperator<E> operator) static int
replaceAll
(double[] a, double oldVal, double newVal) static <E extends Exception>
voidreplaceAll
(double[] a, Throwables.DoubleUnaryOperator<E> operator) static int
replaceAll
(float[] a, float oldVal, float newVal) static <E extends Exception>
voidreplaceAll
(float[] a, Throwables.FloatUnaryOperator<E> operator) static int
replaceAll
(int[] a, int oldVal, int newVal) static <E extends Exception>
voidreplaceAll
(int[] a, Throwables.IntUnaryOperator<E> operator) static int
replaceAll
(long[] a, long oldVal, long newVal) static <E extends Exception>
voidreplaceAll
(long[] a, Throwables.LongUnaryOperator<E> operator) static int
replaceAll
(short[] a, short oldVal, short newVal) static <E extends Exception>
voidreplaceAll
(short[] a, Throwables.ShortUnaryOperator<E> operator) static <T,
E extends Exception>
intreplaceAll
(List<T> list, Throwables.UnaryOperator<T, E> operator) static <T> int
replaceAll
(List<T> list, Object oldVal, T newVal) static <T,
E extends Exception>
voidreplaceAll
(T[] a, Throwables.UnaryOperator<T, E> operator) static <T> int
replaceAll
(T[] a, Object oldVal, T newVal) static <E extends Exception>
intreplaceIf
(boolean[] a, Throwables.BooleanPredicate<E> predicate, boolean newValue) static <E extends Exception>
intreplaceIf
(byte[] a, Throwables.BytePredicate<E> predicate, byte newValue) static <E extends Exception>
intreplaceIf
(char[] a, Throwables.CharPredicate<E> predicate, char newValue) static <E extends Exception>
intreplaceIf
(double[] a, Throwables.DoublePredicate<E> predicate, double newValue) static <E extends Exception>
intreplaceIf
(float[] a, Throwables.FloatPredicate<E> predicate, float newValue) static <E extends Exception>
intreplaceIf
(int[] a, Throwables.IntPredicate<E> predicate, int newValue) static <E extends Exception>
intreplaceIf
(long[] a, Throwables.LongPredicate<E> predicate, long newValue) static <E extends Exception>
intreplaceIf
(short[] a, Throwables.ShortPredicate<E> predicate, short newValue) static <T,
E extends Exception>
intreplaceIf
(List<T> c, Throwables.Predicate<? super T, E> predicate, T newValue) static <T,
E extends Exception>
intreplaceIf
(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 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> boolean
replaceRange
(List<T> c, int fromIndex, int toIndex, Collection<? extends T> replacement) 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
(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
(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
(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
Reverses the order of the given array.static void
Reverses the order of the given array in the given range.static void
reverse
(Collection<?> c) static void
static void
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 void
reverseSort
(long[] a) static void
reverseSort
(long[] a, int fromIndex, int toIndex) static void
reverseSort
(short[] a) static void
reverseSort
(short[] a, int fromIndex, int toIndex) static void
reverseSort
(Object[] a) static void
reverseSort
(Object[] a, int fromIndex, int toIndex) static <T extends Comparable<? super T>>
voidreverseSort
(List<? extends T> list) static <T extends Comparable<? super T>>
voidreverseSort
(List<? extends T> list, int fromIndex, int toIndex) static <T,
U extends Comparable<? super U>>
voidreverseSortBy
(List<? extends T> list, Function<? super T, ? extends U> keyMapper) Reverse sort by.static <T,
U extends Comparable<? super U>>
voidreverseSortBy
(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
(double[] a, int distance) static void
rotate
(float[] a, int distance) static void
rotate
(int[] a, int distance) static void
rotate
(long[] a, int distance) static void
rotate
(short[] a, int distance) static void
static void
rotate
(Collection<?> c, int distance) static void
static void
runInParallel
(Throwables.Runnable<? extends Exception> command, Throwables.Runnable<? extends Exception> command2) Executes and complete the input commands in parallel.static void
runInParallel
(Throwables.Runnable<? extends Exception> command, Throwables.Runnable<? extends Exception> command2, Throwables.Runnable<? extends Exception> command3) Executes and complete the input commands in parallel.static void
runInParallel
(Throwables.Runnable<? extends Exception> command, Throwables.Runnable<? extends Exception> command2, Throwables.Runnable<? extends Exception> command3, Throwables.Runnable<? extends Exception> command4) Executes and complete the input commands in parallel.static void
runInParallel
(Throwables.Runnable<? extends Exception> command, Throwables.Runnable<? extends Exception> command2, Throwables.Runnable<? extends Exception> command3, Throwables.Runnable<? extends Exception> command4, Throwables.Runnable<? extends Exception> command5) Executes and complete the input commands in parallel.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
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
static void
shuffle
(byte[] a) static void
static void
shuffle
(char[] a) static void
static void
shuffle
(double[] a) static void
static void
shuffle
(float[] a) static void
static void
shuffle
(int[] a) static void
static void
shuffle
(long[] a) static void
static void
shuffle
(short[] a) static void
static void
shuffle
(Collection<?> c) static void
shuffle
(Collection<?> c, Random rnd) static void
static void
static <T> void
shuffle
(T[] a) static <T> void
static int
size
(Collection<?> c) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.static int
Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.static <T> List<T>
skipRange
(Collection<T> c, int startInclusive, int endExclusive) static <T,
C extends Collection<T>>
CskipRange
(Collection<T> c, int startInclusive, int endExclusive, IntFunction<C> supplier) skipUntil
(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter) skipUntil
(T[] a, Throwables.Predicate<? super T, E> filter) static void
sleep
(long timeoutInMillis) static void
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<T>
slice
(Collection<? extends T> c, int fromIndex, int toIndex) Returns a read-onlyImmutableCollection
.static <T> ObjIterator<T>
static <T> ImmutableList<T>
Returns a read-onlyImmutableCollection
.static <T> ImmutableList<T>
slice
(T[] a, int fromIndex, int toIndex) Returns a read-onlySeq
.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 void
sort
(long[] a) static void
sort
(long[] a, int fromIndex, int toIndex) static void
sort
(short[] a) static void
sort
(short[] a, int fromIndex, int toIndex) static void
static void
static <T extends Comparable<? super T>>
voidstatic <T extends Comparable<? super T>>
voidstatic <T> void
sort
(List<? extends T> list, int fromIndex, int toIndex, Comparator<? super T> cmp) static <T> void
sort
(List<? extends T> list, Comparator<? super T> cmp) static <T> void
sort
(T[] a, int fromIndex, int toIndex, Comparator<? super T> cmp) static <T> void
sort
(T[] a, Comparator<? super T> cmp) static <T,
U extends Comparable<? super U>>
voidstatic <T,
U extends Comparable<? super U>>
voidstatic <T> void
sortByDouble
(List<? extends T> list, ToDoubleFunction<? super T> keyMapper) Sort by double.static <T> void
sortByDouble
(T[] a, ToDoubleFunction<? super T> keyMapper) Sort by double.static <T> void
sortByFloat
(List<? extends T> list, ToFloatFunction<? super T> keyMapper) Sort by float.static <T> void
sortByFloat
(T[] a, ToFloatFunction<? super T> keyMapper) Sort by float.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 isnull
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 isnull
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 isnull
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 isnull
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 isnull
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 isnull
or empty.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 isnull
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 isnull
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 isnull
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 isnull
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 isnull
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 isnull
or empty.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 isnull
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 isnull
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 isnull
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 isnull
or empty.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 isnull
or empty.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 isnull
or empty.Returns consecutive sub lists of a collection, each of the same chunkSize (the final list may be smaller).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 <T> ObjIterator<List<T>>
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 isnull
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 isnull
or empty.static <T> Stream<T>
splitByCount
(int maxCount, int totalSize, boolean smallerFirst, IntBiFunction<? extends T> func) final int[] a = Array.rangeClosed(1, 7); splitByCount(5, 7, true, (fromIndex, toIndex) -> N.copyOfRange(a, fromIndex, toIndex)).forEach(Fn.println()); // [[1], [2], [3], [4, 5], [6, 7]] splitByCount(5, 7, false, (fromIndex, toIndex) -> N.copyOfRange(a, fromIndex, toIndex)).forEach(Fn.println()); // [[1, 2], [3, 4], [5], [6], [7]]
static <T> ExceptionalStream<T,
IOException> streamJSON
(Class<? extends T> elementClass, File source) static <T> ExceptionalStream<T,
IOException> streamJSON
(Class<? extends T> elementClass, File source, JSONDeserializationConfig config) static <T> ExceptionalStream<T,
IOException> streamJSON
(Class<? extends T> elementClass, InputStream source, boolean closeInputStreamWhenStreamIsClosed) static <T> ExceptionalStream<T,
IOException> streamJSON
(Class<? extends T> elementClass, InputStream source, boolean closeInputStreamWhenStreamIsClosed, JSONDeserializationConfig config) static <T> ExceptionalStream<T,
IOException> streamJSON
(Class<? extends T> elementClass, Reader source, boolean closeReaderWhenStreamIsClosed) static <T> ExceptionalStream<T,
IOException> streamJSON
(Class<? extends T> elementClass, Reader source, boolean closeReaderWhenStreamIsClosed, JSONDeserializationConfig config) static <T> ExceptionalStream<T,
IOException> streamJSON
(Class<? extends T> elementClass, String source) static <T> ExceptionalStream<T,
IOException> streamJSON
(Class<? extends 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
(short val) static String
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 BigDecimal
sumBigDecimal
(Iterable<? extends BigDecimal> c) static <T,
E extends Exception>
BigDecimalsumBigDecimal
(Iterable<? extends T> c, Throwables.Function<? super T, BigDecimal, E> func) static BigInteger
sumBigInteger
(Iterable<? extends BigInteger> c) static <T,
E extends Exception>
BigIntegersumBigInteger
(Iterable<? extends T> c, Throwables.Function<? super T, BigInteger, E> func) static <T extends Number>
doublestatic <T,
E extends Exception>
doublesumDouble
(Iterable<? extends T> c, Throwables.ToDoubleFunction<? super T, E> func) static <T extends Number>
doublesumDouble
(Collection<? extends T> c, int fromIndex, int toIndex) static <T,
E extends Exception>
doublesumDouble
(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T, E> func) static <T extends Number>
doublesumDouble
(T[] a) static <T extends Number>
doublesumDouble
(T[] a, int fromIndex, int toIndex) static <T,
E extends Exception>
doublesumDouble
(T[] a, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T, E> func) static <T,
E extends Exception>
doublesumDouble
(T[] a, Throwables.ToDoubleFunction<? super T, E> func) static <T extends Number>
intstatic <T,
E extends Exception>
intsumInt
(Iterable<? extends T> c, Throwables.ToIntFunction<? super T, E> func) static <T extends Number>
intsumInt
(Collection<? extends T> c, int fromIndex, int toIndex) static <T,
E extends Exception>
intsumInt
(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T, E> func) static <T extends Number>
intsumInt
(T[] a) static <T extends Number>
intsumInt
(T[] a, int fromIndex, int toIndex) static <T,
E extends Exception>
intsumInt
(T[] a, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T, E> func) static <T,
E extends Exception>
intsumInt
(T[] a, Throwables.ToIntFunction<? super T, E> func) static <T extends Number>
longstatic <T,
E extends Exception>
longsumLong
(Iterable<? extends T> c, Throwables.ToLongFunction<? super T, E> func) static <T extends Number>
longsumLong
(Collection<? extends T> c, int fromIndex, int toIndex) static <T,
E extends Exception>
longsumLong
(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T, E> func) static <T extends Number>
longsumLong
(T[] a) static <T extends Number>
longsumLong
(T[] a, int fromIndex, int toIndex) static <T,
E extends Exception>
longsumLong
(T[] a, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T, E> func) static <T,
E extends Exception>
longsumLong
(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
(long[] a, int i, int j) static void
swap
(short[] a, int i, int j) static <T> void
static <T,
M> void static void
static void
static <T,
E extends Exception>
booleanswapIf
(Pair<T, T> pair, Throwables.Predicate<? super Pair<T, T>, E> predicate) static <T,
M, E extends Exception>
booleanswapIf
(Triple<T, M, T> triple, Throwables.Predicate<? super Triple<T, M, T>, E> predicate) static boolean[]
symmetricDifference
(boolean[] a, boolean[] b) static byte[]
symmetricDifference
(byte[] a, byte[] b) static char[]
symmetricDifference
(char[] a, char[] b) static double[]
symmetricDifference
(double[] a, double[] b) static float[]
symmetricDifference
(float[] a, float[] b) static int[]
symmetricDifference
(int[] a, int[] b) int[] a = {0, 1, 2, 2, 3}; int[] b = {2, 5, 1}; int[] c = symmetricDifference(a, b); // The elements c in a will b: [0, 2, 3, 5].static long[]
symmetricDifference
(long[] a, long[] b) static short[]
symmetricDifference
(short[] a, short[] b) 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.takeWhile
(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter) takeWhile
(T[] a, Throwables.Predicate<? super T, E> filter) takeWhileInclusive
(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter) Take while inclusive.takeWhileInclusive
(T[] a, Throwables.Predicate<? super T, E> filter) Take while inclusive.static <A,
T extends A>
A[]toArray
(Class<A[]> targetClass, Collection<T> c) static <A,
T extends A>
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>
A[]toArray
(Collection<T> c, int fromIndex, int toIndex, A[] a) static <A,
T extends A>
A[]toArray
(Collection<T> c, int fromIndex, int toIndex, IntFunction<A[]> arraySupplier) static <A,
T extends A>
A[]toArray
(Collection<T> c, A[] a) static <A,
T extends A>
A[]toArray
(Collection<T> c, IntFunction<A[]> arraySupplier) static boolean[]
toBooleanArray
(byte[] a) static boolean[]
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[]
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>>
CtoCollection
(boolean[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) static <C extends Collection<Boolean>>
CtoCollection
(boolean[] a, IntFunction<? extends C> supplier) static <C extends Collection<Byte>>
CtoCollection
(byte[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) static <C extends Collection<Byte>>
CtoCollection
(byte[] a, IntFunction<? extends C> supplier) static <C extends Collection<Character>>
CtoCollection
(char[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) static <C extends Collection<Character>>
CtoCollection
(char[] a, IntFunction<? extends C> supplier) static <C extends Collection<Double>>
CtoCollection
(double[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) static <C extends Collection<Double>>
CtoCollection
(double[] a, IntFunction<? extends C> supplier) static <C extends Collection<Float>>
CtoCollection
(float[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) static <C extends Collection<Float>>
CtoCollection
(float[] a, IntFunction<? extends C> supplier) static <C extends Collection<Integer>>
CtoCollection
(int[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) static <C extends Collection<Integer>>
CtoCollection
(int[] a, IntFunction<? extends C> supplier) static <C extends Collection<Long>>
CtoCollection
(long[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) static <C extends Collection<Long>>
CtoCollection
(long[] a, IntFunction<? extends C> supplier) static <C extends Collection<Short>>
CtoCollection
(short[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) static <C extends Collection<Short>>
CtoCollection
(short[] a, IntFunction<? extends C> supplier) static <T,
C extends Collection<T>>
CtoCollection
(Iterator<? extends T> iter, Supplier<? extends C> supplier) static <T,
C extends Collection<T>>
CtoCollection
(T[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) static <T,
C extends Collection<T>>
CtoCollection
(T[] a, 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 void
static void
toJSON
(File file, Object obj, JSONSerializationConfig config) static void
toJSON
(OutputStream os, Object obj) static void
toJSON
(OutputStream os, Object obj, JSONSerializationConfig config) static void
static void
toJSON
(Writer writer, Object obj, JSONSerializationConfig config) static String
static String
static String
toJSON
(Object obj, JSONSerializationConfig config) toList
(boolean[] a) toList
(boolean[] a, int fromIndex, int toIndex) toList
(byte[] a) toList
(byte[] a, int fromIndex, int toIndex) toList
(char[] a) toList
(char[] a, int fromIndex, int toIndex) toList
(double[] a) toList
(double[] a, int fromIndex, int toIndex) toList
(float[] a) toList
(float[] a, int fromIndex, int toIndex) toList
(int[] a) toList
(int[] a, int fromIndex, int toIndex) toList
(long[] a) toList
(long[] a, int fromIndex, int toIndex) toList
(short[] a) toList
(short[] a, int fromIndex, int toIndex) static <T> List<T>
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 double[]
top
(double[] a, int n) 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 double[]
top
(double[] a, int n, Comparator<? super Double> cmp) static float[]
top
(float[] a, int n) 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 float[]
top
(float[] a, int n, Comparator<? super Float> cmp) static int[]
top
(int[] a, int n) 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 int[]
top
(int[] a, int n, Comparator<? super Integer> cmp) static long[]
top
(long[] a, int n) 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 long[]
top
(long[] a, int n, Comparator<? super Long> cmp) static short[]
top
(short[] a, int n) 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 short[]
top
(short[] a, int n, Comparator<? super Short> cmp) static <T extends Comparable<? super T>>
List<T>top
(Collection<? extends T> c, int n) static <T extends Comparable<? super T>>
List<T>top
(Collection<? extends T> c, int n, boolean keepEncounterOrder) static <T extends Comparable<? super T>>
List<T>top
(Collection<? extends T> c, int fromIndex, int toIndex, int n) static <T extends Comparable<? super T>>
List<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 <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>>
List<T>top
(T[] a, int n) static <T extends Comparable<? super T>>
List<T>top
(T[] a, int n, boolean keepEncounterOrder) static <T extends Comparable<? super T>>
List<T>top
(T[] a, int fromIndex, int toIndex, int n) static <T extends Comparable<? super T>>
List<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 <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 RuntimeException
static RuntimeException
toSet
(boolean[] a) toSet
(boolean[] a, int fromIndex, int toIndex) toSet
(byte[] a) toSet
(byte[] a, int fromIndex, int toIndex) toSet
(char[] a) toSet
(char[] a, int fromIndex, int toIndex) toSet
(double[] a) toSet
(double[] a, int fromIndex, int toIndex) toSet
(float[] a) toSet
(float[] a, int fromIndex, int toIndex) toSet
(int[] a) toSet
(int[] a, int fromIndex, int toIndex) toSet
(long[] a) toSet
(long[] a, int fromIndex, int toIndex) toSet
(short[] a) toSet
(short[] a, int fromIndex, int toIndex) static <T> Set<T>
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
(short value) static String
toString
(short[] a) static String
toString
(short[] a, int fromIndex, int toIndex) static String
static String
static String
static String
static void
static void
toXML
(File file, Object obj, XMLSerializationConfig config) static void
toXML
(OutputStream os, Object obj) static void
toXML
(OutputStream os, Object obj, XMLSerializationConfig config) static void
static void
toXML
(Writer writer, Object obj, XMLSerializationConfig config) static String
static String
static String
toXML
(Object obj, XMLSerializationConfig config) static <R> R
tryOrDefaultIfNotSucceed
(Callable<R> cmd, Supplier<R> supplierForDefaultIfNotSucceed) Returns the value returned byaction
or{@code supplierForDefaultIfNotSucceed}
if exception happens.static <R> R
tryOrDefaultIfNotSucceed
(Callable<R> cmd, R defaultIfNotSucceed) Returns the value returned byaction
ordefaultIfNotSucceed
if exception happens.static <T,
R, E extends Exception>
RtryOrDefaultIfNotSucceed
(T init, Throwables.Function<? super T, ? extends R, E> func, Supplier<R> supplierForDefaultIfNotSucceed) Returns the value returned byaction
ordefaultIfNotSucceed
if exception happens.static <T,
R, E extends Exception>
RtryOrDefaultIfNotSucceed
(T init, Throwables.Function<? super T, ? extends R, E> func, R defaultIfNotSucceed) Returns the value returned byaction
ordefaultIfNotSucceed
if exception happens.static <R> u.Nullable<R>
tryOrEmptyIfNotSucceed
(Callable<R> cmd) Returns aNullable
with the value returned byaction
or an emptyNullable
if exception happens.static <T,
R, E extends Exception>
u.Nullable<R>tryOrEmptyIfNotSucceed
(T init, Throwables.Function<? super T, ? extends R, E> func) Returns aNullable
with the value returned byfunc.apply(init)
or an emptyNullable
if exception happens.static <T> com.landawn.abacus.type.Type<T>
static <T> com.landawn.abacus.type.Type<T>
static Class<?>
Returns the corresponding primitive type oftype
if it is a wrapper type; otherwise returnstype
itself.unzip
(Iterable<? extends T> c, Throwables.BiConsumer<? super T, Pair<A, B>, E> unzip) static <T,
A, B, LC extends Collection<A>, RC extends Collection<B>, E extends Exception>
Pair<LC,RC> unzip
(Iterable<? extends T> c, Throwables.BiConsumer<? super T, Pair<A, B>, E> unzip, IntFunction<? extends Collection<?>> supplier) unzipp
(Iterable<? extends T> c, Throwables.BiConsumer<? super T, Triple<A, B, C>, E> unzip) static <T,
A, B, C, LC extends Collection<A>, MC extends Collection<B>, RC extends Collection<C>, E extends Exception>
Triple<LC,MC, RC> unzipp
(Iterable<? extends T> c, Throwables.BiConsumer<? super T, Triple<A, B, C>, E> unzip, IntFunction<? extends Collection<?>> supplier) static <T> T
static <T> T
static String
static String
static String
uuid()
Returns an UUID.static <T> T
static Class<?>
Returns the corresponding wrapper type oftype
if it is a primitive type; otherwise returnstype
itself.static String
Xml 2 JSON.static String
Xml 2 JSON.zip
(A[] a, B[] b, A valueForNoneA, B valueForNoneB, Throwables.BiFunction<? super A, ? super B, ? extends R, E> zipFunction) zip
(A[] a, B[] b, C[] c, A valueForNoneA, B valueForNoneB, C valueForNoneC, Throwables.TriFunction<? super A, ? super B, ? super C, ? extends R, E> zipFunction) zip
(A[] a, B[] b, C[] c, Throwables.TriFunction<? super A, ? super B, ? super C, ? extends R, E> zipFunction) zip
(A[] a, B[] b, Throwables.BiFunction<? super A, ? super B, ? extends R, E> zipFunction) 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, ? extends R, E> zipFunction) 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, ? extends R, E> zipFunction) 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, ? extends R, E> zipFunction) static <A,
B, R, E extends Exception>
R[]zip
(Class<R> targetElementType, A[] a, B[] b, Throwables.BiFunction<? super A, ? super B, ? extends R, E> zipFunction) zip
(Iterable<A> a, Iterable<B> b, A valueForNoneA, B valueForNoneB, Throwables.BiFunction<? super A, ? super B, ? extends R, E> zipFunction) zip
(Iterable<A> a, Iterable<B> b, Throwables.BiFunction<? super A, ? super B, ? extends R, E> zipFunction) zip
(Iterable<A> a, Iterable<B> b, Iterable<C> c, A valueForNoneA, B valueForNoneB, C valueForNoneC, Throwables.TriFunction<? super A, ? super B, ? super C, ? extends R, E> zipFunction) zip
(Iterable<A> a, Iterable<B> b, Iterable<C> c, Throwables.TriFunction<? super A, ? super B, ? super C, ? extends R, E> zipFunction)
-
Field Details
-
INDEX_NOT_FOUND
public static final int INDEX_NOT_FOUNDThe index value when an element is not found in a list or array:-1
. This value is returned by methods in this class and can also be used in comparisons with values returned by various method fromList
.- See Also:
-
EMPTY_STRING
-
EMPTY_BOOLEAN_ARRAY
public static final boolean[] EMPTY_BOOLEAN_ARRAYAn empty immutableboolean
array. -
EMPTY_CHAR_ARRAY
public static final char[] EMPTY_CHAR_ARRAYAn empty immutablechar
array. -
EMPTY_BYTE_ARRAY
public static final byte[] EMPTY_BYTE_ARRAYAn empty immutablebyte
array. -
EMPTY_SHORT_ARRAY
public static final short[] EMPTY_SHORT_ARRAYAn empty immutableshort
array. -
EMPTY_INT_ARRAY
public static final int[] EMPTY_INT_ARRAYAn empty immutableint
array. -
EMPTY_LONG_ARRAY
public static final long[] EMPTY_LONG_ARRAYAn empty immutablelong
array. -
EMPTY_FLOAT_ARRAY
public static final float[] EMPTY_FLOAT_ARRAYAn empty immutablefloat
array. -
EMPTY_DOUBLE_ARRAY
public static final double[] EMPTY_DOUBLE_ARRAYAn empty immutabledouble
array. -
EMPTY_BOOLEAN_OBJ_ARRAY
An empty immutableBoolean
array. -
EMPTY_CHAR_OBJ_ARRAY
An empty immutableCharacter
array. -
EMPTY_BYTE_OBJ_ARRAY
An empty immutableByte
array. -
EMPTY_SHORT_OBJ_ARRAY
An empty immutableShort
array. -
EMPTY_INT_OBJ_ARRAY
An empty immutableInteger
array. -
EMPTY_LONG_OBJ_ARRAY
An empty immutableLong
array. -
EMPTY_FLOAT_OBJ_ARRAY
An empty immutableFloat
array. -
EMPTY_DOUBLE_OBJ_ARRAY
An empty immutableDouble
array. -
EMPTY_STRING_ARRAY
An empty immutableString
array. -
EMPTY_DATE_ARRAY
An empty immutableDate
array. -
EMPTY_OBJECT_ARRAY
An empty immutableObject
array.
-
-
Method Details
-
occurrencesOf
public static int occurrencesOf(boolean[] a, boolean valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
occurrencesOf
public static int occurrencesOf(char[] a, char valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
occurrencesOf
public static int occurrencesOf(byte[] a, byte valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
occurrencesOf
public static int occurrencesOf(short[] a, short valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
occurrencesOf
public static int occurrencesOf(int[] a, int valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
occurrencesOf
public static int occurrencesOf(long[] a, long valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
occurrencesOf
public static int occurrencesOf(float[] a, float valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
occurrencesOf
public static int occurrencesOf(double[] a, double valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
occurrencesOf
- Parameters:
a
-valueToFind
-- Returns:
-
occurrencesOf
- Parameters:
c
-valueToFind
-- Returns:
- See Also:
-
occurrencesOf
-
occurrencesOf
- Parameters:
str
-substr
-- Returns:
- See Also:
-
occurrencesMap
- Type Parameters:
T
-- Parameters:
a
-- Returns:
- See Also:
-
occurrencesMap
- Type Parameters:
T
-- Parameters:
a
-mapSupplier
-- Returns:
- See Also:
-
occurrencesMap
- Type Parameters:
T
-- Parameters:
c
-- Returns:
- See Also:
-
occurrencesMap
public static <T> Map<T,Integer> occurrencesMap(Iterable<T> c, Supplier<Map<T, Integer>> mapSupplier) - Type Parameters:
T
-- Parameters:
c
-mapSupplier
-- Returns:
- See Also:
-
occurrencesMap
- Type Parameters:
T
-- Parameters:
c
-- Returns:
- See Also:
-
occurrencesMap
public static <T> Map<T,Integer> occurrencesMap(Iterator<T> iter, Supplier<Map<T, Integer>> mapSupplier) - Type Parameters:
T
-- Parameters:
iter
-mapSupplier
-- Returns:
- See Also:
-
contains
public static boolean contains(boolean[] a, boolean valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
contains
public static boolean contains(char[] a, char valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
contains
public static boolean contains(byte[] a, byte valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
contains
public static boolean contains(short[] a, short valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
contains
public static boolean contains(int[] a, int valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
contains
public static boolean contains(long[] a, long valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
contains
public static boolean contains(float[] a, float valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
contains
public static boolean contains(double[] a, double valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
contains
- Parameters:
a
-valueToFind
-- Returns:
-
contains
- Parameters:
c
-valueToFind
-- Returns:
-
contains
-
containsAll
- Parameters:
c
-valuesToFind
- the objs to find- Returns:
-
containsAll
- Parameters:
c
-valuesToFind
- the objs to find- Returns:
-
containsAll
-
containsAny
- Parameters:
c
-valuesToFind
- the objs to find- Returns:
-
containsAny
- Parameters:
c
-valuesToFind
- the objs to find- Returns:
-
containsAny
-
getElement
public static <T> T getElement(Collection<? extends T> c, int index) throws IndexOutOfBoundsException - Type Parameters:
T
-- Parameters:
c
-index
-- Returns:
- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
getOnlyElement
public static <T> u.Nullable<T> getOnlyElement(Iterable<? extends T> iterable) throws TooManyElementsException Gets the only element.- Type Parameters:
T
-- Parameters:
iterable
-- Returns:
- throws TooManyElementsException if there are more than one elements in the specified
iterable
. - Throws:
TooManyElementsException
-
getOnlyElement
public static <T> u.Nullable<T> getOnlyElement(Iterator<? extends T> iter) throws TooManyElementsException Gets the only element.- Type Parameters:
T
-- Parameters:
iter
-- Returns:
- throws TooManyElementsException if there are more than one elements in the specified
iter
. - Throws:
TooManyElementsException
- the duplicated result exception
-
split
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 isnull
or empty.- Parameters:
a
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Parameters:
a
-fromIndex
-toIndex
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Parameters:
a
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Parameters:
a
-fromIndex
-toIndex
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Parameters:
a
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Parameters:
a
-fromIndex
-toIndex
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Parameters:
a
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Parameters:
a
-fromIndex
-toIndex
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Parameters:
a
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Parameters:
a
-fromIndex
-toIndex
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Parameters:
a
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Parameters:
a
-fromIndex
-toIndex
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Parameters:
a
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Parameters:
a
-fromIndex
-toIndex
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Parameters:
a
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Parameters:
a
-fromIndex
-toIndex
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Type Parameters:
T
-- Parameters:
a
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-chunkSize
- the desired size of each sub array (the last may be smaller).- Returns:
-
split
Returns consecutive sub lists of a collection, each of the same chunkSize (the final list may be smaller). or an empty List if the specified collection isnull
or empty. The order of elements in the original collection is kept- Type Parameters:
T
-- Parameters:
c
-chunkSize
- the desired size of each sub list (the last may be smaller).- Returns:
-
split
public 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). or an empty List if the specified collection isnull
or empty. The order of elements in the original collection is kept- Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-chunkSize
- the desired size of each sub list (the last may be smaller).- Returns:
-
split
-
split
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 isnull
or empty.- Parameters:
str
-chunkSize
- the desired size of each sub String (the last may be smaller).- Returns:
-
split
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 isnull
or empty.- Parameters:
str
-fromIndex
-toIndex
-chunkSize
- the desired size of each sub String (the last may be smaller).- Returns:
-
splitByCount
public static <T> Stream<T> splitByCount(int maxCount, int totalSize, boolean smallerFirst, IntBiFunction<? extends T> func) final int[] a = Array.rangeClosed(1, 7); splitByCount(5, 7, true, (fromIndex, toIndex) -> N.copyOfRange(a, fromIndex, toIndex)).forEach(Fn.println()); // [[1], [2], [3], [4, 5], [6, 7]] splitByCount(5, 7, false, (fromIndex, toIndex) -> N.copyOfRange(a, fromIndex, toIndex)).forEach(Fn.println()); // [[1, 2], [3, 4], [5], [6], [7]]
- Type Parameters:
T
-- Parameters:
maxCount
- max count of chunk want to splittotalSize
into.totalSize
-smallerFirst
-func
-- Returns:
- the stream
-
concat
public static boolean[] concat(boolean[] a, boolean[] b) - Parameters:
a
-b
-- Returns:
-
concat
- Parameters:
aa
-- Returns:
-
concat
public static char[] concat(char[] a, char[] b) - Parameters:
a
-b
-- Returns:
-
concat
- Parameters:
aa
-- Returns:
-
concat
public static byte[] concat(byte[] a, byte[] b) - Parameters:
a
-b
-- Returns:
-
concat
- Parameters:
aa
-- Returns:
-
concat
public static short[] concat(short[] a, short[] b) - Parameters:
a
-b
-- Returns:
-
concat
- Parameters:
aa
-- Returns:
-
concat
public static int[] concat(int[] a, int[] b) - Parameters:
a
-b
-- Returns:
-
concat
- Parameters:
aa
-- Returns:
-
concat
public static long[] concat(long[] a, long[] b) - Parameters:
a
-b
-- Returns:
-
concat
- Parameters:
aa
-- Returns:
-
concat
public static float[] concat(float[] a, float[] b) - Parameters:
a
-b
-- Returns:
-
concat
- Parameters:
aa
-- Returns:
-
concat
public static double[] concat(double[] a, double[] b) - Parameters:
a
-b
-- Returns:
-
concat
- Parameters:
aa
-- Returns:
-
concat
public static <T> T[] concat(T[] a, T[] b) - Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
concat
- Type Parameters:
T
-- Parameters:
aa
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray
isnull
.
-
concat
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
concat
- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
concat
- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
concat
public static <T,C extends Collection<T>> C concat(Collection<? extends Iterable<? extends T>> c, IntFunction<? extends C> supplier) - Type Parameters:
T
-C
-- Parameters:
c
-supplier
-- Returns:
-
concat
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
- See Also:
-
concat
- Type Parameters:
T
-- Parameters:
a
-- Returns:
- See Also:
-
flatten
public static boolean[] flatten(boolean[][] a) - Parameters:
a
-- Returns:
- an empty
boolean[]
ifa
is null.
-
flatten
public static char[] flatten(char[][] a) - Parameters:
a
-- Returns:
- an empty
char[]
ifa
is null.
-
flatten
public static byte[] flatten(byte[][] a) - Parameters:
a
-- Returns:
- an empty
byte[]
ifa
is null.
-
flatten
public static short[] flatten(short[][] a) - Parameters:
a
-- Returns:
- an empty
short[]
ifa
is null.
-
flatten
public static int[] flatten(int[][] a) - Parameters:
a
-- Returns:
- an empty
int[]
ifa
is null.
-
flatten
public static long[] flatten(long[][] a) - Parameters:
a
-- Returns:
- an empty
long[]
ifa
is null.
-
flatten
public static float[] flatten(float[][] a) - Parameters:
a
-- Returns:
- an empty
float[]
ifa
is null.
-
flatten
public static double[] flatten(double[][] a) - Parameters:
a
-- Returns:
- an empty
double[]
ifa
is null.
-
flatten
public static <T> T[] flatten(T[][] a) - Type Parameters:
T
-- Parameters:
a
-- Returns:
null
ifa
is null.
-
flatten
- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
flatten
- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
flatten
public static <T,C extends Collection<T>> C flatten(Collection<? extends Collection<? extends T>> c, IntFunction<? extends C> supplier) - Type Parameters:
T
-- Parameters:
c
-- Returns:
-
intersection
public static boolean[] intersection(boolean[] a, boolean[] b) - Parameters:
a
-b
-- Returns:
- See Also:
-
intersection
public static char[] intersection(char[] a, char[] b) - Parameters:
a
-b
-- Returns:
- See Also:
-
intersection
public static byte[] intersection(byte[] a, byte[] b) - Parameters:
a
-b
-- Returns:
- See Also:
-
intersection
public static short[] intersection(short[] a, short[] b) - Parameters:
a
-b
-- Returns:
- See Also:
-
intersection
public static int[] intersection(int[] a, int[] b) Returns a new array with all the elements inb
removed by occurrences.int[] a = {0, 1, 2, 2, 3}; int[] b = {2, 5, 1}; int[] c = retainAll(a, b); // The elements c in a will b: [1, 2, 2]. int[] a = {0, 1, 2, 2, 3}; int[] b = {2, 5, 1}; int[] c = intersection(a, b); // The elements c in a will b: [1, 2].
- Parameters:
a
-b
-- Returns:
- See Also:
-
intersection
public static long[] intersection(long[] a, long[] b) - Parameters:
a
-b
-- Returns:
- See Also:
-
intersection
public static float[] intersection(float[] a, float[] b) - Parameters:
a
-b
-- Returns:
- See Also:
-
intersection
public static double[] intersection(double[] a, double[] b) - Parameters:
a
-b
-- Returns:
- See Also:
-
intersection
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
- See Also:
-
intersection
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
- See Also:
-
intersection
- Type Parameters:
T
-- Parameters:
c
-- Returns:
- See Also:
-
difference
public static boolean[] difference(boolean[] a, boolean[] b) Returns the elements froma
, but exclude the elements inb
by occurrences.- Parameters:
a
-b
-- Returns:
- See Also:
-
difference
public static char[] difference(char[] a, char[] b) Returns the elements froma
, but exclude the elements inb
by occurrences.- Parameters:
a
-b
-- Returns:
- See Also:
-
difference
public static byte[] difference(byte[] a, byte[] b) Returns the elements froma
, but exclude the elements inb
by occurrences.- Parameters:
a
-b
-- Returns:
- See Also:
-
difference
public static short[] difference(short[] a, short[] b) Returns the elements froma
, but exclude the elements inb
by occurrences.- Parameters:
a
-b
-- Returns:
- See Also:
-
difference
public static int[] difference(int[] a, int[] b) Returns the elements froma
, but exclude the elements inb
by occurrences.int[] a = {0, 1, 2, 2, 3}; int[] b = {2, 5, 1}; int[] c = removeAll(a, b); // The elements c in a will b: [0, 3]. int[] a = {0, 1, 2, 2, 3}; int[] b = {2, 5, 1}; int[] c = difference(a, b); // The elements c in a will b: [0, 2, 3].
- Parameters:
a
-b
-- Returns:
- See Also:
-
difference
public static long[] difference(long[] a, long[] b) Returns the elements froma
, but exclude the elements inb
by occurrences.- Parameters:
a
-b
-- Returns:
- See Also:
-
difference
public static float[] difference(float[] a, float[] b) Returns the elements froma
, but exclude the elements inb
by occurrences.- Parameters:
a
-b
-- Returns:
- See Also:
-
difference
public static double[] difference(double[] a, double[] b) Returns the elements froma
, but exclude the elements inb
by occurrences.- Parameters:
a
-b
-- Returns:
- See Also:
-
difference
Returns the elements froma
, but exclude the elements inb
by occurrences.- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
- See Also:
-
difference
Returns the elements froma
, but exclude the elements inb
by occurrences.- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
- See Also:
-
symmetricDifference
public static boolean[] symmetricDifference(boolean[] a, boolean[] b) - Parameters:
a
-b
-- Returns:
- See Also:
-
symmetricDifference
public static char[] symmetricDifference(char[] a, char[] b) - Parameters:
a
-b
-- Returns:
- See Also:
-
symmetricDifference
public static byte[] symmetricDifference(byte[] a, byte[] b) - Parameters:
a
-b
-- Returns:
- See Also:
-
symmetricDifference
public static short[] symmetricDifference(short[] a, short[] b) - Parameters:
a
-b
-- Returns:
- See Also:
-
symmetricDifference
public static int[] symmetricDifference(int[] a, int[] b) int[] a = {0, 1, 2, 2, 3}; int[] b = {2, 5, 1}; int[] c = symmetricDifference(a, b); // The elements c in a will b: [0, 2, 3, 5].
- Parameters:
a
-b
-- Returns:
- See Also:
-
IntList.symmetricDifference(IntList)
CommonUtil#difference(int[], int[])
-
symmetricDifference
public static long[] symmetricDifference(long[] a, long[] b) - Parameters:
a
-b
-- Returns:
- See Also:
-
symmetricDifference
public static float[] symmetricDifference(float[] a, float[] b) - Parameters:
a
-b
-- Returns:
- See Also:
-
symmetricDifference
public static double[] symmetricDifference(double[] a, double[] b) - Parameters:
a
-b
-- Returns:
- See Also:
-
symmetricDifference
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
- See Also:
-
symmetricDifference
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
- See Also:
-
differentSet
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
- the sets the
- See Also:
-
symmetricDifferentSet
public static <T> Set<T> symmetricDifferentSet(Collection<? extends T> a, Collection<? extends T> b) Symmetric different set.- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
- the sets the
- See Also:
-
commonSet
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
- the sets the
- See Also:
-
commonSet
- Type Parameters:
T
-- Parameters:
c
-- Returns:
- the sets the
- See Also:
-
exclude
Returns a newList
with specifiedobjToExclude
excluded. That's to say no moreobjToExclude
will present in the returnedList
.- Type Parameters:
T
-- Parameters:
c
-objToExclude
-- Returns:
- a new
List
- See Also:
-
excludeToSet
Returns a newSet
with specifiedobjToExclude
excluded. That's to say no moreobjToExclude
will present in the returnedSet
.- Type Parameters:
T
-- Parameters:
c
-objToExclude
-- Returns:
- a new
Set
- See Also:
-
excludeAll
Returns a newList
with specifiedobjsToExclude
excluded. That's to say no moreobjsToExclude
will present in the returnedList
.- Parameters:
c
-objsToExclude
-- Returns:
- a new
List
- See Also:
-
excludeAllToSet
Returns a newSet
with specifiedobjsToExclude
excluded. That's to say no moreobjsToExclude
will present in the returnedSet
.- Parameters:
c
-objsToExclude
-- Returns:
- a new
Set
- See Also:
-
isSubCollection
Returnstrue
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.- Parameters:
subColl
- the first (sub?) collection, must not be nullcoll
- the second (super?) collection, must not be null- Returns:
true
if subColl is a sub-collection of coll- See Also:
-
isProperSubCollection
Returnstrue
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()
andcoll.size()
represent the total cardinality of a and b, resp.subColl.size() < Integer.MAXVALUE
- Parameters:
subColl
- the first (sub?) collection, must not be nullcoll
- the second (super?) collection, must not be null- Returns:
true
if subColl is a proper sub-collection of coll- See Also:
-
isEqualCollection
Returnstrue
if the givenCollection
s 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.
- Parameters:
a
- the first collectionb
- the second collection- Returns:
true
if the collections contain the same elements with the same cardinalities.
-
replaceAll
public static int replaceAll(boolean[] a, boolean oldVal, boolean newVal) - Parameters:
a
-oldVal
-newVal
-- Returns:
-
replaceAll
public static int replaceAll(char[] a, char oldVal, char newVal) - Parameters:
a
-oldVal
-newVal
-- Returns:
-
replaceAll
public static int replaceAll(byte[] a, byte oldVal, byte newVal) - Parameters:
a
-oldVal
-newVal
-- Returns:
-
replaceAll
public static int replaceAll(short[] a, short oldVal, short newVal) - Parameters:
a
-oldVal
-newVal
-- Returns:
-
replaceAll
public static int replaceAll(int[] a, int oldVal, int newVal) - Parameters:
a
-oldVal
-newVal
-- Returns:
-
replaceAll
public static int replaceAll(long[] a, long oldVal, long newVal) - Parameters:
a
-oldVal
-newVal
-- Returns:
-
replaceAll
public static int replaceAll(float[] a, float oldVal, float newVal) - Parameters:
a
-oldVal
-newVal
-- Returns:
-
replaceAll
public static int replaceAll(double[] a, double oldVal, double newVal) - Parameters:
a
-oldVal
-newVal
-- Returns:
-
replaceAll
- Type Parameters:
T
-- Parameters:
a
-oldVal
-newVal
-- Returns:
-
replaceAll
- Type Parameters:
T
-- Parameters:
list
-oldVal
-newVal
-- Returns:
-
replaceAll
public static <E extends Exception> void replaceAll(boolean[] a, Throwables.BooleanUnaryOperator<E> operator) throws E - Throws:
E extends Exception
-
replaceAll
public static <E extends Exception> void replaceAll(char[] a, Throwables.CharUnaryOperator<E> operator) throws E - Throws:
E extends Exception
-
replaceAll
public static <E extends Exception> void replaceAll(byte[] a, Throwables.ByteUnaryOperator<E> operator) throws E - Throws:
E extends Exception
-
replaceAll
public static <E extends Exception> void replaceAll(short[] a, Throwables.ShortUnaryOperator<E> operator) throws E - Throws:
E extends Exception
-
replaceAll
public static <E extends Exception> void replaceAll(int[] a, Throwables.IntUnaryOperator<E> operator) throws E - Throws:
E extends Exception
-
replaceAll
public static <E extends Exception> void replaceAll(long[] a, Throwables.LongUnaryOperator<E> operator) throws E - Throws:
E extends Exception
-
replaceAll
public static <E extends Exception> void replaceAll(float[] a, Throwables.FloatUnaryOperator<E> operator) throws E - Throws:
E extends Exception
-
replaceAll
public static <E extends Exception> void replaceAll(double[] a, Throwables.DoubleUnaryOperator<E> operator) throws E - Throws:
E extends Exception
-
replaceAll
public static <T,E extends Exception> void replaceAll(T[] a, Throwables.UnaryOperator<T, E> operator) throws E- Throws:
E extends Exception
-
replaceAll
public static <T,E extends Exception> int replaceAll(List<T> list, Throwables.UnaryOperator<T, E> operator) throws E- Throws:
E extends Exception
-
replaceIf
public static <E extends Exception> int replaceIf(boolean[] a, Throwables.BooleanPredicate<E> predicate, boolean newValue) throws E - Throws:
E extends Exception
-
replaceIf
public static <E extends Exception> int replaceIf(char[] a, Throwables.CharPredicate<E> predicate, char newValue) throws E - Throws:
E extends Exception
-
replaceIf
public static <E extends Exception> int replaceIf(byte[] a, Throwables.BytePredicate<E> predicate, byte newValue) throws E - Throws:
E extends Exception
-
replaceIf
public static <E extends Exception> int replaceIf(short[] a, Throwables.ShortPredicate<E> predicate, short newValue) throws E - Throws:
E extends Exception
-
replaceIf
public static <E extends Exception> int replaceIf(int[] a, Throwables.IntPredicate<E> predicate, int newValue) throws E - Throws:
E extends Exception
-
replaceIf
public static <E extends Exception> int replaceIf(long[] a, Throwables.LongPredicate<E> predicate, long newValue) throws E - Throws:
E extends Exception
-
replaceIf
public static <E extends Exception> int replaceIf(float[] a, Throwables.FloatPredicate<E> predicate, float newValue) throws E - Throws:
E extends Exception
-
replaceIf
public static <E extends Exception> int replaceIf(double[] a, Throwables.DoublePredicate<E> predicate, double newValue) throws E - Throws:
E extends Exception
-
replaceIf
public static <T,E extends Exception> int replaceIf(T[] a, Throwables.Predicate<? super T, E> predicate, T newValue) throws E- Throws:
E extends Exception
-
replaceIf
public static <T,E extends Exception> int replaceIf(List<T> c, Throwables.Predicate<? super T, E> predicate, T newValue) throws E- Throws:
E extends Exception
-
add
public static boolean[] add(boolean[] a, boolean elementToAdd) Copies the given array and adds the given elementToAdd at the end of the new array.
- Parameters:
a
-elementToAdd
-- Returns:
- A new array containing the existing elementToAdds plus the new elementToAdd
-
add
public static char[] add(char[] a, char elementToAdd) Copies the given array and adds the given elementToAdd at the end of the new array.
- Parameters:
a
-elementToAdd
-- Returns:
- A new array containing the existing elementToAdds plus the new elementToAdd
-
add
public static byte[] add(byte[] a, byte elementToAdd) Copies the given array and adds the given elementToAdd at the end of the new array.
- Parameters:
a
-elementToAdd
-- Returns:
- A new array containing the existing elementToAdds plus the new elementToAdd
-
add
public static short[] add(short[] a, short elementToAdd) Copies the given array and adds the given elementToAdd at the end of the new array.
- Parameters:
a
-elementToAdd
-- Returns:
- A new array containing the existing elementToAdds plus the new elementToAdd
-
add
public static int[] add(int[] a, int elementToAdd) Copies the given array and adds the given elementToAdd at the end of the new array.
- Parameters:
a
-elementToAdd
-- Returns:
- A new array containing the existing elementToAdds plus the new elementToAdd
-
add
public static long[] add(long[] a, long elementToAdd) Copies the given array and adds the given elementToAdd at the end of the new array.
- Parameters:
a
-elementToAdd
-- Returns:
- A new array containing the existing elementToAdds plus the new elementToAdd
-
add
public static float[] add(float[] a, float elementToAdd) Copies the given array and adds the given elementToAdd at the end of the new array.
- Parameters:
a
-elementToAdd
-- Returns:
- A new array containing the existing elementToAdds plus the new elementToAdd
-
add
public static double[] add(double[] a, double elementToAdd) Copies the given array and adds the given elementToAdd at the end of the new array.
- Parameters:
a
-elementToAdd
-- Returns:
- A new array containing the existing elementToAdds plus the new elementToAdd
-
add
Copies the given array and adds the given elementToAdd at the end of the new array.
- Parameters:
a
-elementToAdd
-- Returns:
- A new array containing the existing elementToAdds plus the new elementToAdd
-
add
Copies the given array and adds the given elementToAdd at the end of the new array.
- Type Parameters:
T
-- Parameters:
a
-elementToAdd
-- Returns:
- A new array containing the existing elementToAdds plus the new elementToAdd
- Throws:
IllegalArgumentException
- if the specifiedArray
isnull
.
-
addAll
Adds all the elementToAdds of the given arrays into a new array.
- Parameters:
a
- the first array whose elementToAdds are added to the new array.elementsToAdd
- the second array whose elementToAdds are added to the new array.- Returns:
- A new array containing the elementToAdds from a and b
-
addAll
Adds all the elementToAdds of the given arrays into a new array.
- Parameters:
a
- the first array whose elementToAdds are added to the new array.elementsToAdd
- the second array whose elementToAdds are added to the new array.- Returns:
- A new array containing the elementToAdds from a and b
-
addAll
Adds all the elementToAdds of the given arrays into a new array.
- Parameters:
a
- the first array whose elementToAdds are added to the new array.elementsToAdd
- the second array whose elementToAdds are added to the new array.- Returns:
- A new array containing the elementToAdds from a and b
-
addAll
Adds all the elementToAdds of the given arrays into a new array.
- Parameters:
a
- the first array whose elementToAdds are added to the new array.elementsToAdd
- the second array whose elementToAdds are added to the new array.- Returns:
- A new array containing the elementToAdds from a and b
-
addAll
Adds all the elementToAdds of the given arrays into a new array.
- Parameters:
a
- the first array whose elementToAdds are added to the new array.elementsToAdd
- the second array whose elementToAdds are added to the new array.- Returns:
- A new array containing the elementToAdds from a and b
-
addAll
Adds all the elementToAdds of the given arrays into a new array.
- Parameters:
a
- the first array whose elementToAdds are added to the new array.elementsToAdd
- the second array whose elementToAdds are added to the new array.- Returns:
- A new array containing the elementToAdds from a and b
-
addAll
Adds all the elementToAdds of the given arrays into a new array.
- Parameters:
a
- the first array whose elementToAdds are added to the new array.elementsToAdd
- the second array whose elementToAdds are added to the new array.- Returns:
- A new array containing the elementToAdds from a and b
-
addAll
Adds all the elementToAdds of the given arrays into a new array.
- Parameters:
a
- the first array whose elementToAdds are added to the new array.elementsToAdd
- the second array whose elementToAdds are added to the new array.- Returns:
- A new array containing the elementToAdds from a and b
-
addAll
Adds all the elementToAdds of the given arrays into a new array.
- Parameters:
a
- the first array whose elementToAdds are added to the new array.elementsToAdd
- the second array whose elementToAdds are added to the new array.- Returns:
- A new array containing the elementToAdds from a and b
-
addAll
@SafeVarargs public static <T> T[] addAll(T[] a, T... elementsToAdd) throws IllegalArgumentException Adds all the elementToAdds of the given arrays into a new array.
- Type Parameters:
T
-- Parameters:
a
- the first array whose elementToAdds are added to the new array.elementsToAdd
- the second array whose elementToAdds are added to the new array.- Returns:
- A new array containing the elementToAdds from a and b
- Throws:
IllegalArgumentException
- if the specifiedArray
isnull
.
-
addAll
public static <T> boolean addAll(Collection<T> c, T... elementsToAdd) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
c
-elements
-- Returns:
- Throws:
IllegalArgumentException
-
addAll
public static <T> boolean addAll(Collection<T> c, Iterator<? extends T> elementsToAdd) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
c
-elementsToAdd
-- Returns:
true
if the specified Collectionc
has been modified.- Throws:
IllegalArgumentException
-
insert
public 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.
- Parameters:
a
-index
- the position of the new objectelementToInsert
- the object to add- Returns:
- A new array containing the existing elementToInserts and the new elementToInsert
-
insert
public 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.
- Parameters:
a
-index
- the position of the new objectelementToInsert
- the object to add- Returns:
- A new array containing the existing elementToInserts and the new elementToInsert
-
insert
public 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.
- Parameters:
a
-index
- the position of the new objectelementToInsert
- the object to add- Returns:
- A new array containing the existing elementToInserts and the new elementToInsert
-
insert
public 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.
- Parameters:
a
-index
- the position of the new objectelementToInsert
- the object to add- Returns:
- A new array containing the existing elementToInserts and the new elementToInsert
-
insert
public 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.
- Parameters:
a
-index
- the position of the new objectelementToInsert
- the object to add- Returns:
- A new array containing the existing elementToInserts and the new elementToInsert
-
insert
public 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.
- Parameters:
a
-index
- the position of the new objectelementToInsert
- the object to add- Returns:
- A new array containing the existing elementToInserts and the new elementToInsert
-
insert
public 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.
- Parameters:
a
-index
- the position of the new objectelementToInsert
- the object to add- Returns:
- A new array containing the existing elementToInserts and the new elementToInsert
-
insert
public 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.
- Parameters:
a
-index
- the position of the new objectelementToInsert
- the object to add- Returns:
- A new array containing the existing elementToInserts and the new elementToInsert
-
insert
- Parameters:
a
-index
-elementToInsert
-- Returns:
-
insert
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.
- Type Parameters:
T
-- Parameters:
a
-index
- the position of the new objectelementToInsert
- the object to add- Returns:
- A new array containing the existing elementToInserts and the new elementToInsert
- Throws:
IllegalArgumentException
- if the specifiedArray
isnull
.
-
insert
Returns a new String- Parameters:
str
-index
-strToInsert
-- Returns:
- a new String
-
insertAll
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).
- Parameters:
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.- Returns:
- A new array containing the elementToInserts from a and b
-
insertAll
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).
- Parameters:
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.- Returns:
- A new array containing the elementToInserts from a and b
-
insertAll
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).
- Parameters:
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.- Returns:
- A new array containing the elementToInserts from a and b
-
insertAll
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).
- Parameters:
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.- Returns:
- A new array containing the elementToInserts from a and b
-
insertAll
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).
- Parameters:
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.- Returns:
- A new array containing the elementToInserts from a and b
-
insertAll
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).
- Parameters:
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.- Returns:
- A new array containing the elementToInserts from a and b
-
insertAll
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).
- Parameters:
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.- Returns:
- A new array containing the elementToInserts from a and b
-
insertAll
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).
- Parameters:
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.- Returns:
- A new array containing the elementToInserts from a and b
-
insertAll
- Parameters:
a
-index
-elementsToInsert
-- Returns:
-
insertAll
@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).
- Type Parameters:
T
-- Parameters:
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.- Returns:
- A new array containing the elementToInserts from a and b
- Throws:
IllegalArgumentException
- if the specifiedArray
isnull
.
-
delete
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.
- Parameters:
a
-index
- the position of the element to be removed- Returns:
- A new array containing the existing elements except the element at the specified position.
-
delete
public 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.
- Parameters:
a
-index
- the position of the element to be removed- Returns:
- A new array containing the existing elements except the element at the specified position.
-
delete
public 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.
- Parameters:
a
-index
- the position of the element to be removed- Returns:
- A new array containing the existing elements except the element at the specified position.
-
delete
public 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.
- Parameters:
a
-index
- the position of the element to be removed- Returns:
- A new array containing the existing elements except the element at the specified position.
-
delete
public 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.
- Parameters:
a
-index
- the position of the element to be removed- Returns:
- A new array containing the existing elements except the element at the specified position.
-
delete
public 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.
- Parameters:
a
-index
- the position of the element to be removed- Returns:
- A new array containing the existing elements except the element at the specified position.
-
delete
public 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.
- Parameters:
a
-index
- the position of the element to be removed- Returns:
- A new array containing the existing elements except the element at the specified position.
-
delete
public 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.
- Parameters:
a
-index
- the position of the element to be removed- Returns:
- A new array containing the existing elements except the element at the specified position.
-
delete
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.
- Type Parameters:
T
- the component type of the array- Parameters:
a
-index
- the position of the element to be removed- Returns:
- A new array containing the existing elements except the element at the specified position.
- Throws:
IllegalArgumentException
- if the specifiedArray
isnull
.
-
deleteAll
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]
- Parameters:
a
- the array to remove the element from, may not benull
indices
- the positions of the elements to be removed- Returns:
- A new array containing the existing elements except those at the specified positions.
-
deleteAll
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) = []
- Parameters:
a
-indices
- the positions of the elements to be removed- Returns:
- A new array containing the existing elements except those at the specified positions.
-
deleteAll
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) = []
- Parameters:
a
-indices
- the positions of the elements to be removed- Returns:
- A new array containing the existing elements except those at the specified positions.
-
deleteAll
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) = []
- Parameters:
a
-indices
- the positions of the elements to be removed- Returns:
- A new array containing the existing elements except those at the specified positions.
-
deleteAll
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) = []
- Parameters:
a
-indices
- the positions of the elements to be removed- Returns:
- A new array containing the existing elements except those at the specified positions.
- Throws:
IndexOutOfBoundsException
- if any index is out of range (index < 0 || index >= array.length), or if the array isnull
.
-
deleteAll
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) = []
- Parameters:
a
- the array to remove the element from, may not benull
indices
- the positions of the elements to be removed- Returns:
- A new array containing the existing elements except those at the specified positions.
-
deleteAll
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) = []
- Parameters:
a
-indices
- the positions of the elements to be removed- Returns:
- A new array containing the existing elements except those at the specified positions.
-
deleteAll
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) = []
- Parameters:
a
-indices
- the positions of the elements to be removed- Returns:
- A new array containing the existing elements except those at the specified positions.
-
deleteAll
@SafeVarargs public static String[] deleteAll(String[] a, int... indices) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
deleteAll
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"]
- Type Parameters:
T
- the component type of the array- Parameters:
a
-indices
- the positions of the elements to be removed- Returns:
- A new array containing the existing elements except those at the specified positions.
- Throws:
IllegalArgumentException
- if the specifiedArray
isnull
.
-
deleteAll
Removes the elements at the specified positions from the specified List.- Parameters:
list
-indices
-- Returns:
-
remove
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.
- Parameters:
a
-elementToRemove
- the elementToRemove to be removed- Returns:
- A new array containing the existing elementsToRemove except the first occurrence of the specified elementToRemove.
-
remove
public 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.
- Parameters:
a
-elementToRemove
- the elementToRemove to be removed- Returns:
- A new array containing the existing elementsToRemove except the first occurrence of the specified elementToRemove.
-
remove
public 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.
- Parameters:
a
-elementToRemove
- the elementToRemove to be removed- Returns:
- A new array containing the existing elementsToRemove except the first occurrence of the specified elementToRemove.
-
remove
public 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.
- Parameters:
a
-elementToRemove
- the elementToRemove to be removed- Returns:
- A new array containing the existing elementsToRemove except the first occurrence of the specified elementToRemove.
-
remove
public 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.
- Parameters:
a
-elementToRemove
- the elementToRemove to be removed- Returns:
- A new array containing the existing elementsToRemove except the first occurrence of the specified elementToRemove.
-
remove
public 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.
- Parameters:
a
-elementToRemove
- the elementToRemove to be removed- Returns:
- A new array containing the existing elementsToRemove except the first occurrence of the specified elementToRemove.
-
remove
public 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.
- Parameters:
a
-elementToRemove
- the elementToRemove to be removed- Returns:
- A new array containing the existing elementsToRemove except the first occurrence of the specified elementToRemove.
-
remove
public 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.
- Parameters:
a
-elementToRemove
- the elementToRemove to be removed- Returns:
- A new array containing the existing elementsToRemove except the first occurrence of the specified elementToRemove.
-
remove
-
remove
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.
- Type Parameters:
T
-- Parameters:
a
-elementToRemove
- the elementToRemove to be removed- Returns:
- A new array containing the existing elementsToRemove except the first occurrence of the specified elementToRemove.
- Throws:
IllegalArgumentException
- if the specifiedArray
isnull
.
-
remove
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.
- Parameters:
c
-elementToRemove
- the elementToRemove to be removed- Returns:
- true if this collection changed as a result of the call
-
removeAllOccurrences
public static boolean[] removeAllOccurrences(boolean[] a, boolean elementToRemove) Removes all the occurrences 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.- Parameters:
a
-elementToRemove
-- Returns:
- A new array containing the existing elementsToRemove except the occurrences of the specified elementToRemove.
-
removeAllOccurrences
public static char[] removeAllOccurrences(char[] a, char elementToRemove) Removes all the occurrences 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.- Parameters:
a
-elementToRemove
-- Returns:
- A new array containing the existing elementsToRemove except the occurrences of the specified elementToRemove.
-
removeAllOccurrences
public static byte[] removeAllOccurrences(byte[] a, byte elementToRemove) Removes all the occurrences 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.- Parameters:
a
-elementToRemove
-- Returns:
- A new array containing the existing elementsToRemove except the occurrences of the specified elementToRemove.
-
removeAllOccurrences
public static short[] removeAllOccurrences(short[] a, short elementToRemove) Removes all the occurrences 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.- Parameters:
a
-elementToRemove
-- Returns:
- A new array containing the existing elementsToRemove except the occurrences of the specified elementToRemove.
-
removeAllOccurrences
public static int[] removeAllOccurrences(int[] a, int elementToRemove) Removes all the occurrences 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.- Parameters:
a
-elementToRemove
-- Returns:
- A new array containing the existing elementsToRemove except the occurrences of the specified elementToRemove.
-
removeAllOccurrences
public static long[] removeAllOccurrences(long[] a, long elementToRemove) Removes all the occurrences 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.- Parameters:
a
-elementToRemove
-- Returns:
- A new array containing the existing elementsToRemove except the occurrences of the specified elementToRemove.
-
removeAllOccurrences
public static float[] removeAllOccurrences(float[] a, float elementToRemove) Removes all the occurrences 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.- Parameters:
a
-elementToRemove
-- Returns:
- A new array containing the existing elementsToRemove except the occurrences of the specified elementToRemove.
-
removeAllOccurrences
public static double[] removeAllOccurrences(double[] a, double elementToRemove) Removes all the occurrences 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.- Parameters:
a
-elementToRemove
-- Returns:
- A new array containing the existing elementsToRemove except the occurrences of the specified elementToRemove.
-
removeAllOccurrences
-
removeAllOccurrences
public static <T> T[] removeAllOccurrences(T[] a, T elementToRemove) Removes all the occurrences 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.- Type Parameters:
T
-- Parameters:
a
-elementToRemove
-- Returns:
- A new array containing the existing elementsToRemove except the occurrences of the specified elementToRemove.
-
removeAllOccurrences
Removes the all occurrences.- Parameters:
c
-elementToRemove
-- Returns:
-
removeAll
Returns a new array with removes all the occurrences of specified elementsToRemove froma
.- Parameters:
a
-elementsToRemove
-- Returns:
- See Also:
-
removeAll
Returns a new array with removes all the occurrences of specified elementsToRemove froma
.- Parameters:
a
-elementsToRemove
-- Returns:
- See Also:
-
removeAll
Returns a new array with removes all the occurrences of specified elementsToRemove froma
.- Parameters:
a
-elementsToRemove
-- Returns:
- See Also:
-
removeAll
Returns a new array with removes all the occurrences of specified elementsToRemove froma
.- Parameters:
a
-elementsToRemove
-- Returns:
- See Also:
-
removeAll
Returns a new array with removes all the occurrences of specified elementsToRemove froma
.- Parameters:
a
-elementsToRemove
-- Returns:
- See Also:
-
removeAll
Returns a new array with removes all the occurrences of specified elementsToRemove froma
.- Parameters:
a
-elementsToRemove
-- Returns:
- See Also:
-
removeAll
Returns a new array with removes all the occurrences of specified elementsToRemove froma
.- Parameters:
a
-elementsToRemove
-- Returns:
- See Also:
-
removeAll
Returns a new array with removes all the occurrences of specified elementsToRemove froma
.- Parameters:
a
-elementsToRemove
-- Returns:
- See Also:
-
removeAll
Returns a new array with removes all the occurrences of specified elementsToRemove froma
.- Parameters:
a
-elementsToRemove
-- Returns:
- See Also:
-
removeAll
Returns a new array with removes all the occurrences of specified elementsToRemove froma
.- Type Parameters:
T
-- Parameters:
a
-elementsToRemove
-- Returns:
- See Also:
-
removeAll
Removes the all.- Parameters:
c
-elementsToRemove
-- Returns:
- See Also:
-
removeAll
Removes the all.- Parameters:
c
-elementsToRemove
-- Returns:
- See Also:
-
removeAll
-
deleteRange
public static boolean[] deleteRange(boolean[] a, int fromIndex, int toIndex) Deletes the values fromfromIndex
totoIndex
.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- a new array
-
deleteRange
public static char[] deleteRange(char[] a, int fromIndex, int toIndex) Deletes the values fromfromIndex
totoIndex
.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- a new array
-
deleteRange
public static byte[] deleteRange(byte[] a, int fromIndex, int toIndex) Deletes the values fromfromIndex
totoIndex
.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- a new array
-
deleteRange
public static short[] deleteRange(short[] a, int fromIndex, int toIndex) Deletes the values fromfromIndex
totoIndex
.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- a new array
-
deleteRange
public static int[] deleteRange(int[] a, int fromIndex, int toIndex) Deletes the values fromfromIndex
totoIndex
.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- a new array
-
deleteRange
public static long[] deleteRange(long[] a, int fromIndex, int toIndex) Deletes the values fromfromIndex
totoIndex
.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- a new array
-
deleteRange
public static float[] deleteRange(float[] a, int fromIndex, int toIndex) Deletes the values fromfromIndex
totoIndex
.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- a new array
-
deleteRange
public static double[] deleteRange(double[] a, int fromIndex, int toIndex) Deletes the values fromfromIndex
totoIndex
.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- a new array
-
deleteRange
public static String[] deleteRange(String[] a, int fromIndex, int toIndex) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
deleteRange
public static <T> T[] deleteRange(T[] a, int fromIndex, int toIndex) throws IllegalArgumentException Deletes the values fromfromIndex
totoIndex
.- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- a new array
- Throws:
IllegalArgumentException
- if the specifiedArray
isnull
.
-
deleteRange
Returnstrue
if theList
is updated whenfromIndex < toIndex
, otherwisefalse
is returned whenfromIndex == toIndex
.- Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
deleteRange
-
moveRange
public static void moveRange(boolean[] a, int fromIndex, int toIndex, int newPositionStartIndex) - Parameters:
a
-fromIndex
-toIndex
-newPositionStartIndex
- must in the range: [0, array.length - (toIndex - fromIndex)]
-
moveRange
public static void moveRange(char[] a, int fromIndex, int toIndex, int newPositionStartIndex) - Parameters:
a
-fromIndex
-toIndex
-newPositionStartIndex
- must in the range: [0, array.length - (toIndex - fromIndex)]
-
moveRange
public static void moveRange(byte[] a, int fromIndex, int toIndex, int newPositionStartIndex) - Parameters:
a
-fromIndex
-toIndex
-newPositionStartIndex
- must in the range: [0, array.length - (toIndex - fromIndex)]
-
moveRange
public static void moveRange(short[] a, int fromIndex, int toIndex, int newPositionStartIndex) - Parameters:
a
-fromIndex
-toIndex
-newPositionStartIndex
- must in the range: [0, array.length - (toIndex - fromIndex)]
-
moveRange
public static void moveRange(int[] a, int fromIndex, int toIndex, int newPositionStartIndex) - Parameters:
a
-fromIndex
-toIndex
-newPositionStartIndex
- must in the range: [0, array.length - (toIndex - fromIndex)]
-
moveRange
public static void moveRange(long[] a, int fromIndex, int toIndex, int newPositionStartIndex) - Parameters:
a
-fromIndex
-toIndex
-newPositionStartIndex
- must in the range: [0, array.length - (toIndex - fromIndex)]
-
moveRange
public static void moveRange(float[] a, int fromIndex, int toIndex, int newPositionStartIndex) - Parameters:
a
-fromIndex
-toIndex
-newPositionStartIndex
- must in the range: [0, array.length - (toIndex - fromIndex)]
-
moveRange
public static void moveRange(double[] a, int fromIndex, int toIndex, int newPositionStartIndex) - Parameters:
a
-fromIndex
-toIndex
-newPositionStartIndex
- must in the range: [0, array.length - (toIndex - fromIndex)]
-
moveRange
public static <T> void moveRange(T[] a, int fromIndex, int toIndex, int newPositionStartIndex) - Parameters:
a
-fromIndex
-toIndex
-newPositionStartIndex
- must in the range: [0, array.length - (toIndex - fromIndex)]
-
moveRange
public static <T> boolean moveRange(List<T> c, int fromIndex, int toIndex, int newPositionStartIndex) - Parameters:
c
-fromIndex
-toIndex
-newPositionStartIndex
- must in the range: [0, list.size() - (toIndex - fromIndex)]- Returns:
true
if the specifiedList
is updated.
-
moveRange
- Parameters:
str
-fromIndex
-toIndex
-newPositionStartIndex
- must in the range: [0, String.length - (toIndex - fromIndex)]
-
skipRange
-
skipRange
public static <T,C extends Collection<T>> C skipRange(Collection<T> c, int startInclusive, int endExclusive, IntFunction<C> supplier) -
removeDuplicates
public static boolean[] removeDuplicates(boolean[] a) Removes the duplicates.- Parameters:
a
-- Returns:
-
removeDuplicates
public static boolean[] removeDuplicates(boolean[] a, int fromIndex, int toIndex) Removes the duplicates.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
removeDuplicates
public static char[] removeDuplicates(char[] a) Removes the duplicates.- Parameters:
a
-- Returns:
-
removeDuplicates
public static char[] removeDuplicates(char[] a, boolean isSorted) Removes the duplicates.- Parameters:
a
-isSorted
-- Returns:
-
removeDuplicates
public static char[] removeDuplicates(char[] a, int fromIndex, int toIndex, boolean isSorted) Removes the duplicates.- Parameters:
a
-fromIndex
-toIndex
-isSorted
-- Returns:
-
removeDuplicates
public static byte[] removeDuplicates(byte[] a) Removes the duplicates.- Parameters:
a
-- Returns:
-
removeDuplicates
public static byte[] removeDuplicates(byte[] a, boolean isSorted) Removes the duplicates.- Parameters:
a
-isSorted
-- Returns:
-
removeDuplicates
public static byte[] removeDuplicates(byte[] a, int fromIndex, int toIndex, boolean isSorted) Removes the duplicates.- Parameters:
a
-fromIndex
-toIndex
-isSorted
-- Returns:
-
removeDuplicates
public static short[] removeDuplicates(short[] a) Removes the duplicates.- Parameters:
a
-- Returns:
-
removeDuplicates
public static short[] removeDuplicates(short[] a, boolean isSorted) Removes the duplicates.- Parameters:
a
-isSorted
-- Returns:
-
removeDuplicates
public static short[] removeDuplicates(short[] a, int fromIndex, int toIndex, boolean isSorted) Removes the duplicates.- Parameters:
a
-fromIndex
-toIndex
-isSorted
-- Returns:
-
removeDuplicates
public static int[] removeDuplicates(int[] a) Removes the duplicates.- Parameters:
a
-- Returns:
-
removeDuplicates
public static int[] removeDuplicates(int[] a, boolean isSorted) Removes the duplicates.- Parameters:
a
-isSorted
-- Returns:
-
removeDuplicates
public static int[] removeDuplicates(int[] a, int fromIndex, int toIndex, boolean isSorted) Removes the duplicates.- Parameters:
a
-fromIndex
-toIndex
-isSorted
-- Returns:
-
removeDuplicates
public static long[] removeDuplicates(long[] a) Removes the duplicates.- Parameters:
a
-- Returns:
-
removeDuplicates
public static long[] removeDuplicates(long[] a, boolean isSorted) Removes the duplicates.- Parameters:
a
-isSorted
-- Returns:
-
removeDuplicates
public static long[] removeDuplicates(long[] a, int fromIndex, int toIndex, boolean isSorted) Removes the duplicates.- Parameters:
a
-fromIndex
-toIndex
-isSorted
-- Returns:
-
removeDuplicates
public static float[] removeDuplicates(float[] a) Removes the duplicates.- Parameters:
a
-- Returns:
-
removeDuplicates
public static float[] removeDuplicates(float[] a, boolean isSorted) Removes the duplicates.- Parameters:
a
-isSorted
-- Returns:
-
removeDuplicates
public static float[] removeDuplicates(float[] a, int fromIndex, int toIndex, boolean isSorted) Removes the duplicates.- Parameters:
a
-fromIndex
-toIndex
-isSorted
-- Returns:
-
removeDuplicates
public static double[] removeDuplicates(double[] a) Removes the duplicates.- Parameters:
a
-- Returns:
-
removeDuplicates
public static double[] removeDuplicates(double[] a, boolean isSorted) Removes the duplicates.- Parameters:
a
-isSorted
-- Returns:
-
removeDuplicates
public static double[] removeDuplicates(double[] a, int fromIndex, int toIndex, boolean isSorted) Removes the duplicates.- Parameters:
a
-fromIndex
-toIndex
-isSorted
-- Returns:
-
removeDuplicates
Removes the duplicates.- Parameters:
a
-- Returns:
-
removeDuplicates
Removes the duplicates.- Parameters:
a
-isSorted
-- Returns:
-
removeDuplicates
Removes the duplicates.- Parameters:
a
-fromIndex
-toIndex
-isSorted
-- Returns:
-
removeDuplicates
public static <T> T[] removeDuplicates(T[] a) Removes all duplicates elements
N.removeElements(["a", "b", "a"]) = ["a", "b"]
- Type Parameters:
T
- the component type of the array- Parameters:
a
-- Returns:
- A new array containing the existing elements except the duplicates
- Throws:
NullPointerException
- if the specified arraya
is null.
-
removeDuplicates
public static <T> T[] removeDuplicates(T[] a, boolean isSorted) Removes the duplicates.- Type Parameters:
T
-- Parameters:
a
-isSorted
-- Returns:
-
removeDuplicates
public static <T> T[] removeDuplicates(T[] a, int fromIndex, int toIndex, boolean isSorted) Removes the duplicates.- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-isSorted
-- Returns:
-
removeDuplicates
Removes the duplicates.- Parameters:
c
-- Returns:
true
if there is one or more duplicated elements are removed. otherwisefalse
is returned.
-
removeDuplicates
Removes the duplicates.- Parameters:
c
-isSorted
-- Returns:
true
if there is one or more duplicated elements are removed. otherwisefalse
is returned.
-
replaceRange
public static boolean[] replaceRange(boolean[] a, int fromIndex, int toIndex, boolean[] replacement) Return a new array.- Parameters:
a
-fromIndex
-toIndex
-replacement
-- Returns:
- a new array.
-
replaceRange
public static char[] replaceRange(char[] a, int fromIndex, int toIndex, char[] replacement) Return a new array.- Parameters:
a
-fromIndex
-toIndex
-replacement
-- Returns:
- a new array.
-
replaceRange
public static byte[] replaceRange(byte[] a, int fromIndex, int toIndex, byte[] replacement) Return a new array.- Parameters:
a
-fromIndex
-toIndex
-replacement
-- Returns:
- a new array.
-
replaceRange
public static short[] replaceRange(short[] a, int fromIndex, int toIndex, short[] replacement) Return a new array.- Parameters:
a
-fromIndex
-toIndex
-replacement
-- Returns:
- a new array.
-
replaceRange
public static int[] replaceRange(int[] a, int fromIndex, int toIndex, int[] replacement) Return a new array.- Parameters:
a
-fromIndex
-toIndex
-replacement
-- Returns:
- a new array.
-
replaceRange
public static long[] replaceRange(long[] a, int fromIndex, int toIndex, long[] replacement) Return a new array.- Parameters:
a
-fromIndex
-toIndex
-replacement
-- Returns:
- a new array.
-
replaceRange
public static float[] replaceRange(float[] a, int fromIndex, int toIndex, float[] replacement) Return a new array.- Parameters:
a
-fromIndex
-toIndex
-replacement
-- Returns:
- a new array.
-
replaceRange
public static double[] replaceRange(double[] a, int fromIndex, int toIndex, double[] replacement) Return a new array.- Parameters:
a
-fromIndex
-toIndex
-replacement
-- Returns:
- a new array.
-
replaceRange
-
replaceRange
public static <T> T[] replaceRange(T[] a, int fromIndex, int toIndex, T[] replacement) throws IllegalArgumentException Return a new array.- Parameters:
a
-fromIndex
-toIndex
-replacement
-- Returns:
- a new array.
- Throws:
IllegalArgumentException
- if the specifiedArray
isnull
.
-
replaceRange
public static <T> boolean replaceRange(List<T> c, int fromIndex, int toIndex, Collection<? extends T> replacement) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-replacement
-- Returns:
true
if the specifiedList
is updated.- Throws:
IllegalArgumentException
- if the specifiedc
isnull
.
-
replaceRange
Returns a new String.- Parameters:
str
-fromIndex
-toIndex
-replacement
-- Returns:
-
hasDuplicates
public static boolean hasDuplicates(char[] a) Checks for duplicates.- Parameters:
a
-- Returns:
-
hasDuplicates
public static boolean hasDuplicates(char[] a, boolean isSorted) Checks for duplicates.- Parameters:
a
-isSorted
-- Returns:
-
hasDuplicates
public static boolean hasDuplicates(byte[] a) Checks for duplicates.- Parameters:
a
-- Returns:
-
hasDuplicates
public static boolean hasDuplicates(byte[] a, boolean isSorted) Checks for duplicates.- Parameters:
a
-isSorted
-- Returns:
-
hasDuplicates
public static boolean hasDuplicates(short[] a) Checks for duplicates.- Parameters:
a
-- Returns:
-
hasDuplicates
public static boolean hasDuplicates(short[] a, boolean isSorted) Checks for duplicates.- Parameters:
a
-isSorted
-- Returns:
-
hasDuplicates
public static boolean hasDuplicates(int[] a) Checks for duplicates.- Parameters:
a
-- Returns:
-
hasDuplicates
public static boolean hasDuplicates(int[] a, boolean isSorted) Checks for duplicates.- Parameters:
a
-isSorted
-- Returns:
-
hasDuplicates
public static boolean hasDuplicates(long[] a) Checks for duplicates.- Parameters:
a
-- Returns:
-
hasDuplicates
public static boolean hasDuplicates(long[] a, boolean isSorted) Checks for duplicates.- Parameters:
a
-isSorted
-- Returns:
-
hasDuplicates
public static boolean hasDuplicates(float[] a) Checks for duplicates.- Parameters:
a
-- Returns:
-
hasDuplicates
public static boolean hasDuplicates(float[] a, boolean isSorted) Checks for duplicates.- Parameters:
a
-isSorted
-- Returns:
-
hasDuplicates
public static boolean hasDuplicates(double[] a) Checks for duplicates.- Parameters:
a
-- Returns:
-
hasDuplicates
public static boolean hasDuplicates(double[] a, boolean isSorted) Checks for duplicates.- Parameters:
a
-isSorted
-- Returns:
-
hasDuplicates
public static <T> boolean hasDuplicates(T[] a) Checks for duplicates.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
hasDuplicates
public static <T> boolean hasDuplicates(T[] a, boolean isSorted) Checks for duplicates.- Type Parameters:
T
-- Parameters:
a
-isSorted
-- Returns:
-
hasDuplicates
Checks for duplicates.- Parameters:
c
-- Returns:
-
hasDuplicates
Checks for duplicates.- Parameters:
c
-isSorted
-- Returns:
-
retainAll
- Parameters:
c
-objsToKeep
-- Returns:
-
sum
- Parameters:
a
-- Returns:
- a long number
-
sum
public static int sum(char[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
sum
- Parameters:
a
-- Returns:
- a long number
-
sum
public static int sum(byte[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
sum
- Parameters:
a
-- Returns:
- a long number
-
sum
public static int sum(short[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
sum
- Parameters:
a
-- Returns:
- a long number
-
sum
public static int sum(int[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
sum
- Parameters:
a
-- Returns:
- a long number
-
sum
public static long sum(long[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
sum
- Parameters:
a
-- Returns:
- a double number
-
sum
public static float sum(float[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
sum
- Parameters:
a
-- Returns:
- a double number
-
sum
public static double sum(double[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
average
Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Parameters:
a
-- Returns:
- a double number
-
average
public static double average(char[] a, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
average
Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Parameters:
a
-- Returns:
- a double number
-
average
public static double average(byte[] a, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
average
Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Parameters:
a
-- Returns:
- a double number
-
average
public static double average(short[] a, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
average
Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Parameters:
a
-- Returns:
- a double number
-
average
public static double average(int[] a, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
average
Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Parameters:
a
-- Returns:
- a double number
-
average
public static double average(long[] a, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
average
Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Parameters:
a
-- Returns:
- a double number
-
average
public static double average(float[] a, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
average
Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Parameters:
a
-- Returns:
- a double number
-
average
public static double average(double[] a, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
sumInt
- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
sumInt
- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
sumInt
public static <T,E extends Exception> int sumInt(T[] a, Throwables.ToIntFunction<? super T, E> func) throws E- Type Parameters:
T
-E
-- Parameters:
a
-func
-- Returns:
- Throws:
E
- the e
-
sumInt
public static <T,E extends Exception> int sumInt(T[] a, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T, E> func) throws E- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
sumInt
- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
sumInt
public static <T,E extends Exception> int sumInt(Iterable<? extends T> c, Throwables.ToIntFunction<? super T, E> func) throws E- Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
sumInt
- Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
sumInt
public static <T,E extends Exception> int sumInt(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T, E> func) throws E- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
sumLong
- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
sumLong
- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
sumLong
public static <T,E extends Exception> long sumLong(T[] a, Throwables.ToLongFunction<? super T, E> func) throws E- Type Parameters:
T
-E
-- Parameters:
a
-func
-- Returns:
- Throws:
E
- the e
-
sumLong
public static <T,E extends Exception> long sumLong(T[] a, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T, E> func) throws E- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
sumLong
- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
sumLong
public static <T,E extends Exception> long sumLong(Iterable<? extends T> c, Throwables.ToLongFunction<? super T, E> func) throws E- Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
sumLong
public static <T extends Number> long sumLong(Collection<? extends T> c, int fromIndex, int toIndex) - Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
sumLong
public static <T,E extends Exception> long sumLong(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T, E> func) throws E- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
sumDouble
- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
sumDouble
- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
sumDouble
public static <T,E extends Exception> double sumDouble(T[] a, Throwables.ToDoubleFunction<? super T, E> func) throws E- Type Parameters:
T
-E
-- Parameters:
a
-func
-- Returns:
- Throws:
E
- the e
-
sumDouble
public static <T,E extends Exception> double sumDouble(T[] a, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T, E> func) throws E- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
sumDouble
- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
sumDouble
public static <T,E extends Exception> double sumDouble(Iterable<? extends T> c, Throwables.ToDoubleFunction<? super T, E> func) throws E- Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
sumDouble
public static <T extends Number> double sumDouble(Collection<? extends T> c, int fromIndex, int toIndex) - Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
sumDouble
public static <T,E extends Exception> double sumDouble(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T, E> func) throws E- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
sumBigInteger
- Parameters:
c
-- Returns:
-
sumBigInteger
public static <T,E extends Exception> BigInteger sumBigInteger(Iterable<? extends T> c, Throwables.Function<? super T, BigInteger, throws EE> func) - Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
sumBigDecimal
- Parameters:
c
-- Returns:
-
sumBigDecimal
public static <T,E extends Exception> BigDecimal sumBigDecimal(Iterable<? extends T> c, Throwables.Function<? super T, BigDecimal, throws EE> func) - Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
averageInt
Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
averageInt
Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
averageInt
public static <T,E extends Exception> double averageInt(T[] a, Throwables.ToIntFunction<? super T, E> func) throws EReturns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-E
-- Parameters:
a
-func
-- Returns:
- Throws:
E
- the e
-
averageInt
public static <T,E extends Exception> double averageInt(T[] a, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T, E> func) throws EReturns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
averageInt
Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
averageInt
public static <T,E extends Exception> double averageInt(Iterable<? extends T> c, Throwables.ToIntFunction<? super T, E> func) throws EReturns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
averageInt
public static <T extends Number> double averageInt(Collection<? extends T> c, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
averageInt
public static <T,E extends Exception> double averageInt(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T, E> func) throws EReturns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
averageLong
Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
averageLong
Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
averageLong
public static <T,E extends Exception> double averageLong(T[] a, Throwables.ToLongFunction<? super T, E> func) throws EReturns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-E
-- Parameters:
a
-func
-- Returns:
- Throws:
E
- the e
-
averageLong
public static <T,E extends Exception> double averageLong(T[] a, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T, E> func) throws EReturns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
averageLong
Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
averageLong
public static <T,E extends Exception> double averageLong(Iterable<? extends T> c, Throwables.ToLongFunction<? super T, E> func) throws EReturns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
averageLong
public static <T extends Number> double averageLong(Collection<? extends T> c, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
averageLong
public static <T,E extends Exception> double averageLong(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T, E> func) throws EReturns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
averageDouble
Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-- Parameters:
a
-- Returns:
- See Also:
-
Iterables#averageDouble(Object[])
-
averageDouble
Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
averageDouble
public static <T,E extends Exception> double averageDouble(T[] a, Throwables.ToDoubleFunction<? super T, E> func) throws EReturns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-E
-- Parameters:
a
-func
-- Returns:
- Throws:
E
- the e- See Also:
-
averageDouble
public static <T,E extends Exception> double averageDouble(T[] a, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T, E> func) throws EReturns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e- See Also:
-
averageDouble
Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-- Parameters:
c
-- Returns:
- See Also:
-
Iterables#averageDouble(Collection)
-
averageDouble
public static <T,E extends Exception> double averageDouble(Iterable<? extends T> c, Throwables.ToDoubleFunction<? super T, E> func) throws EReturns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e- See Also:
-
Iterables#averageDouble(Collection, com.landawn.abacus.util.Throwables.ToDoubleFunction)
-
averageDouble
public static <T extends Number> double averageDouble(Collection<? extends T> c, int fromIndex, int toIndex) Returns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
averageDouble
public static <T,E extends Exception> double averageDouble(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T, E> func) throws EReturns0
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e- See Also:
-
averageBigInteger
- Parameters:
c
-- Returns:
-
averageBigInteger
public static <T,E extends Exception> BigDecimal averageBigInteger(Iterable<? extends T> c, Throwables.Function<? super T, BigInteger, throws EE> func) - Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
averageBigDecimal
- Parameters:
c
-- Returns:
-
averageBigDecimal
public static <T,E extends Exception> BigDecimal averageBigDecimal(Iterable<? extends T> c, Throwables.Function<? super T, BigDecimal, throws EE> func) - Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
min
public static char min(char a, char b) Gets the minimum of two
char
values.- Parameters:
a
-b
-- Returns:
-
min
public static byte min(byte a, byte b) Gets the minimum of two
byte
values.- Parameters:
a
-b
-- Returns:
-
min
public static short min(short a, short b) Gets the minimum of two
short
values.- Parameters:
a
-b
-- Returns:
-
min
public static int min(int a, int b) Gets the minimum of two
int
values.- Parameters:
a
-b
-- Returns:
-
min
public static long min(long a, long b) Gets the minimum of two
long
values.- Parameters:
a
-b
-- Returns:
-
min
public static float min(float a, float b) Gets the minimum of two
float
values.- Parameters:
a
-b
-- Returns:
-
min
public static double min(double a, double b) Gets the minimum of two
double
values.- Parameters:
a
-b
-- Returns:
-
min
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
min
- Type Parameters:
T
-- Parameters:
a
-b
-cmp
-- Returns:
-
min
public static char min(char a, char b, char c) Gets the minimum of three
char
values.- Parameters:
a
-b
-c
-- Returns:
-
min
public static byte min(byte a, byte b, byte c) Gets the minimum of three
byte
values.- Parameters:
a
-b
-c
-- Returns:
-
min
public static short min(short a, short b, short c) Gets the minimum of three
short
values.- Parameters:
a
-b
-c
-- Returns:
-
min
public static int min(int a, int b, int c) Gets the minimum of three
int
values.- Parameters:
a
-b
-c
-- Returns:
-
min
public static long min(long a, long b, long c) Gets the minimum of three
long
values.- Parameters:
a
-b
-c
-- Returns:
-
min
public static float min(float a, float b, float c) Gets the minimum of three
float
values.- Parameters:
a
-b
-c
-- Returns:
-
min
public static double min(double a, double b, double c) Gets the minimum of three
double
values.- Parameters:
a
-b
-c
-- Returns:
-
min
- Type Parameters:
T
-- Parameters:
a
-b
-c
-- Returns:
-
min
- Type Parameters:
T
-- Parameters:
a
-b
-c
-cmp
-- Returns:
-
min
Returns the minimum value in an array.
- Parameters:
a
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
min
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
min
Returns the minimum value in an array.
- Parameters:
a
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
min
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
min
Returns the minimum value in an array.
- Parameters:
a
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
min
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
min
Returns the minimum value in an array.
- Parameters:
a
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
min
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
min
Returns the minimum value in an array.
- Parameters:
a
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
min
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
min
Returns the minimum value in an array.
- Parameters:
a
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
min
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
min
Returns the minimum value in an array.
- Parameters:
a
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
min
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
min
Returns the minimum element in the array.- Type Parameters:
T
-- Parameters:
a
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
min
public static <T extends Comparable<? super T>> T min(T[] a, int fromIndex, int toIndex) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
min
Returns the minimum element in the array.- Type Parameters:
T
-- Parameters:
a
- anArray
which must not be null or emptycmp
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
min
public static <T> T min(T[] a, int fromIndex, int toIndex, Comparator<? super T> cmp) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-cmp
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
min
public static <T extends Comparable<? super T>> T min(Iterable<? extends T> c) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
c
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
Iterables#min(Collection)
-
min
public static <T> T min(Iterable<? extends T> c, Comparator<? super T> cmp) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
c
-cmp
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
Iterables#min(Collection, Comparator)
-
min
public static <T extends Comparable<? super T>> T min(Collection<? extends T> c, int fromIndex, int toIndex) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
Iterables#min(Collection)
-
min
public static <T> T min(Collection<? extends T> c, int fromIndex, int toIndex, Comparator<? super T> cmp) throws IllegalArgumentException Returns the minimum element in the collection.- Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-cmp
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
minAll
- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
minAll
- Type Parameters:
T
-- Parameters:
a
-cmp
-- Returns:
-
minAll
- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
minAll
- Type Parameters:
T
-- Parameters:
c
-cmp
-- Returns:
-
minAll
- Type Parameters:
T
-- Parameters:
iter
-- Returns:
- See Also:
-
minAll
- Type Parameters:
T
-- Parameters:
iter
-cmp
-- Returns:
- See Also:
-
max
public static char max(char a, char b) Gets the maximum of two
char
values.- Parameters:
a
-b
-- Returns:
-
max
public static byte max(byte a, byte b) Gets the maximum of two
byte
values.- Parameters:
a
-b
-- Returns:
-
max
public static short max(short a, short b) Gets the maximum of two
short
values.- Parameters:
a
-b
-- Returns:
-
max
public static int max(int a, int b) Gets the maximum of two
int
values.- Parameters:
a
-b
-- Returns:
-
max
public static long max(long a, long b) Gets the maximum of two
long
values.- Parameters:
a
-b
-- Returns:
-
max
public static float max(float a, float b) Gets the maximum of two
float
values.- Parameters:
a
-b
-- Returns:
-
max
public static double max(double a, double b) Gets the maximum of two
double
values.- Parameters:
a
-b
-- Returns:
-
max
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
max
- Type Parameters:
T
-- Parameters:
a
-b
-cmp
-- Returns:
-
max
public static char max(char a, char b, char c) Gets the maximum of threechar
values.- Parameters:
a
-b
-c
-- Returns:
-
max
public static byte max(byte a, byte b, byte c) Gets the maximum of threebyte
values.- Parameters:
a
-b
-c
-- Returns:
-
max
public static short max(short a, short b, short c) Gets the maximum of threeshort
values.- Parameters:
a
-b
-c
-- Returns:
-
max
public static int max(int a, int b, int c) Gets the maximum of threeint
values.- Parameters:
a
-b
-c
-- Returns:
-
max
public static long max(long a, long b, long c) Gets the maximum of threelong
values.- Parameters:
a
-b
-c
-- Returns:
-
max
public static float max(float a, float b, float c) Gets the maximum of threefloat
values.- Parameters:
a
-b
-c
-- Returns:
-
max
public static double max(double a, double b, double c) Gets the maximum of threedouble
values.- Parameters:
a
-b
-c
-- Returns:
-
max
- Type Parameters:
T
-- Parameters:
a
-b
-c
-- Returns:
-
max
- Type Parameters:
T
-- Parameters:
a
-b
-c
-cmp
-- Returns:
-
max
Returns the maximum value in an array.
- Parameters:
a
- anArray
which must not be null or empty- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
max
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
max
Returns the maximum value in an array.
- Parameters:
a
- anArray
which must not be null or empty- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
max
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
max
Returns the maximum value in an array.
- Parameters:
a
- anArray
which must not be null or empty- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
max
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
max
Returns the maximum value in an array.
- Parameters:
a
- anArray
which must not be null or empty- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
max
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
max
Returns the maximum value in an array.
- Parameters:
a
- anArray
which must not be null or empty- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
max
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
max
Returns the maximum value in an array.
- Parameters:
a
- anArray
which must not be null or empty- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
max
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
max
Returns the maximum value in an array.
- Parameters:
a
- anArray
which must not be null or empty- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
max
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
max
Returns the maximum element in the array.- Type Parameters:
T
-- Parameters:
a
- anArray
which must not be null or empty- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
max
public static <T extends Comparable<? super T>> T max(T[] a, int fromIndex, int toIndex) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
max
Returns the maximum element in the array.- Type Parameters:
T
-- Parameters:
a
- anArray
which must not be null or emptycmp
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
max
public static <T> T max(T[] a, int fromIndex, int toIndex, Comparator<? super T> cmp) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-cmp
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
max
public static <T extends Comparable<? super T>> T max(Iterable<? extends T> c) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
c
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
Iterables#max(Collection)
-
max
public static <T> T max(Iterable<? extends T> c, Comparator<? super T> cmp) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
c
-cmp
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
Iterables#max(Collection, Comparator)
-
max
public static <T extends Comparable<? super T>> T max(Collection<? extends T> c, int fromIndex, int toIndex) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
max
public static <T> T max(Collection<? extends T> c, int fromIndex, int toIndex, Comparator<? super T> cmp) throws IllegalArgumentException Returns the maximum element in the collection.- Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-cmp
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
maxAll
- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
maxAll
- Type Parameters:
T
-- Parameters:
a
-cmp
-- Returns:
-
maxAll
- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
maxAll
- Type Parameters:
T
-- Parameters:
c
-cmp
-- Returns:
-
maxAll
- Type Parameters:
T
-- Parameters:
iter
-- Returns:
- See Also:
-
Iterables#maxAll(Iterator)
-
maxAll
- Type Parameters:
T
-- Parameters:
iter
-cmp
-- Returns:
- See Also:
-
Iterables#maxAll(Iterator, Comparator)
-
minMax
public static <T extends Comparable<? super T>> Pair<T,T> minMax(T[] a) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
a
-- Returns:
- Throws:
IllegalArgumentException
- ifa
is null or empty.
-
minMax
public static <T> Pair<T,T> minMax(T[] a, Comparator<? super T> cmp) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
a
-cmp
-- Returns:
- Throws:
IllegalArgumentException
- ifa
is null or empty.
-
minMax
public static <T extends Comparable<? super T>> Pair<T,T> minMax(Iterable<? extends T> c) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
c
-- Returns:
- Throws:
IllegalArgumentException
- ifc
is null or empty.
-
minMax
public static <T> Pair<T,T> minMax(Iterable<? extends T> c, Comparator<? super T> cmp) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
c
-cmp
-- Returns:
- Throws:
IllegalArgumentException
- ifc
is null or empty.
-
minMax
public static <T extends Comparable<? super T>> Pair<T,T> minMax(Iterator<? extends T> iter) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
iter
-- Returns:
- Throws:
IllegalArgumentException
- ifiter
is null or empty.- See Also:
-
minMax
public static <T> Pair<T,T> minMax(Iterator<? extends T> iter, Comparator<? super T> cmp) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
iter
-cmp
-- Returns:
- Throws:
IllegalArgumentException
- ifiter
is null or empty.- See Also:
-
median
public static char median(char a, char b, char c) Gets the median of three values.- Parameters:
a
-b
-c
-- Returns:
- See Also:
-
median
public static byte median(byte a, byte b, byte c) Gets the median of three values.- Parameters:
a
-b
-c
-- Returns:
- See Also:
-
median
public static short median(short a, short b, short c) Gets the median of three values.- Parameters:
a
-b
-c
-- Returns:
- See Also:
-
median
public static int median(int a, int b, int c) Gets the median of three values.- Parameters:
a
-b
-c
-- Returns:
- See Also:
-
median
public static long median(long a, long b, long c) Gets the median of three values.- Parameters:
a
-b
-c
-- Returns:
- See Also:
-
median
public static float median(float a, float b, float c) Gets the median of three values.- Parameters:
a
-b
-c
-- Returns:
- See Also:
-
median
public static double median(double a, double b, double c) Gets the median of three values.- Parameters:
a
-b
-c
-- Returns:
- See Also:
-
median
Gets the median of three values.- Type Parameters:
T
-- Parameters:
a
-b
-c
-- Returns:
- See Also:
-
median
Gets the median of three values.- Type Parameters:
T
-- Parameters:
a
-b
-c
-cmp
-- Returns:
- See Also:
-
median
Returns thelength / 2 + 1
largest value in the specified array.- Parameters:
a
- anArray
which must not be null or empty- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
median
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
median
Returns thelength / 2 + 1
largest value in the specified array.- Parameters:
a
- anArray
which must not be null or empty- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
median
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
median
Returns thelength / 2 + 1
largest value in the specified array.- Parameters:
a
- anArray
which must not be null or empty- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
median
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
median
Returns thelength / 2 + 1
largest value in the specified array.- Parameters:
a
- anArray
which must not be null or empty- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
median
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
median
Returns thelength / 2 + 1
largest value in the specified array.- Parameters:
a
- anArray
which must not be null or empty- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
median
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
median
Returns thelength / 2 + 1
largest value in the specified array.- Parameters:
a
- anArray
which must not be null or empty- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
median
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
median
Returns thelength / 2 + 1
largest value in the specified array.- Parameters:
a
- anArray
which must not be null or empty- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
median
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
median
Returns thelength / 2 + 1
largest value in the specified array.- Type Parameters:
T
-- Parameters:
a
- anArray
which must not be null or empty- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
median
public static <T extends Comparable<? super T>> T median(T[] a, int fromIndex, int toIndex) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
median
Returns thelength / 2 + 1
largest value in the specified array.- Type Parameters:
T
-- Parameters:
a
- anArray
which must not be null or emptycmp
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
median
public static <T> T median(T[] a, int fromIndex, int toIndex, Comparator<? super T> cmp) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-cmp
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
median
public static <T extends Comparable<? super T>> T median(Collection<? extends T> c) throws IllegalArgumentException Returns thelength / 2 + 1
largest value in the specified array.- Type Parameters:
T
-- Parameters:
c
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
median
public static <T extends Comparable<? super T>> T median(Collection<? extends T> c, int fromIndex, int toIndex) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
median
public static <T> T median(Collection<? extends T> c, Comparator<? super T> cmp) throws IllegalArgumentException Returns thelength / 2 + 1
largest value in the specified array.- Type Parameters:
T
-- Parameters:
c
-cmp
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.- See Also:
-
median
public static <T> T median(Collection<? extends T> c, int fromIndex, int toIndex, Comparator<? super T> cmp) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-cmp
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.
-
kthLargest
- Parameters:
a
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
public static char kthLargest(char[] a, int fromIndex, int toIndex, int k) throws IllegalArgumentException - Parameters:
a
-fromIndex
-toIndex
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
- Parameters:
a
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
public static byte kthLargest(byte[] a, int fromIndex, int toIndex, int k) throws IllegalArgumentException - Parameters:
a
-fromIndex
-toIndex
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
- Parameters:
a
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
public static short kthLargest(short[] a, int fromIndex, int toIndex, int k) throws IllegalArgumentException - Parameters:
a
-fromIndex
-toIndex
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
- Parameters:
a
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
public static int kthLargest(int[] a, int fromIndex, int toIndex, int k) throws IllegalArgumentException - Parameters:
a
-fromIndex
-toIndex
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
- Parameters:
a
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
public static long kthLargest(long[] a, int fromIndex, int toIndex, int k) throws IllegalArgumentException - Parameters:
a
-fromIndex
-toIndex
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
- Parameters:
a
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
public static float kthLargest(float[] a, int fromIndex, int toIndex, int k) throws IllegalArgumentException - Parameters:
a
-fromIndex
-toIndex
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
- Parameters:
a
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
public static double kthLargest(double[] a, int fromIndex, int toIndex, int k) throws IllegalArgumentException - Parameters:
a
-fromIndex
-toIndex
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
public static <T extends Comparable<? super T>> T kthLargest(T[] a, int k) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
a
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
public static <T extends Comparable<? super T>> T kthLargest(T[] a, int fromIndex, int toIndex, int k) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
public static <T> T kthLargest(T[] a, int k, Comparator<? super T> cmp) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
a
-k
-cmp
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
public static <T> T kthLargest(T[] a, int fromIndex, int toIndex, int k, Comparator<? super T> cmp) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-k
-cmp
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
public static <T extends Comparable<? super T>> T kthLargest(Collection<? extends T> c, int k) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
c
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
public static <T extends Comparable<? super T>> T kthLargest(Collection<? extends T> c, int fromIndex, int toIndex, int k) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-k
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
public static <T> T kthLargest(Collection<? extends T> c, int k, Comparator<? super T> cmp) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
c
-k
-cmp
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
kthLargest
public static <T> T kthLargest(Collection<? extends T> c, int fromIndex, int toIndex, int k, Comparator<? super T> cmp) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-k
-cmp
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray/Collection
isnull
or empty, or its length/size is less thank
, ortoIndex - fromIndex < k
.
-
top
public static short[] top(short[] a, int n) - Parameters:
a
-n
-- Returns:
-
top
- Parameters:
a
-n
-cmp
-- Returns:
-
top
public static short[] top(short[] a, int fromIndex, int toIndex, int n) - Parameters:
a
-fromIndex
-toIndex
-n
-- Returns:
-
top
public static short[] top(short[] a, int fromIndex, int toIndex, int n, Comparator<? super Short> cmp) - Parameters:
a
-fromIndex
-toIndex
-n
-cmp
-- Returns:
-
top
public static int[] top(int[] a, int n) - Parameters:
a
-n
-- Returns:
-
top
- Parameters:
a
-n
-cmp
-- Returns:
-
top
public static int[] top(int[] a, int fromIndex, int toIndex, int n) - Parameters:
a
-fromIndex
-toIndex
-n
-- Returns:
-
top
public static int[] top(int[] a, int fromIndex, int toIndex, int n, Comparator<? super Integer> cmp) - Parameters:
a
-fromIndex
-toIndex
-n
-cmp
-- Returns:
-
top
public static long[] top(long[] a, int n) - Parameters:
a
-n
-- Returns:
-
top
- Parameters:
a
-n
-cmp
-- Returns:
-
top
public static long[] top(long[] a, int fromIndex, int toIndex, int n) - Parameters:
a
-fromIndex
-toIndex
-n
-- Returns:
-
top
- Parameters:
a
-fromIndex
-toIndex
-n
-cmp
-- Returns:
-
top
public static float[] top(float[] a, int n) - Parameters:
a
-n
-- Returns:
-
top
- Parameters:
a
-n
-cmp
-- Returns:
-
top
public static float[] top(float[] a, int fromIndex, int toIndex, int n) - Parameters:
a
-fromIndex
-toIndex
-n
-- Returns:
-
top
public static float[] top(float[] a, int fromIndex, int toIndex, int n, Comparator<? super Float> cmp) - Parameters:
a
-fromIndex
-toIndex
-n
-cmp
-- Returns:
-
top
public static double[] top(double[] a, int n) - Parameters:
a
-n
-- Returns:
-
top
- Parameters:
a
-n
-cmp
-- Returns:
-
top
public static double[] top(double[] a, int fromIndex, int toIndex, int n) - Parameters:
a
-fromIndex
-toIndex
-n
-- Returns:
-
top
public static double[] top(double[] a, int fromIndex, int toIndex, int n, Comparator<? super Double> cmp) - Parameters:
a
-fromIndex
-toIndex
-n
-cmp
-- Returns:
-
top
- Type Parameters:
T
-- Parameters:
a
-n
-- Returns:
-
top
- Type Parameters:
T
-- Parameters:
a
-n
-cmp
-- Returns:
-
top
public static <T extends Comparable<? super T>> List<T> top(T[] a, int fromIndex, int toIndex, int n) - Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-n
-- Returns:
-
top
- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-n
-cmp
-- Returns:
-
top
- Type Parameters:
T
-- Parameters:
c
-n
-- Returns:
-
top
- Type Parameters:
T
-- Parameters:
c
-n
-cmp
-- Returns:
-
top
public static <T extends Comparable<? super T>> List<T> top(Collection<? extends T> c, int fromIndex, int toIndex, int n) - Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-n
-- Returns:
-
top
public static <T> List<T> top(Collection<? extends T> c, int fromIndex, int toIndex, int n, Comparator<? super T> cmp) - Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-n
-cmp
-- Returns:
-
top
public static <T extends Comparable<? super T>> List<T> top(T[] a, int n, boolean keepEncounterOrder) - Type Parameters:
T
-- Parameters:
a
-n
-keepEncounterOrder
-- Returns:
-
top
- Type Parameters:
T
-- Parameters:
a
-n
-cmp
-keepEncounterOrder
-- Returns:
-
top
public static <T extends Comparable<? super T>> List<T> top(T[] a, int fromIndex, int toIndex, int n, boolean keepEncounterOrder) - Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-n
-keepEncounterOrder
-- Returns:
-
top
public static <T> List<T> top(T[] a, int fromIndex, int toIndex, int n, Comparator<? super T> cmp, boolean keepEncounterOrder) - Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-n
-cmp
-keepEncounterOrder
-- Returns:
-
top
public static <T extends Comparable<? super T>> List<T> top(Collection<? extends T> c, int n, boolean keepEncounterOrder) - Type Parameters:
T
-- Parameters:
c
-n
-keepEncounterOrder
-- Returns:
-
top
public static <T> List<T> top(Collection<? extends T> c, int n, Comparator<? super T> cmp, boolean keepEncounterOrder) - Type Parameters:
T
-- Parameters:
c
-n
-cmp
-keepEncounterOrder
-- Returns:
-
top
public static <T extends Comparable<? super T>> List<T> top(Collection<? extends T> c, int fromIndex, int toIndex, int n, boolean keepEncounterOrder) - Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-n
-- Returns:
-
top
public static <T> List<T> top(Collection<? extends T> c, int fromIndex, int toIndex, int n, Comparator<? super T> cmp, boolean keepEncounterOrder) - Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-n
-cmp
-keepEncounterOrder
-- Returns:
-
percentiles
public static Map<Percentage,Character> percentiles(char[] sortedArray) throws IllegalArgumentException Returns the elements at:Percentage
* length of the specified array.- Parameters:
sortedArray
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedsortedArray
isnull
or empty.
-
percentiles
Returns the elements at:Percentage
* length of the specified array.- Parameters:
sortedArray
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedsortedArray
isnull
or empty.
-
percentiles
public static Map<Percentage,Short> percentiles(short[] sortedArray) throws IllegalArgumentException Returns the elements at:Percentage
* length of the specified array.- Parameters:
sortedArray
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedsortedArray
isnull
or empty.
-
percentiles
public static Map<Percentage,Integer> percentiles(int[] sortedArray) throws IllegalArgumentException Returns the elements at:Percentage
* length of the specified array.- Parameters:
sortedArray
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedsortedArray
isnull
or empty.
-
percentiles
Returns the elements at:Percentage
* length of the specified array.- Parameters:
sortedArray
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedsortedArray
isnull
or empty.
-
percentiles
public static Map<Percentage,Float> percentiles(float[] sortedArray) throws IllegalArgumentException Returns the elements at:Percentage
* length of the specified array.- Parameters:
sortedArray
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedsortedArray
isnull
or empty.
-
percentiles
public static Map<Percentage,Double> percentiles(double[] sortedArray) throws IllegalArgumentException Returns the elements at:Percentage
* length of the specified array.- Parameters:
sortedArray
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedsortedArray
isnull
or empty.
-
percentiles
Returns the elements at:Percentage
* length of the specified array.- Type Parameters:
T
-- Parameters:
sortedArray
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedsortedArray
isnull
or empty.
-
percentiles
Returns the elements at:Percentage
* length of the specified array.- Type Parameters:
T
-- Parameters:
sortedList
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedsortedList
isnull
or empty.
-
forEach
public static <E extends Exception> void forEach(int startInclusive, int endExclusive, Throwables.Runnable<E> action) throws E - Type Parameters:
E
-- Parameters:
startInclusive
-endExclusive
-action
-- Throws:
E
- the e
-
forEach
public static <E extends Exception> void forEach(int startInclusive, int endExclusive, int step, Throwables.Runnable<E> action) throws E - Type Parameters:
E
-- Parameters:
startInclusive
-endExclusive
-step
-action
-- Throws:
E
- the e
-
forEach
public static <E extends Exception> void forEach(int startInclusive, int endExclusive, Throwables.IntConsumer<E> action) throws E - Type Parameters:
E
-- Parameters:
startInclusive
-endExclusive
-action
-- Throws:
E
- the e
-
forEach
public static <E extends Exception> void forEach(int startInclusive, int endExclusive, int step, Throwables.IntConsumer<E> action) throws E - Type Parameters:
E
-- Parameters:
startInclusive
-endExclusive
-step
-action
-- Throws:
E
- the e
-
forEach
@Deprecated public static <T,E extends Exception> void forEach(int startInclusive, int endExclusive, T a, Throwables.ObjIntConsumer<? super T, E> action) throws EDeprecated.use traditional for-loop- Type Parameters:
T
-E
-- Parameters:
startInclusive
-endExclusive
-a
-action
-- Throws:
E
- the e
-
forEach
@Deprecated public static <T,E extends Exception> void forEach(int startInclusive, int endExclusive, int step, T a, Throwables.ObjIntConsumer<? super T, E> action) throws EDeprecated.use traditional for-loop- Type Parameters:
T
-E
-- Parameters:
startInclusive
-endExclusive
-step
-a
-action
-- Throws:
E
- the e
-
forEach
public static <T,E extends Exception> void forEach(T[] a, Throwables.Consumer<? super T, E> action) throws E- Type Parameters:
T
-E
-- Parameters:
a
-action
-- Throws:
E
- the e
-
forEach
public static <T,E extends Exception> void forEach(T[] a, int fromIndex, int toIndex, Throwables.Consumer<? super T, E> action) throws E- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-action
-- Throws:
E
- the e
-
forEach
public static <T,E extends Exception> void forEach(Iterable<? extends T> c, Throwables.Consumer<? super T, E> action) throws E- Type Parameters:
T
-E
-- Parameters:
c
-action
-- Throws:
E
- the e
-
forEach
public static <T,E extends Exception> void forEach(Iterator<? extends T> iter, Throwables.Consumer<? super T, E> action) throws E- Type Parameters:
T
-E
-- Parameters:
iter
-action
-- Throws:
E
- the e
-
forEach
public static <T,E extends Exception> void forEach(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Consumer<? super T, E> action) throws EMostly it's designed for one-step operation to complete the operation in one step.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.- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-action
-- Throws:
E
- the e
-
forEach
public static <K,V, void forEachE extends Exception> (Map<K, V> map, Throwables.Consumer<? super Map.Entry<K, throws EV>, E> action) - Type Parameters:
K
-V
-E
-- Parameters:
map
-action
-- Throws:
E
- the e
-
forEachIndexed
public static <T,E extends Exception> void forEachIndexed(T[] a, Throwables.IndexedConsumer<? super T, E> action) throws E- Type Parameters:
T
-E
-- Parameters:
a
-action
-- Throws:
E
- the e
-
forEachIndexed
public static <T,E extends Exception> void forEachIndexed(T[] a, int fromIndex, int toIndex, Throwables.IndexedConsumer<? super T, E> action) throws E- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-action
-- Throws:
E
- the e
-
forEachIndexed
public static <T,E extends Exception> void forEachIndexed(Iterable<? extends T> c, Throwables.IndexedConsumer<? super T, E> action) throws E- Type Parameters:
T
-E
-- Parameters:
c
-action
-- Throws:
E
- the e
-
forEachIndexed
public static <T,E extends Exception> void forEachIndexed(Iterator<? extends T> iter, Throwables.IndexedConsumer<? super T, E> action) throws E- Type Parameters:
T
-E
-- Parameters:
iter
-action
-- Throws:
E
- the e
-
forEachIndexed
public static <T,E extends Exception> void forEachIndexed(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.IndexedConsumer<? super T, E> action) throws EMostly it's designed for one-step operation to complete the operation in one step.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.- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-action
-- Throws:
E
- the e
-
forEachIndexed
public static <K,V, void forEachIndexedE extends Exception> (Map<K, V> map, Throwables.IndexedConsumer<? super Map.Entry<K, throws EV>, E> action) - Type Parameters:
K
-V
-E
-- Parameters:
map
-action
-- Throws:
E
- the e
-
forEach
public static <T,U, void forEachE extends Exception, E2 extends Exception> (T[] a, Throwables.Function<? super T, ? extends Collection<U>, throws E, E2E> flatMapper, Throwables.BiConsumer<? super T, ? super U, E2> action) - Type Parameters:
T
-U
-E
-E2
-- Parameters:
a
-flatMapper
-action
-- Throws:
E
- the eE2
- the e2
-
forEach
public static <T,U, void forEachE extends Exception, E2 extends Exception> (Iterable<T> c, Throwables.Function<? super T, ? extends Collection<U>, throws E, E2E> flatMapper, Throwables.BiConsumer<? super T, ? super U, E2> action) - Type Parameters:
T
-U
-E
-E2
-- Parameters:
c
-flatMapper
-action
-- Throws:
E
- the eE2
- the e2
-
forEach
public static <T,U, void forEachE extends Exception, E2 extends Exception> (Iterator<? extends T> iter, Throwables.Function<? super T, ? extends Collection<U>, throws E, E2E> flatMapper, Throwables.BiConsumer<? super T, ? super U, E2> action) - Type Parameters:
T
-U
-E
-E2
-- Parameters:
iter
-flatMapper
-action
-- Throws:
E
- the eE2
- the e2
-
forEach
public static <T,T2, void forEachT3, E extends Exception, E2 extends Exception, E3 extends Exception> (T[] a, Throwables.Function<? super T, ? extends Collection<T2>, throws E, E2, E3E> flatMapper, Throwables.Function<? super T2, ? extends Collection<T3>, E2> flatMapper2, Throwables.TriConsumer<? super T, ? super T2, ? super T3, E3> action) - Type Parameters:
T
-T2
-T3
-E
-E2
-E3
-- Parameters:
a
-flatMapper
-flatMapper2
-action
-- Throws:
E
- the eE2
- the e2E3
- the e3
-
forEach
public static <T,T2, void forEachT3, E extends Exception, E2 extends Exception, E3 extends Exception> (Iterable<T> c, Throwables.Function<? super T, ? extends Collection<T2>, throws E, E2, E3E> flatMapper, Throwables.Function<? super T2, ? extends Collection<T3>, E2> flatMapper2, Throwables.TriConsumer<? super T, ? super T2, ? super T3, E3> action) - Type Parameters:
T
-T2
-T3
-E
-E2
-E3
-- Parameters:
c
-flatMapper
-flatMapper2
-action
-- Throws:
E
- the eE2
- the e2E3
- the e3
-
forEach
public static <T,T2, void forEachT3, E extends Exception, E2 extends Exception, E3 extends Exception> (Iterator<? extends T> iter, Throwables.Function<? super T, ? extends Collection<T2>, throws E, E2, E3E> flatMapper, Throwables.Function<? super T2, ? extends Collection<T3>, E2> flatMapper2, Throwables.TriConsumer<? super T, ? super T2, ? super T3, E3> action) - Type Parameters:
T
-T2
-T3
-E
-E2
-E3
-- Parameters:
iter
-flatMapper
-flatMapper2
-action
-- Throws:
E
- the eE2
- the e2E3
- the e3
-
forEach
public static <A,B, void forEachE extends Exception> (A[] a, B[] b, Throwables.BiConsumer<? super A, ? super B, throws EE> action) - Type Parameters:
A
-B
-E
-- Parameters:
a
-b
-action
-- Throws:
E
- the e
-
forEach
public static <A,B, void forEachE extends Exception> (Iterable<A> a, Iterable<B> b, Throwables.BiConsumer<? super A, ? super B, throws EE> action) - Type Parameters:
A
-B
-E
-- Parameters:
a
-b
-action
-- Throws:
E
- the e
-
forEach
public static <A,B, void forEachE extends Exception> (Iterator<A> a, Iterator<B> b, Throwables.BiConsumer<? super A, ? super B, throws EE> action) - Type Parameters:
A
-B
-E
-- Parameters:
a
-b
-action
-- Throws:
E
- the e
-
forEach
public static <A,B, void forEachC, E extends Exception> (A[] a, B[] b, C[] c, Throwables.TriConsumer<? super A, ? super B, throws E? super C, E> action) - Type Parameters:
A
-B
-C
-E
-- Parameters:
a
-b
-c
-action
-- Throws:
E
- the e
-
forEach
public static <A,B, void forEachC, E extends Exception> (Iterable<A> a, Iterable<B> b, Iterable<C> c, Throwables.TriConsumer<? super A, ? super B, throws E? super C, E> action) - Type Parameters:
A
-B
-C
-E
-- Parameters:
a
-b
-c
-action
-- Throws:
E
- the e
-
forEach
public static <A,B, void forEachC, E extends Exception> (Iterator<A> a, Iterator<B> b, Iterator<C> c, Throwables.TriConsumer<? super A, ? super B, throws E? super C, E> action) - Type Parameters:
A
-B
-C
-E
-- Parameters:
a
-b
-c
-action
-- Throws:
E
- the e
-
forEach
public static <A,B, void forEachE extends Exception> (A[] a, B[] b, A valueForNoneA, B valueForNoneB, Throwables.BiConsumer<? super A, ? super B, throws EE> action) - Type Parameters:
A
-B
-E
-- Parameters:
a
-b
-valueForNoneA
-valueForNoneB
-action
-- Throws:
E
- the e
-
forEach
public static <A,B, void forEachE extends Exception> (Iterable<A> a, Iterable<B> b, A valueForNoneA, B valueForNoneB, Throwables.BiConsumer<? super A, ? super B, throws EE> action) - Type Parameters:
A
-B
-E
-- Parameters:
a
-b
-valueForNoneA
-valueForNoneB
-action
-- Throws:
E
- the e
-
forEach
public static <A,B, void forEachE extends Exception> (Iterator<A> a, Iterator<B> b, A valueForNoneA, B valueForNoneB, Throwables.BiConsumer<? super A, ? super B, throws EE> action) - Type Parameters:
A
-B
-E
-- Parameters:
a
-b
-valueForNoneA
-valueForNoneB
-action
-- Throws:
E
- the e
-
forEach
public static <A,B, void forEachC, E extends Exception> (A[] a, B[] b, C[] c, A valueForNoneA, B valueForNoneB, C valueForNoneC, Throwables.TriConsumer<? super A, ? super B, throws E? super C, E> action) - Type Parameters:
A
-B
-C
-E
-- Parameters:
a
-b
-c
-valueForNoneA
-valueForNoneB
-valueForNoneC
-action
-- Throws:
E
- the e
-
forEach
public static <A,B, void forEachC, E extends Exception> (Iterable<A> a, Iterable<B> b, Iterable<C> c, A valueForNoneA, B valueForNoneB, C valueForNoneC, Throwables.TriConsumer<? super A, ? super B, throws E? super C, E> action) - Type Parameters:
A
-B
-C
-E
-- Parameters:
a
-b
-c
-valueForNoneA
-valueForNoneB
-valueForNoneC
-action
-- Throws:
E
- the e
-
forEach
public static <A,B, void forEachC, E extends Exception> (Iterator<A> a, Iterator<B> b, Iterator<C> c, A valueForNoneA, B valueForNoneB, C valueForNoneC, Throwables.TriConsumer<? super A, ? super B, throws E? super C, E> action) - Type Parameters:
A
-B
-C
-E
-- Parameters:
a
-b
-c
-valueForNoneA
-valueForNoneB
-valueForNoneC
-action
-- Throws:
E
- the e
-
forEachNonNull
public static <T,E extends Exception> void forEachNonNull(T[] a, Throwables.Consumer<? super T, E> action) throws EFor each non null.- Type Parameters:
T
-E
-- Parameters:
a
-action
-- Throws:
E
- the e
-
forEachNonNull
public static <T,E extends Exception> void forEachNonNull(Iterable<T> c, Throwables.Consumer<? super T, E> action) throws EFor each non null.- Type Parameters:
T
-E
-- Parameters:
c
-action
-- Throws:
E
- the e
-
forEachNonNull
public static <T,U, void forEachNonNullE extends Exception, E2 extends Exception> (T[] a, Throwables.Function<? super T, ? extends Collection<U>, throws E, E2E> flatMapper, Throwables.BiConsumer<? super T, ? super U, E2> action) For each non null.- Type Parameters:
T
-U
-E
-E2
-- Parameters:
a
-flatMapper
-action
-- Throws:
E
- the eE2
- the e2
-
forEachNonNull
public static <T,U, void forEachNonNullE extends Exception, E2 extends Exception> (Iterable<T> c, Throwables.Function<? super T, ? extends Collection<U>, throws E, E2E> flatMapper, Throwables.BiConsumer<? super T, ? super U, E2> action) For each non null.- Type Parameters:
T
-U
-E
-E2
-- Parameters:
c
-flatMapper
-action
-- Throws:
E
- the eE2
- the e2
-
forEachNonNull
public static <T,U, void forEachNonNullE extends Exception, E2 extends Exception> (Iterator<? extends T> iter, Throwables.Function<? super T, ? extends Collection<U>, throws E, E2E> flatMapper, Throwables.BiConsumer<? super T, ? super U, E2> action) For each non null.- Type Parameters:
T
-U
-E
-E2
-- Parameters:
iter
-flatMapper
-action
-- Throws:
E
- the eE2
- the e2
-
forEachNonNull
public static <T,T2, void forEachNonNullT3, E extends Exception, E2 extends Exception, E3 extends Exception> (T[] a, Throwables.Function<? super T, ? extends Collection<T2>, throws E, E2, E3E> flatMapper, Throwables.Function<? super T2, ? extends Collection<T3>, E2> flatMapper2, Throwables.TriConsumer<? super T, ? super T2, ? super T3, E3> action) For each non null.- Type Parameters:
T
-T2
-T3
-E
-E2
-E3
-- Parameters:
a
-flatMapper
-flatMapper2
-action
-- Throws:
E
- the eE2
- the e2E3
- the e3
-
forEachNonNull
public static <T,T2, void forEachNonNullT3, E extends Exception, E2 extends Exception, E3 extends Exception> (Iterable<T> c, Throwables.Function<? super T, ? extends Collection<T2>, throws E, E2, E3E> flatMapper, Throwables.Function<? super T2, ? extends Collection<T3>, E2> flatMapper2, Throwables.TriConsumer<? super T, ? super T2, ? super T3, E3> action) For each non null.- Type Parameters:
T
-T2
-T3
-E
-E2
-E3
-- Parameters:
c
-flatMapper
-flatMapper2
-action
-- Throws:
E
- the eE2
- the e2E3
- the e3
-
forEachNonNull
public static <T,T2, void forEachNonNullT3, E extends Exception, E2 extends Exception, E3 extends Exception> (Iterator<? extends T> iter, Throwables.Function<? super T, ? extends Collection<T2>, throws E, E2, E3E> flatMapper, Throwables.Function<? super T2, ? extends Collection<T3>, E2> flatMapper2, Throwables.TriConsumer<? super T, ? super T2, ? super T3, E3> action) For each non null.- Type Parameters:
T
-T2
-T3
-E
-E2
-E3
-- Parameters:
iter
-flatMapper
-flatMapper2
-action
-- Throws:
E
- the eE2
- the e2E3
- the e3
-
forEachPair
public static <T,E extends Exception> void forEachPair(T[] a, Throwables.BiConsumer<? super T, ? super T, throws EE> action) For each pair.- Type Parameters:
T
-E
-- Parameters:
a
-action
-- Throws:
E
- the e
-
forEachPair
public static <T,E extends Exception> void forEachPair(T[] a, Throwables.BiConsumer<? super T, ? super T, throws EE> action, int increment) For each pair.- Type Parameters:
T
-E
-- Parameters:
a
-action
-increment
-- Throws:
E
- the e
-
forEachPair
public static <T,E extends Exception> void forEachPair(Iterable<? extends T> c, Throwables.BiConsumer<? super T, ? super T, throws EE> action) For each pair.- Type Parameters:
T
-E
-- Parameters:
c
-action
-- Throws:
E
- the e
-
forEachPair
public static <T,E extends Exception> void forEachPair(Iterable<? extends T> c, Throwables.BiConsumer<? super T, ? super T, throws EE> action, int increment) For each pair.- Type Parameters:
T
-E
-- Parameters:
c
-action
-increment
-- Throws:
E
- the e
-
forEachPair
public static <T,E extends Exception> void forEachPair(Iterator<? extends T> iter, Throwables.BiConsumer<? super T, ? super T, throws EE> action) For each pair.- Type Parameters:
T
-E
-- Parameters:
iter
-action
-- Throws:
E
- the e
-
forEachPair
public static <T,E extends Exception> void forEachPair(Iterator<? extends T> iter, Throwables.BiConsumer<? super T, ? super T, throws EE> action, int increment) For each pair.- Type Parameters:
T
-E
-- Parameters:
iter
-action
-increment
-- Throws:
E
- the e
-
forEachTriple
public static <T,E extends Exception> void forEachTriple(T[] a, Throwables.TriConsumer<? super T, ? super T, throws E? super T, E> action) For each triple.- Type Parameters:
T
-E
-- Parameters:
a
-action
-- Throws:
E
- the e
-
forEachTriple
public static <T,E extends Exception> void forEachTriple(T[] a, Throwables.TriConsumer<? super T, ? super T, throws E? super T, E> action, int increment) For each triple.- Type Parameters:
T
-E
-- Parameters:
a
-action
-increment
-- Throws:
E
- the e
-
forEachTriple
public static <T,E extends Exception> void forEachTriple(Iterable<? extends T> c, Throwables.TriConsumer<? super T, ? super T, throws E? super T, E> action) For each triple.- Type Parameters:
T
-E
-- Parameters:
c
-action
-- Throws:
E
- the e
-
forEachTriple
public static <T,E extends Exception> void forEachTriple(Iterable<? extends T> c, Throwables.TriConsumer<? super T, ? super T, throws E? super T, E> action, int increment) For each triple.- Type Parameters:
T
-E
-- Parameters:
c
-action
-increment
-- Throws:
E
- the e
-
forEachTriple
public static <T,E extends Exception> void forEachTriple(Iterator<? extends T> iter, Throwables.TriConsumer<? super T, ? super T, throws E? super T, E> action) For each triple.- Type Parameters:
T
-E
-- Parameters:
iter
-action
-- Throws:
E
- the e
-
forEachTriple
public static <T,E extends Exception> void forEachTriple(Iterator<? extends T> iter, Throwables.TriConsumer<? super T, ? super T, throws E? super T, E> action, int increment) For each triple.- Type Parameters:
T
-E
-- Parameters:
iter
-action
-increment
-- Throws:
E
- the e
-
filter
public static <E extends Exception> boolean[] filter(boolean[] a, Throwables.BooleanPredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> boolean[] filter(boolean[] a, Throwables.BooleanPredicate<E> filter, int max) throws E - Type Parameters:
E
-- Parameters:
a
-filter
-max
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> boolean[] filter(boolean[] a, int fromIndex, int toIndex, Throwables.BooleanPredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> boolean[] filter(boolean[] a, int fromIndex, int toIndex, Throwables.BooleanPredicate<E> filter, int max) throws E 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.- Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-max
- maximum return result.- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> char[] filter(char[] a, Throwables.CharPredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> char[] filter(char[] a, Throwables.CharPredicate<E> filter, int max) throws E - Type Parameters:
E
-- Parameters:
a
-filter
-max
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> char[] filter(char[] a, int fromIndex, int toIndex, Throwables.CharPredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> char[] filter(char[] a, int fromIndex, int toIndex, Throwables.CharPredicate<E> filter, int max) throws E 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.- Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-max
- maximum return result.- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> byte[] filter(byte[] a, Throwables.BytePredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> byte[] filter(byte[] a, Throwables.BytePredicate<E> filter, int max) throws E - Type Parameters:
E
-- Parameters:
a
-filter
-max
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> byte[] filter(byte[] a, int fromIndex, int toIndex, Throwables.BytePredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> byte[] filter(byte[] a, int fromIndex, int toIndex, Throwables.BytePredicate<E> filter, int max) throws E 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.- Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-max
- maximum return result.- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> short[] filter(short[] a, Throwables.ShortPredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> short[] filter(short[] a, Throwables.ShortPredicate<E> filter, int max) throws E - Type Parameters:
E
-- Parameters:
a
-filter
-max
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> short[] filter(short[] a, int fromIndex, int toIndex, Throwables.ShortPredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> short[] filter(short[] a, int fromIndex, int toIndex, Throwables.ShortPredicate<E> filter, int max) throws E 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.- Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-max
- maximum return result.- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> int[] filter(int[] a, Throwables.IntPredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> int[] filter(int[] a, Throwables.IntPredicate<E> filter, int max) throws E - Type Parameters:
E
-- Parameters:
a
-filter
-max
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> int[] filter(int[] a, int fromIndex, int toIndex, Throwables.IntPredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> int[] filter(int[] a, int fromIndex, int toIndex, Throwables.IntPredicate<E> filter, int max) throws E 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.- Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-max
- maximum return result.- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> long[] filter(long[] a, Throwables.LongPredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> long[] filter(long[] a, Throwables.LongPredicate<E> filter, int max) throws E - Type Parameters:
E
-- Parameters:
a
-filter
-max
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> long[] filter(long[] a, int fromIndex, int toIndex, Throwables.LongPredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> long[] filter(long[] a, int fromIndex, int toIndex, Throwables.LongPredicate<E> filter, int max) throws E 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.- Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-max
- maximum return result.- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> float[] filter(float[] a, Throwables.FloatPredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> float[] filter(float[] a, Throwables.FloatPredicate<E> filter, int max) throws E - Type Parameters:
E
-- Parameters:
a
-filter
-max
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> float[] filter(float[] a, int fromIndex, int toIndex, Throwables.FloatPredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> float[] filter(float[] a, int fromIndex, int toIndex, Throwables.FloatPredicate<E> filter, int max) throws E 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.- Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-max
- maximum return result.- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> double[] filter(double[] a, Throwables.DoublePredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> double[] filter(double[] a, Throwables.DoublePredicate<E> filter, int max) throws E - Type Parameters:
E
-- Parameters:
a
-filter
-max
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> double[] filter(double[] a, int fromIndex, int toIndex, Throwables.DoublePredicate<E> filter) throws E - Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <E extends Exception> double[] filter(double[] a, int fromIndex, int toIndex, Throwables.DoublePredicate<E> filter, int max) throws E 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.- Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-max
- maximum return result.- Returns:
- Throws:
E
- the e
-
filter
public static <T,E extends Exception> List<T> filter(T[] a, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <T,R extends Collection<T>, R filterE extends Exception> (T[] a, Throwables.Predicate<? super T, E> filter, IntFunction<R> supplier) throws E- Type Parameters:
T
-R
-E
-- Parameters:
a
-filter
-supplier
-- Returns:
- Throws:
E
- the e
-
filter
public static <T,E extends Exception> List<T> filter(T[] a, Throwables.Predicate<? super T, E> filter, int max) throws E- Type Parameters:
T
-E
-- Parameters:
a
-filter
-max
-- Returns:
- Throws:
E
- the e
-
filter
public static <T,R extends Collection<T>, R filterE extends Exception> (T[] a, Throwables.Predicate<? super T, E> filter, int max, IntFunction<R> supplier) throws E- Type Parameters:
T
-R
-E
-- Parameters:
a
-filter
-max
-supplier
-- Returns:
- Throws:
E
- the e
-
filter
public static <T,E extends Exception> List<T> filter(T[] a, int fromIndex, int toIndex, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <T,R extends Collection<T>, R filterE extends Exception> (T[] a, int fromIndex, int toIndex, Throwables.Predicate<? super T, E> filter, IntFunction<R> supplier) throws E- Type Parameters:
T
-R
-E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-supplier
-- Returns:
- Throws:
E
- the e
-
filter
public static <T,E extends Exception> List<T> filter(T[] a, int fromIndex, int toIndex, Throwables.Predicate<? super T, E> filter, int max) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-max
-- Returns:
- Throws:
E
- the e
-
filter
public static <T,R extends Collection<T>, R filterE extends Exception> (T[] a, int fromIndex, int toIndex, Throwables.Predicate<? super T, E> filter, int max, IntFunction<R> supplier) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-R
-E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-max
-supplier
-- Returns:
- Throws:
E
- the e
-
filter
public static <T,E extends Exception> List<T> filter(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
c
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <T,R extends Collection<T>, R filterE extends Exception> (Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter, IntFunction<R> supplier) throws E- Type Parameters:
T
-R
-E
-- Parameters:
c
-filter
-supplier
-- Returns:
- Throws:
E
- the e
-
filter
public static <T,E extends Exception> List<T> filter(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter, int max) throws E- Type Parameters:
T
-E
-- Parameters:
c
-filter
-max
-- Returns:
- Throws:
E
- the e
-
filter
public static <T,R extends Collection<T>, R filterE extends Exception> (Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter, int max, IntFunction<R> supplier) throws E- Type Parameters:
T
-R
-E
-- Parameters:
c
-filter
-max
-supplier
-- Returns:
- Throws:
E
- the e
-
filter
public static <T,E extends Exception> List<T> filter(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
filter
public static <T,R extends Collection<T>, R filterE extends Exception> (Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Predicate<? super T, E> filter, IntFunction<R> supplier) throws E- Type Parameters:
T
-R
-E
-- Parameters:
c
-fromIndex
-toIndex
-filter
-supplier
-- Returns:
- Throws:
E
- the e
-
filter
public 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- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-filter
-max
-- Returns:
- Throws:
E
- the e
-
filter
public static <T,R extends Collection<T>, R filterE extends Exception> (Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Predicate<? super T, E> filter, int max, IntFunction<R> supplier) throws E- Type Parameters:
T
-R
-E
-- Parameters:
c
-fromIndex
-toIndex
-filter
-max
-supplier
-- Returns:
- Throws:
E
- the e
-
mapToBoolean
public static <T,E extends Exception> boolean[] mapToBoolean(T[] a, Throwables.ToBooleanFunction<? super T, E> func) throws EMap to boolean.- Type Parameters:
T
-E
-- Parameters:
a
-func
-- Returns:
- Throws:
E
- the e
-
mapToBoolean
public static <T,E extends Exception> boolean[] mapToBoolean(T[] a, int fromIndex, int toIndex, Throwables.ToBooleanFunction<? super T, E> func) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
mapToBoolean
public static <T,E extends Exception> boolean[] mapToBoolean(Collection<? extends T> c, Throwables.ToBooleanFunction<? super T, E> func) throws EMap to boolean.- Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
mapToBoolean
public static <T,E extends Exception> boolean[] mapToBoolean(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToBooleanFunction<? super T, E> func) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
mapToChar
public static <T,E extends Exception> char[] mapToChar(T[] a, Throwables.ToCharFunction<? super T, E> func) throws EMap to char.- Type Parameters:
T
-E
-- Parameters:
a
-func
-- Returns:
- Throws:
E
- the e
-
mapToChar
public static <T,E extends Exception> char[] mapToChar(T[] a, int fromIndex, int toIndex, Throwables.ToCharFunction<? super T, E> func) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
mapToChar
public static <T,E extends Exception> char[] mapToChar(Collection<? extends T> c, Throwables.ToCharFunction<? super T, E> func) throws EMap to char.- Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
mapToChar
public static <T,E extends Exception> char[] mapToChar(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToCharFunction<? super T, E> func) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
mapToByte
public static <T,E extends Exception> byte[] mapToByte(T[] a, Throwables.ToByteFunction<? super T, E> func) throws EMap to byte.- Type Parameters:
T
-E
-- Parameters:
a
-func
-- Returns:
- Throws:
E
- the e
-
mapToByte
public static <T,E extends Exception> byte[] mapToByte(T[] a, int fromIndex, int toIndex, Throwables.ToByteFunction<? super T, E> func) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
mapToByte
public static <T,E extends Exception> byte[] mapToByte(Collection<? extends T> c, Throwables.ToByteFunction<? super T, E> func) throws EMap to byte.- Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
mapToByte
public static <T,E extends Exception> byte[] mapToByte(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToByteFunction<? super T, E> func) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
mapToShort
public static <T,E extends Exception> short[] mapToShort(T[] a, Throwables.ToShortFunction<? super T, E> func) throws EMap to short.- Type Parameters:
T
-E
-- Parameters:
a
-func
-- Returns:
- Throws:
E
- the e
-
mapToShort
public static <T,E extends Exception> short[] mapToShort(T[] a, int fromIndex, int toIndex, Throwables.ToShortFunction<? super T, E> func) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
mapToShort
public static <T,E extends Exception> short[] mapToShort(Collection<? extends T> c, Throwables.ToShortFunction<? super T, E> func) throws EMap to short.- Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
mapToShort
public static <T,E extends Exception> short[] mapToShort(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToShortFunction<? super T, E> func) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
mapToInt
public static <T,E extends Exception> int[] mapToInt(T[] a, Throwables.ToIntFunction<? super T, E> func) throws EMap to int.- Type Parameters:
T
-E
-- Parameters:
a
-func
-- Returns:
- Throws:
E
- the e
-
mapToInt
public static <T,E extends Exception> int[] mapToInt(T[] a, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T, E> func) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
mapToInt
public static <T,E extends Exception> int[] mapToInt(Collection<? extends T> c, Throwables.ToIntFunction<? super T, E> func) throws EMap to int.- Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
mapToInt
public static <T,E extends Exception> int[] mapToInt(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T, E> func) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
mapToLong
public static <T,E extends Exception> long[] mapToLong(T[] a, Throwables.ToLongFunction<? super T, E> func) throws EMap to long.- Type Parameters:
T
-E
-- Parameters:
a
-func
-- Returns:
- Throws:
E
- the e
-
mapToLong
public static <T,E extends Exception> long[] mapToLong(T[] a, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T, E> func) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
mapToLong
public static <T,E extends Exception> long[] mapToLong(Collection<? extends T> c, Throwables.ToLongFunction<? super T, E> func) throws EMap to long.- Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
mapToLong
public static <T,E extends Exception> long[] mapToLong(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T, E> func) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
mapToFloat
public static <T,E extends Exception> float[] mapToFloat(T[] a, Throwables.ToFloatFunction<? super T, E> func) throws EMap to float.- Type Parameters:
T
-E
-- Parameters:
a
-func
-- Returns:
- Throws:
E
- the e
-
mapToFloat
public static <T,E extends Exception> float[] mapToFloat(T[] a, int fromIndex, int toIndex, Throwables.ToFloatFunction<? super T, E> func) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
mapToFloat
public static <T,E extends Exception> float[] mapToFloat(Collection<? extends T> c, Throwables.ToFloatFunction<? super T, E> func) throws EMap to float.- Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
mapToFloat
public static <T,E extends Exception> float[] mapToFloat(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToFloatFunction<? super T, E> func) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
mapToDouble
public static <T,E extends Exception> double[] mapToDouble(T[] a, Throwables.ToDoubleFunction<? super T, E> func) throws EMap to double.- Type Parameters:
T
-E
-- Parameters:
a
-func
-- Returns:
- Throws:
E
- the e
-
mapToDouble
public static <T,E extends Exception> double[] mapToDouble(T[] a, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T, E> func) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
mapToDouble
public static <T,E extends Exception> double[] mapToDouble(Collection<? extends T> c, Throwables.ToDoubleFunction<? super T, E> func) throws EMap to double.- Type Parameters:
T
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
mapToDouble
public static <T,E extends Exception> double[] mapToDouble(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T, E> func) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
map
public static <T,R, List<R> mapE extends Exception> (T[] a, Throwables.Function<? super T, ? extends R, throws EE> func) - Type Parameters:
T
-R
-E
-- Parameters:
a
-func
-- Returns:
- Throws:
E
- the e
-
map
public static <T,R, C mapC extends Collection<R>, E extends Exception> (T[] a, Throwables.Function<? super T, ? extends R, throws EE> func, IntFunction<? extends C> supplier) - Type Parameters:
T
-R
-C
-E
-- Parameters:
a
-func
-supplier
-- Returns:
- Throws:
E
- the e
-
map
public static <T,R, List<R> mapE extends Exception> (T[] a, int fromIndex, int toIndex, Throwables.Function<? super T, ? extends R, throws EE> func) 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.- Type Parameters:
T
-R
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
map
public static <T,R, C mapC extends Collection<R>, E extends Exception> (T[] a, int fromIndex, int toIndex, Throwables.Function<? super T, ? extends R, throws EE> func, IntFunction<? extends C> supplier) 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.- Type Parameters:
T
-R
-C
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-supplier
-- Returns:
- Throws:
E
- the e
-
map
public static <T,R, List<R> mapE extends Exception> (Iterable<? extends T> c, Throwables.Function<? super T, ? extends R, throws EE> func) - Type Parameters:
T
-R
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
map
public static <T,R, C mapC extends Collection<R>, E extends Exception> (Iterable<? extends T> c, Throwables.Function<? super T, ? extends R, throws EE> func, IntFunction<? extends C> supplier) - Type Parameters:
T
-R
-C
-E
-- Parameters:
c
-func
-supplier
-- Returns:
- Throws:
E
- the e
-
map
public static <T,R, List<R> mapE extends Exception> (Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Function<? super T, ? extends R, throws EE> func) 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.- Type Parameters:
T
-R
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
map
public static <T,R, C mapC extends Collection<R>, E extends Exception> (Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Function<? super T, ? extends R, throws EE> func, IntFunction<? extends C> supplier) 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.- Type Parameters:
T
-R
-C
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-supplier
-- Returns:
- Throws:
E
- the e
-
flatMap
public static <T,R, List<R> flatMapE extends Exception> (T[] a, Throwables.Function<? super T, ? extends Collection<? extends R>, throws EE> func) - Type Parameters:
T
-R
-E
-- Parameters:
a
-func
-- Returns:
- Throws:
E
- the e
-
flatMap
public static <T,R, C flatMapC extends Collection<R>, E extends Exception> (T[] a, Throwables.Function<? super T, ? extends Collection<? extends R>, throws EE> func, IntFunction<? extends C> supplier) - Type Parameters:
T
-R
-C
-E
-- Parameters:
a
-func
-supplier
-- Returns:
- Throws:
E
- the e
-
flatMap
public static <T,R, List<R> flatMapE extends Exception> (T[] a, int fromIndex, int toIndex, Throwables.Function<? super T, ? extends Collection<? extends R>, throws EE> func) 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.- Type Parameters:
T
-R
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
flatMap
public static <T,R, C flatMapC extends Collection<R>, E extends Exception> (T[] a, int fromIndex, int toIndex, Throwables.Function<? super T, ? extends Collection<? extends R>, throws EE> func, IntFunction<? extends C> supplier) 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.- Type Parameters:
T
-R
-C
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-supplier
-- Returns:
- Throws:
E
- the e
-
flatMap
public static <T,R, List<R> flatMapE extends Exception> (Iterable<? extends T> c, Throwables.Function<? super T, ? extends Collection<? extends R>, throws EE> func) - Type Parameters:
T
-R
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
flatMap
public static <T,R, C flatMapC extends Collection<R>, E extends Exception> (Iterable<? extends T> c, Throwables.Function<? super T, ? extends Collection<? extends R>, throws EE> func, IntFunction<? extends C> supplier) - Type Parameters:
T
-R
-C
-E
-- Parameters:
c
-func
-supplier
-- Returns:
- Throws:
E
- the e
-
flatMap
public static <T,R, List<R> flatMapE extends Exception> (Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Function<? super T, ? extends Collection<? extends R>, throws EE> func) 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.- Type Parameters:
T
-R
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
flatMap
public static <T,R, C flatMapC extends Collection<R>, E extends Exception> (Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Function<? super T, ? extends Collection<? extends R>, throws EE> func, IntFunction<? extends C> supplier) 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.- Type Parameters:
T
-R
-C
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-supplier
-- Returns:
- Throws:
E
- the e
-
flatMap
public static <T,T2, List<R> flatMapR, E extends Exception, E2 extends Exception> (T[] a, Throwables.Function<? super T, ? extends Collection<? extends T2>, throws E, E2E> func, Throwables.Function<? super T2, ? extends Collection<? extends R>, E2> func2) - Type Parameters:
T
-T2
-R
-C
-E
-E2
-- Parameters:
a
-func
-func2
-- Returns:
- Throws:
E
- the eE2
- the e2
-
flatMap
public static <T,T2, C flatMapR, C extends Collection<R>, E extends Exception, E2 extends Exception> (T[] a, Throwables.Function<? super T, ? extends Collection<? extends T2>, throws E, E2E> 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.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-T2
-R
-C
-E
-E2
-- Parameters:
a
-func
-func2
-supplier
-- Returns:
- Throws:
E
- the eE2
- the e2
-
flatMap
public static <T,T2, List<R> flatMapR, E extends Exception, E2 extends Exception> (Iterable<? extends T> c, Throwables.Function<? super T, ? extends Collection<? extends T2>, throws E, E2E> func, Throwables.Function<? super T2, ? extends Collection<? extends R>, E2> func2) - Type Parameters:
T
-T2
-R
-C
-E
-E2
-- Parameters:
c
-func
-func2
-- Returns:
- Throws:
E
- the eE2
- the e2
-
flatMap
public static <T,T2, C flatMapR, C extends Collection<R>, E extends Exception, E2 extends Exception> (Iterable<? extends T> c, Throwables.Function<? super T, ? extends Collection<? extends T2>, throws E, E2E> 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.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-T2
-R
-C
-E
-E2
-- Parameters:
c
-func
-func2
-supplier
-- Returns:
- Throws:
E
- the eE2
- the e2
-
flatmap
public static <T,R, List<R> flatmapE extends Exception> (T[] a, Throwables.Function<? super T, ? extends R[], throws EE> func) - Type Parameters:
T
-R
-E
-- Parameters:
a
-func
-- Returns:
- Throws:
E
- the e
-
flatmap
public static <T,R, C flatmapC extends Collection<R>, E extends Exception> (T[] a, Throwables.Function<? super T, ? extends R[], throws EE> func, IntFunction<? extends C> supplier) - Type Parameters:
T
-R
-C
-E
-- Parameters:
a
-func
-supplier
-- Returns:
- Throws:
E
- the e
-
flatmap
public static <T,R, List<R> flatmapE extends Exception> (T[] a, int fromIndex, int toIndex, Throwables.Function<? super T, ? extends R[], throws EE> func) 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.- Type Parameters:
T
-R
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
flatmap
public static <T,R, C flatmapC extends Collection<R>, E extends Exception> (T[] a, int fromIndex, int toIndex, Throwables.Function<? super T, ? extends R[], throws EE> func, IntFunction<? extends C> supplier) 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.- Type Parameters:
T
-R
-C
-E
-- Parameters:
a
-fromIndex
-toIndex
-func
-supplier
-- Returns:
- Throws:
E
- the e
-
flatmap
public static <T,R, List<R> flatmapE extends Exception> (Iterable<? extends T> c, Throwables.Function<? super T, ? extends R[], throws EE> func) - Type Parameters:
T
-R
-E
-- Parameters:
c
-func
-- Returns:
- Throws:
E
- the e
-
flatmap
public static <T,R, C flatmapC extends Collection<R>, E extends Exception> (Iterable<? extends T> c, Throwables.Function<? super T, ? extends R[], throws EE> func, IntFunction<? extends C> supplier) - Type Parameters:
T
-R
-C
-E
-- Parameters:
c
-func
-supplier
-- Returns:
- Throws:
E
- the e
-
flatmap
public static <T,R, List<R> flatmapE extends Exception> (Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Function<? super T, ? extends R[], throws EE> func) 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.- Type Parameters:
T
-R
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-- Returns:
- Throws:
E
- the e
-
flatmap
public static <T,R, C flatmapC extends Collection<R>, E extends Exception> (Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Function<? super T, ? extends R[], throws EE> func, IntFunction<? extends C> supplier) 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.- Type Parameters:
T
-R
-C
-E
-- Parameters:
c
-fromIndex
-toIndex
-func
-supplier
-- Returns:
- Throws:
E
- the e
-
takeWhile
public static <T,E extends Exception> List<T> takeWhile(T[] a, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
a
-filter
-- Returns:
- the list
- Throws:
E
- the e
-
takeWhile
public static <T,E extends Exception> List<T> takeWhile(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
c
-filter
-- Returns:
- the list
- Throws:
E
- the e
-
takeWhileInclusive
public static <T,E extends Exception> List<T> takeWhileInclusive(T[] a, Throwables.Predicate<? super T, E> filter) throws ETake while inclusive.- Type Parameters:
T
-E
-- Parameters:
a
-filter
-- Returns:
- the list
- Throws:
E
- the e
-
takeWhileInclusive
public static <T,E extends Exception> List<T> takeWhileInclusive(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter) throws ETake while inclusive.- Type Parameters:
T
-E
-- Parameters:
c
-filter
-- Returns:
- the list
- Throws:
E
- the e
-
dropWhile
public static <T,E extends Exception> List<T> dropWhile(T[] a, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
a
-filter
-- Returns:
- the list
- Throws:
E
- the e
-
dropWhile
public static <T,E extends Exception> List<T> dropWhile(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
c
-filter
-- Returns:
- the list
- Throws:
E
- the e
-
skipUntil
public static <T,E extends Exception> List<T> skipUntil(T[] a, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
a
-filter
-- Returns:
- the list
- Throws:
E
- the e
-
skipUntil
public static <T,E extends Exception> List<T> skipUntil(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
c
-filter
-- Returns:
- the list
- Throws:
E
- the e
-
distinct
public static boolean[] distinct(boolean[] a) 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.- Parameters:
a
-- Returns:
-
distinct
public static boolean[] distinct(boolean[] a, int fromIndex, int toIndex) 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.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
distinct
public static char[] distinct(char[] a) 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.- Parameters:
a
-- Returns:
-
distinct
public static char[] distinct(char[] a, int fromIndex, int toIndex) 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.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
distinct
public static byte[] distinct(byte[] a) 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.- Parameters:
a
-- Returns:
-
distinct
public static byte[] distinct(byte[] a, int fromIndex, int toIndex) 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.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
distinct
public static short[] distinct(short[] a) 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.- Parameters:
a
-- Returns:
-
distinct
public static short[] distinct(short[] a, int fromIndex, int toIndex) 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.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
distinct
public static int[] distinct(int[] a) 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.- Parameters:
a
-- Returns:
-
distinct
public static int[] distinct(int[] a, int fromIndex, int toIndex) 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.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
distinct
public static long[] distinct(long[] a) 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.- Parameters:
a
-- Returns:
-
distinct
public static long[] distinct(long[] a, int fromIndex, int toIndex) 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.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
distinct
public static float[] distinct(float[] a) 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.- Parameters:
a
-- Returns:
-
distinct
public static float[] distinct(float[] a, int fromIndex, int toIndex) 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.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
distinct
public static double[] distinct(double[] a) 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.- Parameters:
a
-- Returns:
-
distinct
public static double[] distinct(double[] a, int fromIndex, int toIndex) 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.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
distinct
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.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
distinct
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.- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
distinct
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.- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
distinct
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.- Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
distinctBy
public static <T,E extends Exception> List<T> distinctBy(T[] a, Throwables.Function<? super T, ?, throws EE> keyMapper) Distinct by the value mapped fromkeyMapper
. 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.- Type Parameters:
T
-E
-- Parameters:
a
-keyMapper
- don't change value of the input parameter.- Returns:
- Throws:
E
- the e
-
distinctBy
public static <T,E extends Exception> List<T> distinctBy(T[] a, int fromIndex, int toIndex, Throwables.Function<? super T, ?, throws EE> keyMapper) Distinct by the value mapped fromkeyMapper
. 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.- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-keyMapper
- don't change value of the input parameter.- Returns:
- Throws:
E
- the e
-
distinctBy
public static <T,C extends Collection<T>, C distinctByE extends Exception> (T[] a, Throwables.Function<? super T, ?, throws EE> keyMapper, Supplier<C> supplier) Distinct by the value mapped fromkeyMapper
. 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.- Type Parameters:
T
-E
-- Parameters:
a
-keyMapper
- don't change value of the input parameter.supplier
-- Returns:
- Throws:
E
- the e
-
distinctBy
public static <T,E extends Exception> List<T> distinctBy(Iterable<? extends T> c, Throwables.Function<? super T, ?, throws EE> keyMapper) Distinct by the value mapped fromkeyMapper
. 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.- Type Parameters:
T
-E
-- Parameters:
c
-keyMapper
- don't change value of the input parameter.- Returns:
- Throws:
E
- the e
-
distinctBy
public static <T,C extends Collection<T>, C distinctByE extends Exception> (Iterable<? extends T> c, Throwables.Function<? super T, ?, throws EE> keyMapper, Supplier<C> supplier) Distinct by the value mapped fromkeyMapper
. 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.- Type Parameters:
T
-E
-- Parameters:
c
-keyMapper
- don't change value of the input parameter.supplier
-- Returns:
- Throws:
E
- the e
-
distinctBy
public static <T,E extends Exception> List<T> distinctBy(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Function<? super T, ?, throws EE> keyMapper) Distinct by the value mapped fromkeyMapper
. 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.- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-keyMapper
- don't change value of the input parameter.- Returns:
- Throws:
E
- the e
-
allMatch
public static <T,E extends Exception> boolean allMatch(T[] a, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
allMatch
public static <T,E extends Exception> boolean allMatch(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
c
-filter
-- Returns:
- Throws:
E
- the e
-
allMatch
public static <T,E extends Exception> boolean allMatch(Iterator<? extends T> iter, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
iter
-filter
-- Returns:
- Throws:
E
- the e
-
anyMatch
public static <T,E extends Exception> boolean anyMatch(T[] a, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
anyMatch
public static <T,E extends Exception> boolean anyMatch(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
c
-filter
-- Returns:
- Throws:
E
- the e
-
anyMatch
public static <T,E extends Exception> boolean anyMatch(Iterator<? extends T> iter, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
iter
-filter
-- Returns:
- Throws:
E
- the e
-
noneMatch
public static <T,E extends Exception> boolean noneMatch(T[] a, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
noneMatch
public static <T,E extends Exception> boolean noneMatch(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
c
-filter
-- Returns:
- Throws:
E
- the e
-
noneMatch
public static <T,E extends Exception> boolean noneMatch(Iterator<? extends T> iter, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
iter
-filter
-- Returns:
- Throws:
E
- the e
-
nMatch
public static <T,E extends Exception> boolean nMatch(T[] a, int atLeast, int atMost, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
a
-atLeast
-atMost
-filter
-- Returns:
- Throws:
E
- the e
-
nMatch
public static <T,E extends Exception> boolean nMatch(Iterable<? extends T> c, int atLeast, int atMost, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
c
-atLeast
-atMost
-filter
-- Returns:
- Throws:
E
- the e
-
nMatch
public static <T,E extends Exception> boolean nMatch(Iterator<? extends T> iter, int atLeast, int atMost, Throwables.Predicate<? super T, E> filter) throws E- Type Parameters:
T
-E
-- Parameters:
c
-atLeast
-atMost
-filter
-- Returns:
- Throws:
E
- the e
-
allTrue
public static boolean allTrue(boolean[] a) -
allFalse
public static boolean allFalse(boolean[] a) -
anyTrue
public static boolean anyTrue(boolean[] a) -
anyFalse
public static boolean anyFalse(boolean[] a) -
count
public static <E extends Exception> int count(boolean[] a, Throwables.BooleanPredicate<E> filter) throws E 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.- Type Parameters:
E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <E extends Exception> int count(boolean[] a, int fromIndex, int toIndex, Throwables.BooleanPredicate<E> filter) throws E 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.- Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <E extends Exception> int count(char[] a, Throwables.CharPredicate<E> filter) throws E 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.- Type Parameters:
E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <E extends Exception> int count(char[] a, int fromIndex, int toIndex, Throwables.CharPredicate<E> filter) throws E 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.- Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <E extends Exception> int count(byte[] a, Throwables.BytePredicate<E> filter) throws E 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.- Type Parameters:
E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <E extends Exception> int count(byte[] a, int fromIndex, int toIndex, Throwables.BytePredicate<E> filter) throws E 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.- Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <E extends Exception> int count(short[] a, Throwables.ShortPredicate<E> filter) throws E 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.- Type Parameters:
E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <E extends Exception> int count(short[] a, int fromIndex, int toIndex, Throwables.ShortPredicate<E> filter) throws E 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.- Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
count
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.- Type Parameters:
E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <E extends Exception> int count(int[] a, int fromIndex, int toIndex, Throwables.IntPredicate<E> filter) throws E 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.- Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <E extends Exception> int count(long[] a, Throwables.LongPredicate<E> filter) throws E 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.- Type Parameters:
E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <E extends Exception> int count(long[] a, int fromIndex, int toIndex, Throwables.LongPredicate<E> filter) throws E 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.- Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <E extends Exception> int count(float[] a, Throwables.FloatPredicate<E> filter) throws E 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.- Type Parameters:
E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <E extends Exception> int count(float[] a, int fromIndex, int toIndex, Throwables.FloatPredicate<E> filter) throws E 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.- Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <E extends Exception> int count(double[] a, Throwables.DoublePredicate<E> filter) throws E 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.- Type Parameters:
E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <E extends Exception> int count(double[] a, int fromIndex, int toIndex, Throwables.DoublePredicate<E> filter) throws E 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.- Type Parameters:
E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <T,E extends Exception> int count(T[] a, Throwables.Predicate<? super T, E> filter) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
a
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <T,E extends Exception> int count(T[] a, int fromIndex, int toIndex, Throwables.Predicate<? super T, E> filter) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
a
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <T,E extends Exception> int count(Iterable<? extends T> c, Throwables.Predicate<? super T, E> filter) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
c
-filter
-- Returns:
- Throws:
E
- the e
-
count
public static <T,E extends Exception> int count(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.Predicate<? super T, E> filter) throws EMostly it's designed for one-step operation to complete the operation in one step.java.util.stream.Stream
is preferred for multiple phases operation.- Type Parameters:
T
-E
-- Parameters:
c
-fromIndex
-toIndex
-filter
-- Returns:
- Throws:
E
- the e
-
count
- Parameters:
iter
-- Returns:
- Throws:
ArithmeticException
- if the totalcount
overflows anint
.
-
count
public static <T,E extends Exception> int count(Iterator<? extends T> iter, Throwables.Predicate<? super T, E> filter) throws ArithmeticException, E- Type Parameters:
T
-- Parameters:
iter
-filter
-- Returns:
- Throws:
ArithmeticException
- if the total matchedcount
overflows anint
.E
-
merge
public static <T,E extends Exception> List<T> merge(T[] a, T[] b, Throwables.BiFunction<? super T, ? super T, throws EMergeResult, E> nextSelector) - Type Parameters:
T
-E
-- Parameters:
a
-b
-nextSelector
-- Returns:
- Throws:
E
- the e
-
merge
public static <T,E extends Exception> List<T> merge(Iterable<? extends T> a, Iterable<? extends T> b, Throwables.BiFunction<? super T, ? super T, throws EMergeResult, E> nextSelector) - Type Parameters:
T
-E
-- Parameters:
a
-b
-nextSelector
-- Returns:
- Throws:
E
- the e
-
merge
public static <T> List<T> merge(Collection<? extends Iterable<? extends T>> c, BiFunction<? super T, ? super T, MergeResult> nextSelector) -
merge
public static <T,C extends Collection<T>> C merge(Collection<? extends Iterable<? extends T>> c, BiFunction<? super T, ? super T, MergeResult> nextSelector, IntFunction<? extends C> supplier) -
zip
public static <A,B, List<R> zipR, E extends Exception> (A[] a, B[] b, Throwables.BiFunction<? super A, ? super B, throws E? extends R, E> zipFunction) - Type Parameters:
A
-B
-R
-E
-- Parameters:
a
-b
-zipFunction
-- Returns:
- Throws:
E
- the e
-
zip
public static <A,B, List<R> zipR, E extends Exception> (Iterable<A> a, Iterable<B> b, Throwables.BiFunction<? super A, ? super B, throws E? extends R, E> zipFunction) - Type Parameters:
A
-B
-R
-E
-- Parameters:
a
-b
-zipFunction
-- Returns:
- Throws:
E
- the e
-
zip
public static <A,B, List<R> zipC, R, E extends Exception> (A[] a, B[] b, C[] c, Throwables.TriFunction<? super A, ? super B, throws E? super C, ? extends R, E> zipFunction) - Type Parameters:
A
-B
-C
-R
-E
-- Parameters:
a
-b
-c
-zipFunction
-- Returns:
- Throws:
E
- the e
-
zip
public static <A,B, List<R> zipC, R, E extends Exception> (Iterable<A> a, Iterable<B> b, Iterable<C> c, Throwables.TriFunction<? super A, ? super B, throws E? super C, ? extends R, E> zipFunction) - Type Parameters:
A
-B
-C
-R
-E
-- Parameters:
a
-b
-c
-zipFunction
-- Returns:
- Throws:
E
- the e
-
zip
public static <A,B, List<R> zipR, E extends Exception> (A[] a, B[] b, A valueForNoneA, B valueForNoneB, Throwables.BiFunction<? super A, ? super B, throws E? extends R, E> zipFunction) - Type Parameters:
A
-B
-R
-E
-- Parameters:
a
-b
-valueForNoneA
-valueForNoneB
-zipFunction
-- Returns:
- Throws:
E
- the e
-
zip
public static <A,B, List<R> zipR, E extends Exception> (Iterable<A> a, Iterable<B> b, A valueForNoneA, B valueForNoneB, Throwables.BiFunction<? super A, ? super B, throws E? extends R, E> zipFunction) - Type Parameters:
A
-B
-R
-E
-- Parameters:
a
-b
-valueForNoneA
-valueForNoneB
-zipFunction
-- Returns:
- Throws:
E
- the e
-
zip
public static <A,B, List<R> zipC, R, E extends Exception> (A[] a, B[] b, C[] c, A valueForNoneA, B valueForNoneB, C valueForNoneC, Throwables.TriFunction<? super A, ? super B, throws E? super C, ? extends R, E> zipFunction) - Type Parameters:
A
-B
-C
-R
-E
-- Parameters:
a
-b
-c
-valueForNoneA
-valueForNoneB
-valueForNoneC
-zipFunction
-- Returns:
- Throws:
E
- the e
-
zip
public static <A,B, List<R> zipC, R, E extends Exception> (Iterable<A> a, Iterable<B> b, Iterable<C> c, A valueForNoneA, B valueForNoneB, C valueForNoneC, Throwables.TriFunction<? super A, ? super B, throws E? super C, ? extends R, E> zipFunction) - Type Parameters:
A
-B
-C
-R
-E
-- Parameters:
a
-b
-c
-valueForNoneA
-valueForNoneB
-valueForNoneC
-zipFunction
-- Returns:
- Throws:
E
- the e
-
zip
public static <A,B, R[] zipR, E extends Exception> (Class<R> targetElementType, A[] a, B[] b, Throwables.BiFunction<? super A, ? super B, throws E? extends R, E> zipFunction) - Type Parameters:
A
-B
-R
-E
-- Parameters:
targetElementType
-a
-b
-zipFunction
-- Returns:
- Throws:
E
- the e
-
zip
public static <A,B, R[] zipR, E extends Exception> (Class<R> targetElementType, A[] a, B[] b, A valueForNoneA, B valueForNoneB, Throwables.BiFunction<? super A, ? super B, throws E? extends R, E> zipFunction) - Type Parameters:
A
-B
-R
-E
-- Parameters:
targetElementType
-a
-b
-valueForNoneA
-valueForNoneB
-zipFunction
-- Returns:
- Throws:
E
- the e
-
zip
public static <A,B, R[] zipC, R, E extends Exception> (Class<R> targetElementType, A[] a, B[] b, C[] c, Throwables.TriFunction<? super A, ? super B, throws E? super C, ? extends R, E> zipFunction) - Type Parameters:
A
-B
-C
-R
-E
-- Parameters:
targetElementType
-a
-b
-c
-zipFunction
-- Returns:
- Throws:
E
- the e
-
zip
public static <A,B, R[] zipC, R, E extends Exception> (Class<R> targetElementType, A[] a, B[] b, C[] c, A valueForNoneA, B valueForNoneB, C valueForNoneC, Throwables.TriFunction<? super A, ? super B, throws E? super C, ? extends R, E> zipFunction) - Type Parameters:
A
-B
-C
-R
-E
-- Parameters:
targetElementType
-a
-b
-c
-valueForNoneA
-valueForNoneB
-valueForNoneC
-zipFunction
-- Returns:
- Throws:
E
- the e
-
unzip
public static <T,A, Pair<List<A>,B, E extends Exception> List<B>> unzip(Iterable<? extends T> c, Throwables.BiConsumer<? super T, Pair<A, throws EB>, E> unzip) - Type Parameters:
T
-A
-B
-E
-- Parameters:
c
-unzip
- the second parameter is an output parameter.- Returns:
- Throws:
E
- the e
-
unzip
public static <T,A, Pair<LC,B, LC extends Collection<A>, RC extends Collection<B>, E extends Exception> RC> unzip(Iterable<? extends T> c, Throwables.BiConsumer<? super T, Pair<A, throws EB>, E> unzip, IntFunction<? extends Collection<?>> supplier) - Type Parameters:
T
-A
-B
-LC
-RC
-E
-- Parameters:
c
-unzip
- the second parameter is an output parameter.supplier
-- Returns:
- Throws:
E
- the e
-
unzipp
public static <T,A, Triple<List<A>,B, C, E extends Exception> List<B>, unzippList<C>> (Iterable<? extends T> c, Throwables.BiConsumer<? super T, Triple<A, throws EB, C>, E> unzip) - Type Parameters:
T
-A
-B
-C
-E
-- Parameters:
c
-unzip
- the second parameter is an output parameter.- Returns:
- Throws:
E
- the e
-
unzipp
public static <T,A, Triple<LC,B, C, LC extends Collection<A>, MC extends Collection<B>, RC extends Collection<C>, E extends Exception> MC, unzippRC> (Iterable<? extends T> c, Throwables.BiConsumer<? super T, Triple<A, throws EB, C>, E> unzip, IntFunction<? extends Collection<?>> supplier) - Type Parameters:
T
-A
-B
-C
-LC
-MC
-RC
-E
-- Parameters:
c
-unzip
- the second parameter is an output parameter.supplier
-- Returns:
- Throws:
E
- the e
-
groupBy
@Beta public static <K,T, Map<K,E extends Exception> List<T>> groupBy(T[] a, Throwables.Function<? super T, ? extends K, throws EE> keyExtractor) - Type Parameters:
K
-T
-E
-- Parameters:
a
-keyExtractor
-mapSupplier
-- Returns:
- Throws:
E
-
groupBy
@Beta public static <K,T, M groupByM extends Map<K, List<T>>, E extends Exception> (T[] a, Throwables.Function<? super T, ? extends K, throws EE> keyExtractor, Supplier<M> mapSupplier) - Type Parameters:
K
-T
-E
-- Parameters:
a
-keyExtractor
-- Returns:
- Throws:
E
-
groupBy
@Beta public static <K,T, Map<K,E extends Exception> List<T>> groupBy(T[] a, int fromIndex, int toIndex, Throwables.Function<? super T, ? extends K, throws EE> keyExtractor) - Type Parameters:
K
-T
-E
-- Parameters:
a
-fromIndex
-toIndex
-keyExtractor
-- Returns:
- Throws:
E
-
groupBy
@Beta public static <K,T, M groupByM extends Map<K, List<T>>, E extends Exception> (T[] a, int fromIndex, int toIndex, Throwables.Function<? super T, ? extends K, throws EE> keyExtractor, Supplier<M> mapSupplier) - Type Parameters:
K
-T
-E
-- Parameters:
a
-fromIndex
-toIndex
-keyExtractor
-mapSupplier
-- Returns:
- Throws:
E
-
groupBy
@Beta public static <K,T, Map<K,E extends Exception> List<T>> groupBy(Iterable<? extends T> iter, Throwables.Function<? super T, ? extends K, throws EE> keyExtractor) - Type Parameters:
K
-T
-E
-- Parameters:
iter
-keyExtractor
-mapSupplier
-- Returns:
- Throws:
E
-
groupBy
@Beta public static <K,T, M groupByM extends Map<K, List<T>>, E extends Exception> (Iterable<? extends T> iter, Throwables.Function<? super T, ? extends K, throws EE> keyExtractor, Supplier<M> mapSupplier) - Type Parameters:
K
-T
-E
-- Parameters:
iter
-keyExtractor
-- Returns:
- Throws:
E
-
groupBy
@Beta public static <K,T, Map<K,E extends Exception> List<T>> groupBy(Iterator<? extends T> iter, Throwables.Function<? super T, ? extends K, throws EE> keyExtractor) - Type Parameters:
K
-T
-E
-- Parameters:
iter
-keyExtractor
-mapSupplier
-- Returns:
- Throws:
E
-
groupBy
@Beta public static <K,T, M groupByM extends Map<K, List<T>>, E extends Exception> (Iterator<? extends T> iter, Throwables.Function<? super T, ? extends K, throws EE> keyExtractor, Supplier<M> mapSupplier) - Type Parameters:
K
-T
-E
-- Parameters:
iter
-keyExtractor
-- Returns:
- Throws:
E
-
iterate
- Type Parameters:
T
-- Parameters:
a
-- Returns:
- See Also:
-
iterate
- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- See Also:
-
iterate
- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
disjoint
- Parameters:
a
-b
-- Returns:
-
disjoint
Returnstrue
if the two specified arrays have no elements in common.- Parameters:
c1
-c2
-- Returns:
true
if the two specified arrays have no elements in common.- See Also:
-
toJSON
- Parameters:
obj
-- Returns:
-
toJSON
- Parameters:
obj
-prettyFormat
-- Returns:
-
toJSON
- Parameters:
obj
-config
-- Returns:
-
toJSON
- Parameters:
file
-obj
-
-
toJSON
- Parameters:
file
-obj
-config
-
-
toJSON
- Parameters:
os
-obj
-
-
toJSON
- Parameters:
os
-obj
-config
-
-
toJSON
- Parameters:
writer
-obj
-
-
toJSON
- Parameters:
writer
-obj
-config
-
-
fromJSON
- Type Parameters:
T
-- Parameters:
targetClass
-json
-- Returns:
- See Also:
-
fromJSON
public static <T> T fromJSON(Class<? extends T> targetClass, String json, JSONDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetClass
-json
-config
-- Returns:
- See Also:
-
fromJSON
- Type Parameters:
T
-- Parameters:
targetClass
-json
-- Returns:
- See Also:
-
fromJSON
public static <T> T fromJSON(Class<? extends T> targetClass, File json, JSONDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetClass
-json
-config
-- Returns:
- See Also:
-
fromJSON
- Type Parameters:
T
-- Parameters:
targetClass
-json
-- Returns:
- See Also:
-
fromJSON
public static <T> T fromJSON(Class<? extends T> targetClass, InputStream json, JSONDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetClass
-json
-config
-- Returns:
- See Also:
-
fromJSON
- Type Parameters:
T
-- Parameters:
targetClass
-json
-- Returns:
- See Also:
-
fromJSON
public static <T> T fromJSON(Class<? extends T> targetClass, Reader json, JSONDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetClass
-json
-config
-- Returns:
- See Also:
-
fromJSON
public static <T> T fromJSON(Class<? extends T> targetClass, String json, int fromIndex, int toIndex) - Type Parameters:
T
-- Parameters:
targetClass
-json
-fromIndex
-toIndex
-- Returns:
- See Also:
-
fromJSON
public static <T> T fromJSON(Class<? extends T> targetClass, String json, int fromIndex, int toIndex, JSONDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetClass
-json
-fromIndex
-toIndex
-config
-- Returns:
- See Also:
-
fromJSON
- Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.json
-- Returns:
- See Also:
-
fromJSON
public static <T> T fromJSON(com.landawn.abacus.type.Type<? extends T> targetType, String json, JSONDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.json
-config
-- Returns:
- See Also:
-
fromJSON
- Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.json
-- Returns:
- See Also:
-
fromJSON
public static <T> T fromJSON(com.landawn.abacus.type.Type<? extends T> targetType, File json, JSONDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.json
-config
-- Returns:
- See Also:
-
fromJSON
public static <T> T fromJSON(com.landawn.abacus.type.Type<? extends T> targetType, InputStream json) - Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.json
-- Returns:
- See Also:
-
fromJSON
public static <T> T fromJSON(com.landawn.abacus.type.Type<? extends T> targetType, InputStream json, JSONDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.json
-config
-- Returns:
- See Also:
-
fromJSON
- Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.json
-- Returns:
- See Also:
-
fromJSON
public static <T> T fromJSON(com.landawn.abacus.type.Type<? extends T> targetType, Reader json, JSONDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.json
-config
-- Returns:
- See Also:
-
fromJSON
public static <T> T fromJSON(com.landawn.abacus.type.Type<? extends T> targetType, String json, int fromIndex, int toIndex) - Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.json
-fromIndex
-toIndex
-- Returns:
- See Also:
-
fromJSON
public static <T> T fromJSON(com.landawn.abacus.type.Type<? extends T> targetType, String json, int fromIndex, int toIndex, JSONDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.json
-fromIndex
-toIndex
-config
-- Returns:
- See Also:
-
streamJSON
public static <T> ExceptionalStream<T,IOException> streamJSON(Class<? extends T> elementClass, String source) - Type Parameters:
T
-- Parameters:
elementClass
- Only Entity/Map/Collection/Array/DataSet element types are supported at present.source
-- Returns:
-
streamJSON
public static <T> ExceptionalStream<T,IOException> streamJSON(Class<? extends T> elementClass, String source, JSONDeserializationConfig config) - Type Parameters:
T
-- Parameters:
elementClass
- Only Entity/Map/Collection/Array/DataSet element types are supported at present.source
-config
-- Returns:
-
streamJSON
public static <T> ExceptionalStream<T,IOException> streamJSON(Class<? extends T> elementClass, File source) - Type Parameters:
T
-- Parameters:
elementClass
- Only Entity/Map/Collection/Array/DataSet element types are supported at present.source
-- Returns:
-
streamJSON
public static <T> ExceptionalStream<T,IOException> streamJSON(Class<? extends T> elementClass, File source, JSONDeserializationConfig config) - Type Parameters:
T
-- Parameters:
elementClass
- Only Entity/Map/Collection/Array/DataSet element types are supported at present.source
-config
-- Returns:
-
streamJSON
public static <T> ExceptionalStream<T,IOException> streamJSON(Class<? extends T> elementClass, InputStream source, boolean closeInputStreamWhenStreamIsClosed) - Type Parameters:
T
-- Parameters:
elementClass
- Only Entity/Map/Collection/Array/DataSet element types are supported at present.source
-closeInputStreamWhenStreamIsClosed
-- Returns:
-
streamJSON
public static <T> ExceptionalStream<T,IOException> streamJSON(Class<? extends T> elementClass, InputStream source, boolean closeInputStreamWhenStreamIsClosed, JSONDeserializationConfig config) - Type Parameters:
T
-- Parameters:
elementClass
- Only Entity/Map/Collection/Array/DataSet element types are supported at present.source
-closeInputStreamWhenStreamIsClosed
-config
-- Returns:
-
streamJSON
public static <T> ExceptionalStream<T,IOException> streamJSON(Class<? extends T> elementClass, Reader source, boolean closeReaderWhenStreamIsClosed) - Type Parameters:
T
-- Parameters:
elementClass
- Only Entity/Map/Collection/Array/DataSet element types are supported at present.source
-closeReaderWhenStreamIsClosed
-- Returns:
-
streamJSON
public static <T> ExceptionalStream<T,IOException> streamJSON(Class<? extends T> elementClass, Reader source, boolean closeReaderWhenStreamIsClosed, JSONDeserializationConfig config) - Type Parameters:
T
-- Parameters:
elementClass
- Only Entity/Map/Collection/Array/DataSet element types are supported at present.source
-closeReaderWhenStreamIsClosed
-config
-- Returns:
-
formatJSON
- Parameters:
json
-- Returns:
- See Also:
-
formatJSON
- Parameters:
type
-json
-- Returns:
- See Also:
-
formatJSON
- Parameters:
type
-json
-- Returns:
- See Also:
-
toXML
- Parameters:
obj
-- Returns:
-
toXML
- Parameters:
obj
-prettyFormat
-- Returns:
-
toXML
- Parameters:
obj
-config
-- Returns:
-
toXML
- Parameters:
file
-obj
-
-
toXML
- Parameters:
file
-obj
-config
-
-
toXML
- Parameters:
os
-obj
-
-
toXML
- Parameters:
os
-obj
-config
-
-
toXML
- Parameters:
writer
-obj
-
-
toXML
- Parameters:
writer
-obj
-config
-
-
formatXML
- Parameters:
xml
-- Returns:
- See Also:
-
fromXML
- Type Parameters:
T
-- Parameters:
targetClass
-xml
-- Returns:
- See Also:
-
fromXML
public static <T> T fromXML(Class<? extends T> targetClass, String xml, XMLDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetClass
-xml
-config
-- Returns:
- See Also:
-
fromXML
- Type Parameters:
T
-- Parameters:
targetClass
-xml
-- Returns:
- See Also:
-
fromXML
public static <T> T fromXML(Class<? extends T> targetClass, File xml, XMLDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetClass
-xml
-config
-- Returns:
- See Also:
-
fromXML
- Type Parameters:
T
-- Parameters:
targetClass
-xml
-- Returns:
- See Also:
-
fromXML
public static <T> T fromXML(Class<? extends T> targetClass, InputStream xml, XMLDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetClass
-xml
-config
-- Returns:
- See Also:
-
fromXML
- Type Parameters:
T
-- Parameters:
targetClass
-xml
-- Returns:
- See Also:
-
fromXML
public static <T> T fromXML(Class<? extends T> targetClass, Reader xml, XMLDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetClass
-xml
-config
-- Returns:
- See Also:
-
fromXML
- Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.xml
-- Returns:
- See Also:
-
fromXML
public static <T> T fromXML(com.landawn.abacus.type.Type<? extends T> targetType, String xml, XMLDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.xml
-config
-- Returns:
- See Also:
-
fromXML
- Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.xml
-- Returns:
- See Also:
-
fromXML
public static <T> T fromXML(com.landawn.abacus.type.Type<? extends T> targetType, File xml, XMLDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.xml
-config
-- Returns:
- See Also:
-
fromXML
- Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.xml
-- Returns:
- See Also:
-
fromXML
public static <T> T fromXML(com.landawn.abacus.type.Type<? extends T> targetType, InputStream xml, XMLDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.xml
-config
-- Returns:
- See Also:
-
fromXML
- Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.xml
-- Returns:
- See Also:
-
fromXML
public static <T> T fromXML(com.landawn.abacus.type.Type<? extends T> targetType, Reader xml, XMLDeserializationConfig config) - Type Parameters:
T
-- Parameters:
targetType
- can be theType
ofEntity/Array/Collection/Map
.xml
-config
-- Returns:
- See Also:
-
formatXML
- Parameters:
type
-xml
-- Returns:
- See Also:
-
formatXML
- Parameters:
type
-xml
-- Returns:
- See Also:
-
xml2JSON
Xml 2 JSON.- Parameters:
xml
-- Returns:
- See Also:
-
xml2JSON
Xml 2 JSON.- Parameters:
cls
-xml
-- Returns:
- See Also:
-
json2XML
Json 2 XML.- Parameters:
json
-- Returns:
- See Also:
-
json2XML
Json 2 XML.- Parameters:
cls
-json
-- Returns:
- See Also:
-
execute
public static void execute(Throwables.Runnable<? extends Exception> cmd, int retryTimes, long retryInterval, Predicate<? super Exception> retryCondition) - Parameters:
cmd
-retryTimes
-retryInterval
-retryCondition
-
-
execute
public static <R> R execute(Callable<R> cmd, int retryTimes, long retryInterval, BiPredicate<? super R, ? super Exception> retryCondition) - Type Parameters:
R
-- Parameters:
cmd
-retryTimes
-retryInterval
-retryCondition
-- Returns:
-
asyncExecute
public static ContinuableFuture<Void> asyncExecute(Throwables.Runnable<? extends Exception> command) - Parameters:
command
-- Returns:
- See Also:
-
asyncExecute
public static ContinuableFuture<Void> asyncExecute(Throwables.Runnable<? extends Exception> command, long delayInMillis) - Parameters:
command
-delayInMillis
-- Returns:
- See Also:
-
asyncExecute
@SafeVarargs public static List<ContinuableFuture<Void>> asyncExecute(Throwables.Runnable<? extends Exception>... commands) - Parameters:
commands
-- Returns:
- See Also:
-
asyncExecute
public static List<ContinuableFuture<Void>> asyncExecute(List<? extends Throwables.Runnable<? extends Exception>> commands) - Parameters:
commands
-- Returns:
- See Also:
-
asyncExecute
- Type Parameters:
R
-- Parameters:
command
-- Returns:
- See Also:
-
asyncExecute
- Type Parameters:
R
-- Parameters:
command
-delayInMillis
-- Returns:
- See Also:
-
asyncExecute
- Type Parameters:
R
-- Parameters:
commands
-- Returns:
- See Also:
-
asyncExecute
public static <R> List<ContinuableFuture<R>> asyncExecute(Collection<? extends Callable<R>> commands) - Type Parameters:
R
-- Parameters:
commands
-- Returns:
- See Also:
-
asyncExecute
public static ContinuableFuture<Void> asyncExecute(Throwables.Runnable<? extends Exception> cmd, int retryTimes, long retryIntervalInMillis, Predicate<? super Exception> retryCondition) - Parameters:
cmd
-retryTimes
-retryIntervalInMillis
-retryCondition
-- Returns:
- See Also:
-
asyncExecute
public static <R> ContinuableFuture<R> asyncExecute(Callable<R> cmd, int retryTimes, long retryIntervalInMillis, BiPredicate<? super R, ? super Exception> retryCondition) - Type Parameters:
R
-- Parameters:
cmd
-retryTimes
-retryIntervalInMillis
-retryCondition
-- Returns:
- See Also:
-
asyncExecute
public static ContinuableFuture<Void> asyncExecute(Throwables.Runnable<? extends Exception> command, Executor executor) -
asyncExecute
-
runInParallel
public static void runInParallel(Throwables.Runnable<? extends Exception> command, Throwables.Runnable<? extends Exception> command2) Executes and complete the input commands in parallel.- Parameters:
command
- to be completed in current thread.command2
- to be completed in another thread.- See Also:
-
runInParallel
public static void runInParallel(Throwables.Runnable<? extends Exception> command, Throwables.Runnable<? extends Exception> command2, Throwables.Runnable<? extends Exception> command3) Executes and complete the input commands in parallel.- Parameters:
command
- to be completed in current thread.command2
- to be completed in another thread.command3
- to be completed in another thread.- See Also:
-
runInParallel
public static void runInParallel(Throwables.Runnable<? extends Exception> command, Throwables.Runnable<? extends Exception> command2, Throwables.Runnable<? extends Exception> command3, Throwables.Runnable<? extends Exception> command4) Executes and complete the input commands in parallel.- Parameters:
command
- to be completed in current thread.command2
- to be completed in another thread.command3
- to be completed in another thread.command4
- to be completed in another thread.- See Also:
-
runInParallel
public static void runInParallel(Throwables.Runnable<? extends Exception> command, Throwables.Runnable<? extends Exception> command2, Throwables.Runnable<? extends Exception> command3, Throwables.Runnable<? extends Exception> command4, Throwables.Runnable<? extends Exception> command5) Executes and complete the input commands in parallel.- Parameters:
command
- to be completed in current thread.command2
- to be completed in another thread.command3
- to be completed in another thread.command4
- to be completed in another thread.command5
- to be completed in another thread.- See Also:
-
callInParallel
Executes and complete the input commands in parallel.- Parameters:
command
- to be completed in current thread.command2
- to be completed in another thread.- See Also:
-
Fn#jr2c(Runnable)
-
callInParallel
public static <R,R2, Tuple.Tuple3<R,R3> R2, callInParallelR3> (Callable<R> command, Callable<R2> command2, Callable<R3> command3) Executes and complete the input commands in parallel.- Parameters:
command
- to be completed in current thread.command2
- to be completed in another thread.command3
- to be completed in another thread.- See Also:
-
Fn#jr2c(Runnable)
-
callInParallel
public static <R,R2, Tuple.Tuple4<R,R3, R4> R2, callInParallelR3, R4> (Callable<R> command, Callable<R2> command2, Callable<R3> command3, Callable<R4> command4) Executes and complete the input commands in parallel.- Parameters:
command
- to be completed in current thread.command2
- to be completed in another thread.command3
- to be completed in another thread.command4
- to be completed in another thread.- See Also:
-
Fn#jr2c(Runnable)
-
callInParallel
public static <R,R2, Tuple.Tuple5<R,R3, R4, R5> R2, callInParallelR3, R4, R5> (Callable<R> command, Callable<R2> command2, Callable<R3> command3, Callable<R4> command4, Callable<R5> command5) Executes and complete the input commands in parallel.- Parameters:
command
- to be completed in current thread.command2
- to be completed in another thread.command3
- to be completed in another thread.command4
- to be completed in another thread.command5
- to be completed in another thread.- See Also:
-
Fn#jr2c(Runnable)
-
runUninterruptibly
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.- Parameters:
cmd
-
-
runUninterruptibly
public 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.- Parameters:
timeoutInMillis
-cmd
-
-
runUninterruptibly
public static void runUninterruptibly(long timeout, TimeUnit unit, Throwables.BiConsumer<Long, TimeUnit, throws IllegalArgumentExceptionInterruptedException> 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.- Parameters:
timeout
-unit
-cmd
-- Throws:
IllegalArgumentException
- if the specifiedunit/cmd
isnull
.
-
callUninterruptibly
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.- Type Parameters:
T
-- Parameters:
cmd
-- Returns:
-
callUninterruptibly
public 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.- Type Parameters:
T
-- Parameters:
timeoutInMillis
-cmd
-- Returns:
-
callUninterruptibly
public static <T> T callUninterruptibly(long timeout, TimeUnit unit, Throwables.BiFunction<Long, TimeUnit, throws IllegalArgumentExceptionT, 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.- Type Parameters:
T
-- Parameters:
timeout
-unit
-cmd
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedunit/cmd
isnull
.
-
sleep
public static void sleep(long timeoutInMillis) - Parameters:
timeoutInMillis
-
-
sleep
- Parameters:
timeout
-unit
-- Throws:
IllegalArgumentException
- if the specifiedunit
isnull
.
-
sleepUninterruptibly
public 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.- Parameters:
timeoutInMillis
-
-
sleepUninterruptibly
public static void sleepUninterruptibly(long timeout, TimeUnit unit) throws IllegalArgumentException 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.- Parameters:
timeout
-unit
-- Throws:
IllegalArgumentException
- if the specifiedunit
isnull
.
-
toRuntimeException
- Parameters:
e
-- Returns:
- See Also:
-
toRuntimeException
- Parameters:
e
-- Returns:
- See Also:
-
hasCause
- Parameters:
e
-type
-- Returns:
- See Also:
-
firstCause
Returns the specifiedThrowable e
if there is no cause found in it (e.getCause() == null
).- Parameters:
e
-- Returns:
- See Also:
-
println
public static <T> T println(T obj) - Type Parameters:
T
-- Parameters:
obj
-- Returns:
-
fprintln
- Type Parameters:
T
-- Parameters:
format
-args
-- Returns:
-
castIfAssignable
Returns an emptyNullable
ifval
isnull
whiletargetType
is primitive or can not be assigned totargetType
. Please be aware thatnull
can be assigned to anyObject
type except primitive types:boolean/char/byte/short/int/long/double
.- Type Parameters:
T
-- Parameters:
val
-targetType
-- Returns:
-
tryOrEmptyIfNotSucceed
Returns aNullable
with the value returned byaction
or an emptyNullable
if exception happens.- Type Parameters:
R
-- Parameters:
cmd
-- Returns:
- See Also:
-
tryOrEmptyIfNotSucceed
@Beta public static <T,R, u.Nullable<R> tryOrEmptyIfNotSucceedE extends Exception> (T init, Throwables.Function<? super T, ? extends R, E> func) Returns aNullable
with the value returned byfunc.apply(init)
or an emptyNullable
if exception happens.- Type Parameters:
T
-R
-E
-- Parameters:
init
-func
-- Returns:
- See Also:
-
tryOrDefaultIfNotSucceed
Returns the value returned byaction
ordefaultIfNotSucceed
if exception happens.- Type Parameters:
R
-- Parameters:
cmd
-defaultIfNotSucceed
-- Returns:
- See Also:
-
tryOrDefaultIfNotSucceed
@Beta public static <T,R, R tryOrDefaultIfNotSucceedE extends Exception> (T init, Throwables.Function<? super T, ? extends R, E> func, R defaultIfNotSucceed) Returns the value returned byaction
ordefaultIfNotSucceed
if exception happens.- Type Parameters:
T
-R
-E
-- Parameters:
init
-func
-defaultIfNotSucceed
-- Returns:
- See Also:
-
tryOrDefaultIfNotSucceed
@Beta public static <R> R tryOrDefaultIfNotSucceed(Callable<R> cmd, Supplier<R> supplierForDefaultIfNotSucceed) Returns the value returned byaction
or{@code supplierForDefaultIfNotSucceed}
if exception happens.- Type Parameters:
R
-- Parameters:
cmd
-supplierForDefaultIfNotSucceed
-- Returns:
- See Also:
-
tryOrDefaultIfNotSucceed
@Beta public static <T,R, R tryOrDefaultIfNotSucceedE extends Exception> (T init, Throwables.Function<? super T, ? extends R, E> func, Supplier<R> supplierForDefaultIfNotSucceed) Returns the value returned byaction
ordefaultIfNotSucceed
if exception happens.- Type Parameters:
T
-R
-E
-- Parameters:
init
-func
-supplierForDefaultIfNotSucceed
-- Returns:
- See Also:
-
ifOrEmpty
@Beta public static <R,E extends Exception> u.Nullable<R> ifOrEmpty(boolean b, Throwables.Supplier<R, E> supplier) throws EReturns aNullable
with value got from the specifiedsupplier
ifb
istrue
, otherwise returns an emptyNullable
ifb
is false.- Type Parameters:
R
-E
-- Parameters:
b
-supplier
-- Returns:
- Throws:
E
- the e
-
ifOrEmpty
@Beta public static <T,R, u.Nullable<R> ifOrEmptyE extends Exception> (boolean b, T init, Throwables.Function<? super T, ? extends R, throws EE> func) Returns aNullable
with value returned byfunc.apply(init)
ifb
istrue
, otherwise returns an emptyNullable
ifb
is false.- Type Parameters:
T
-R
-E
-- Parameters:
b
-init
-func
-- Returns:
- Throws:
E
- the e
-
ifOrElse
@Beta public static <E1 extends Exception,E2 extends Exception> void ifOrElse(boolean b, Throwables.Runnable<E1> actionForTrue, Throwables.Runnable<E2> actionForFalse) throws E1, E2 If or else.- Type Parameters:
E1
-E2
-- Parameters:
b
-actionForTrue
- do nothing if it'snull
evenb
is true.actionForFalse
- do nothing if it'snull
evenb
is false.- Throws:
E1
- the e1E2
- the e2
-
ifOrElse
@Beta public static <T,E1 extends Exception, void ifOrElseE2 extends Exception> (boolean b, T init, Throwables.Consumer<? super T, E1> actionForTrue, Throwables.Consumer<? super T, throws E1, E2E2> actionForFalse) If or else.- Type Parameters:
T
-E1
-E2
-- Parameters:
b
-init
-actionForTrue
- do nothing if it'snull
evenb
is true.actionForFalse
- do nothing if it'snull
evenb
is false.- Throws:
E1
- the e1E2
- the e2
-
lazyInit
-
lazyInitialize
@Beta public static <T,E extends Exception> Throwables.LazyInitializer<T,E> lazyInitialize(Throwables.Supplier<T, E> supplier) -
isPrimitiveType
Checks if is primitive type.- Parameters:
cls
-- Returns:
- true, if is primitive type
-
isWrapperType
Checks if is wrapper type.- Parameters:
cls
-- Returns:
- true, if is wrapper type
-
isPrimitiveArrayType
Checks if is primitive array type.- Parameters:
cls
-- Returns:
- true, if is primitive array type
-
wrap
Returns the corresponding wrapper type oftype
if it is a primitive type; otherwise returnstype
itself. Idempotent.wrap(int.class) == Integer.class wrap(Integer.class) == Integer.class wrap(String.class) == String.class
- Parameters:
cls
-- Returns:
-
unwrap
Returns the corresponding primitive type oftype
if it is a wrapper type; otherwise returnstype
itself. Idempotent.unwrap(Integer.class) == int.class unwrap(int.class) == int.class unwrap(String.class) == String.class
- Parameters:
cls
-- Returns:
-
invert
Inverts the element fromfromIndex
totoIndex
: set it totrue
if it'sfalse
, or set it tofalse
if it'strue
.- Parameters:
a
-
-
invert
Inverts the element fromfromIndex
totoIndex
: set it totrue
if it'sfalse
, or set it tofalse
if it'strue
.- Parameters:
a
-fromIndex
-toIndex
-
-
applyToEach
@Beta public static <T,E extends Exception> void applyToEach(T[] a, Throwables.Function<? super T, ? extends T, throws EE> converter) Updates each element in the specified arraya
with specified functionconverter
.- Type Parameters:
T
-E
-- Parameters:
a
-converter
-- Throws:
E
-
applyToEach
@Beta public static <T,E extends Exception> void applyToEach(List<T> c, Throwables.Function<? super T, ? extends T, throws EE> converter) - Throws:
E extends Exception
-
copyThenApply
public static <T,E extends Exception> T[] copyThenApply(T[] a, Throwables.Function<? super T, ? extends T, throws EE> converter) Copy the specified arraya
first, then callconverter
on the copy.- Type Parameters:
E
-- Parameters:
a
-converter
-- Returns:
- updated copy of
a
. - Throws:
E
-
typeOf
public static <T> com.landawn.abacus.type.Type<T> typeOf(String typeName) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
typeName
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedtypeName
isnull
.
-
typeOf
public static <T> com.landawn.abacus.type.Type<T> typeOf(Class<?> cls) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
cls
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedClass
isnull
.
-
valueOf
- Type Parameters:
T
-- Parameters:
targetClass
-str
-- Returns:
-
defaultValueOf
Default value of.- Type Parameters:
T
-- Parameters:
cls
-- Returns:
-
defaultIfNull
Default if null.- Parameters:
b
-- Returns:
-
defaultIfNull
Default if null.- Parameters:
b
-defaultForNull
-- Returns:
-
defaultIfNull
Default if null.- Parameters:
c
-- Returns:
-
defaultIfNull
Default if null.- Parameters:
c
-defaultForNull
-- Returns:
-
defaultIfNull
Default if null.- Parameters:
b
-- Returns:
-
defaultIfNull
Default if null.- Parameters:
b
-defaultForNull
-- Returns:
-
defaultIfNull
Default if null.- Parameters:
b
-- Returns:
-
defaultIfNull
Default if null.- Parameters:
b
-defaultForNull
-- Returns:
-
defaultIfNull
Default if null.- Parameters:
b
-- Returns:
-
defaultIfNull
Default if null.- Parameters:
b
-defaultForNull
-- Returns:
-
defaultIfNull
Default if null.- Parameters:
b
-- Returns:
-
defaultIfNull
Default if null.- Parameters:
b
-defaultForNull
-- Returns:
-
defaultIfNull
Default if null.- Parameters:
b
-- Returns:
-
defaultIfNull
Default if null.- Parameters:
b
-defaultForNull
-- Returns:
-
defaultIfNull
Default if null.- Parameters:
b
-- Returns:
-
defaultIfNull
Default if null.- Parameters:
b
-defaultForNull
-- Returns:
-
defaultIfNull
public static <T> T defaultIfNull(T obj, T defaultForNull) Default if null.- Type Parameters:
T
-- Parameters:
obj
-defaultForNull
-- Returns:
-
defaultIfNull
Default if null.- Type Parameters:
T
-- Parameters:
obj
-defaultForNull
-- Returns:
-
defaultIfNullOrEmpty
-
defaultIfNullOrEmptyOrBlank
-
stringOf
- Parameters:
val
-- Returns:
-
stringOf
- Parameters:
val
-- Returns:
-
stringOf
- Parameters:
val
-- Returns:
-
stringOf
- Parameters:
val
-- Returns:
-
stringOf
- Parameters:
val
-- Returns:
-
stringOf
- Parameters:
val
-- Returns:
-
stringOf
- Parameters:
val
-- Returns:
-
stringOf
- Parameters:
val
-- Returns:
-
stringOf
- Parameters:
obj
-- Returns:
null
if the specified object is null.
-
enumListOf
Enum list of.- Type Parameters:
E
-- Parameters:
enumClass
-- Returns:
-
enumSetOf
Enum set of.- Type Parameters:
E
-- Parameters:
enumClass
-- Returns:
-
enumMapOf
Enum map of.- Type Parameters:
E
-- Parameters:
enumClass
-- Returns:
-
newInstance
- Type Parameters:
T
-- Parameters:
cls
-- Returns:
- T
- See Also:
-
Fn.Suppliers.ofCollection(Class)
Suppliers#registerForCollection(Class, com.landawn.abacus.util.function.Supplier)
Fn.Suppliers.ofMap(Class)
Suppliers#registerForMap(Class, com.landawn.abacus.util.function.Supplier)
Fn.Factory.ofCollection(Class)
IntFunctions#registerForCollection(Class, com.landawn.abacus.util.function.IntFunction)
Fn.Factory.ofMap(Class)
IntFunctions#registerForMap(Class, com.landawn.abacus.util.function.IntFunction)
-
newProxyInstance
New proxy instance.- Type Parameters:
T
-- Parameters:
interfaceClass
-h
-- Returns:
-
newProxyInstance
Refer tojava.lang.reflect
- Type Parameters:
T
-- Parameters:
interfaceClasses
-h
-- Returns:
-
newCollection
- Type Parameters:
T
-- Parameters:
targetClass
-- Returns:
- See Also:
-
Fn.Suppliers.ofCollection(Class)
Suppliers#registerForCollection(Class, com.landawn.abacus.util.function.Supplier)
-
newCollection
- Type Parameters:
T
-- Parameters:
targetClass
-size
-- Returns:
- See Also:
-
Fn.Factory.ofCollection(Class)
IntFunctions#registerForCollection(Class, com.landawn.abacus.util.function.IntFunction)
-
newMap
- Type Parameters:
K
-V
-- Parameters:
targetClass
-- Returns:
- See Also:
-
Fn.Suppliers.ofMap(Class)
Suppliers#registerForMap(Class, com.landawn.abacus.util.function.Supplier)
-
newMap
- Type Parameters:
K
-V
-- Parameters:
targetClass
-size
-- Returns:
- See Also:
-
Fn.Factory.ofMap(Class)
IntFunctions#registerForMap(Class, com.landawn.abacus.util.function.IntFunction)
-
newArray
- Type Parameters:
T
-- Parameters:
componentType
-length
-- Returns:
- T[]
-
newEntity
- Type Parameters:
T
-- Parameters:
cls
-- Returns:
-
newEntity
- Type Parameters:
T
-- Parameters:
cls
-entityName
-- Returns:
-
newSetFromMap
Returns a set backed by the specified map.- Type Parameters:
E
-- Parameters:
map
- the backing map- Returns:
- See Also:
-
newArrayList
New array list.- Type Parameters:
T
-- Returns:
-
newArrayList
New array list.- Type Parameters:
T
-- Parameters:
initialCapacity
-- Returns:
-
newArrayList
New array list.- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
newLinkedList
New linked list.- Type Parameters:
T
-- Returns:
-
newLinkedList
New linked list.- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
newHashSet
New hash set.- Type Parameters:
T
-- Returns:
-
newHashSet
New hash set.- Type Parameters:
T
-- Parameters:
initialCapacity
-- Returns:
-
newHashSet
New hash set.- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
newLinkedHashSet
New linked hash set.- Type Parameters:
T
-- Returns:
-
newLinkedHashSet
New linked hash set.- Type Parameters:
T
-- Parameters:
initialCapacity
-- Returns:
-
newLinkedHashSet
New linked hash set.- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
newTreeSet
New tree set.- Type Parameters:
T
-- Returns:
-
newTreeSet
New tree set.- Type Parameters:
T
-- Parameters:
comparator
-- Returns:
-
newTreeSet
New tree set.- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
newTreeSet
New tree set.- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
newMultiset
- Type Parameters:
T
-- Returns:
-
newMultiset
- Type Parameters:
T
-- Parameters:
initialCapacity
-- Returns:
-
newMultiset
- Type Parameters:
T
-- Parameters:
valueMapType
-- Returns:
-
newMultiset
- Type Parameters:
T
-- Parameters:
mapSupplier
-- Returns:
-
newMultiset
- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
newLongMultiset
- Type Parameters:
T
-- Returns:
-
newLongMultiset
- Type Parameters:
T
-- Parameters:
initialCapacity
-- Returns:
-
newArrayDeque
New array deque.- Type Parameters:
T
-- Returns:
-
newArrayDeque
Constructs an empty array deque with an initial capacity sufficient to hold the specified number of elements.- Type Parameters:
T
-- Parameters:
numElements
- lower bound on initial capacity of the deque.- Returns:
-
newArrayDeque
Constructs a deque containing the elements of the specified collection, in the order they are returned by the collection's iterator.- Type Parameters:
E
-- Parameters:
c
-- Returns:
-
newEntry
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
key
-value
-- Returns:
-
newImmutableEntry
New immutable entry.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
key
-value
-- Returns:
-
newHashMap
New hash map.- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
newHashMap
New hash map.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
initialCapacity
-- Returns:
-
newHashMap
New hash map.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
m
-- Returns:
-
newHashMap
public static <K,V, Map<K,E extends Exception> V> newHashMap(Collection<? extends V> c, Throwables.Function<? super V, ? extends K, throws EE> keyMapper) New hash map.- Type Parameters:
K
- the key typeV
- the value typeE
-- Parameters:
c
-keyMapper
-- Returns:
- Throws:
E
- the e
-
newLinkedHashMap
New linked hash map.- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
newLinkedHashMap
New linked hash map.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
initialCapacity
-- Returns:
-
newLinkedHashMap
New linked hash map.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
m
-- Returns:
-
newLinkedHashMap
public static <K,V, Map<K,E extends Exception> V> newLinkedHashMap(Collection<? extends V> c, Throwables.Function<? super V, ? extends K, throws EE> keyMapper) New linked hash map.- Type Parameters:
K
- the key typeV
- the value typeE
-- Parameters:
c
-keyMapper
-- Returns:
- Throws:
E
- the e
-
newTreeMap
New tree map.- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
newTreeMap
New tree map.- Type Parameters:
C
-K
- the key typeV
- the value type- Parameters:
comparator
-- Returns:
-
newTreeMap
public static <K extends Comparable<? super K>,V> TreeMap<K,V> newTreeMap(Map<? extends K, ? extends V> m) New tree map.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
m
-- Returns:
-
newTreeMap
New tree map.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
m
-- Returns:
-
newIdentityHashMap
New identity hash map.- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
newIdentityHashMap
New identity hash map.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
initialCapacity
-- Returns:
-
newIdentityHashMap
New identity hash map.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
m
-- Returns:
-
newConcurrentHashMap
New concurrent hash map.- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
newConcurrentHashMap
New concurrent hash map.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
initialCapacity
-- Returns:
-
newConcurrentHashMap
New concurrent hash map.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
m
-- Returns:
-
newBiMap
New bi map.- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
newBiMap
New bi map.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
initialCapacity
-- Returns:
-
newBiMap
New bi map.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
initialCapacity
-loadFactor
-- Returns:
-
newBiMap
public static <K,V> BiMap<K,V> newBiMap(Class<? extends Map> keyMapType, Class<? extends Map> valueMapType) New bi map.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
keyMapType
-valueMapType
-- Returns:
-
newBiMap
public static <K,V> BiMap<K,V> newBiMap(Supplier<? extends Map<K, V>> keyMapSupplier, Supplier<? extends Map<V, K>> valueMapSupplier) New bi map.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
keyMapSupplier
-valueMapSupplier
-- Returns:
-
newMultimap
public static <K,E, Multimap<K,V extends Collection<E>> E, newMultimapV> (Supplier<? extends Map<K, V>> mapSupplier, Supplier<? extends V> valueSupplier) - Type Parameters:
K
- the key typeE
-V
- the value type- Parameters:
mapSupplier
-valueSupplier
-- Returns:
-
newListMultimap
New list multimap.- Type Parameters:
K
- the key typeE
-- Returns:
-
newListMultimap
New list multimap.- Type Parameters:
K
- the key typeE
-- Parameters:
initialCapacity
-- Returns:
-
newListMultimap
New list multimap.- Type Parameters:
K
- the key typeE
-- Parameters:
m
-- Returns:
-
newListMultimap
New list multimap.- Type Parameters:
K
- the key typeE
-- Parameters:
mapType
-- Returns:
-
newListMultimap
public static <K,E> ListMultimap<K,E> newListMultimap(Class<? extends Map> mapType, Class<? extends List> valueType) New list multimap.- Type Parameters:
K
- the key typeE
-- Parameters:
mapType
-valueType
-- Returns:
-
newListMultimap
public static <K,E> ListMultimap<K,E> newListMultimap(Supplier<? extends Map<K, List<E>>> mapSupplier, Supplier<? extends List<E>> valueSupplier) New list multimap.- Type Parameters:
K
- the key typeE
-- Parameters:
mapSupplier
-valueSupplier
-- Returns:
-
newLinkedListMultimap
Return aListMultimap
backed byLinkedHashMap
.'Linked'
is about the map, not the value.- Type Parameters:
K
- the key typeE
-- Returns:
-
newLinkedListMultimap
Return aListMultimap
backed byLinkedHashMap
.'Linked'
is about the map, not the value.- Type Parameters:
K
- the key typeE
-- Parameters:
initialCapacity
-- Returns:
-
newLinkedListMultimap
Return aListMultimap
backed byLinkedHashMap
.'Linked'
is about the map, not the value.- Type Parameters:
K
- the key typeE
-- Parameters:
m
-- Returns:
-
newSortedListMultimap
Return aListMultimap
backed bySortedMap
.'Sorted'
is about the map, not the value.- Type Parameters:
K
- the key typeE
-- Returns:
-
newSortedListMultimap
public static <K extends Comparable<? super K>,E> ListMultimap<K,E> newSortedListMultimap(Map<? extends K, ? extends E> m) Return aListMultimap
backed bySortedMap
.'Sorted'
is about the map, not the value.- Type Parameters:
K
- the key typeE
-- Parameters:
m
-- Returns:
-
newSetMultimap
New set multimap.- Type Parameters:
K
- the key typeE
-- Returns:
-
newSetMultimap
New set multimap.- Type Parameters:
K
- the key typeE
-- Parameters:
initialCapacity
-- Returns:
-
newSetMultimap
New set multimap.- Type Parameters:
K
- the key typeE
-- Parameters:
m
-- Returns:
-
newSetMultimap
New set multimap.- Type Parameters:
K
- the key typeE
-- Parameters:
mapType
-- Returns:
-
newSetMultimap
public static <K,E> SetMultimap<K,E> newSetMultimap(Class<? extends Map> mapType, Class<? extends Set> valueType) New set multimap.- Type Parameters:
K
- the key typeE
-- Parameters:
mapType
-valueType
-- Returns:
-
newSetMultimap
public static <K,E> SetMultimap<K,E> newSetMultimap(Supplier<? extends Map<K, Set<E>>> mapSupplier, Supplier<? extends Set<E>> valueSupplier) New set multimap.- Type Parameters:
K
- the key typeE
-- Parameters:
mapSupplier
-valueSupplier
-- Returns:
-
newLinkedSetMultimap
Return aSetMultimap
backed byLinkedHashMap
.'Linked'
is about the map, not the value.- Type Parameters:
K
- the key typeE
-- Returns:
-
newLinkedSetMultimap
Return aSetMultimap
backed byLinkedHashMap
.'Linked'
is about the map, not the value.- Type Parameters:
K
- the key typeE
-- Parameters:
initialCapacity
-- Returns:
-
newLinkedSetMultimap
Return aSetMultimap
backed byLinkedHashMap
.'Linked'
is about the map, not the value.- Type Parameters:
K
- the key typeE
-- Parameters:
m
-- Returns:
-
newSortedSetMultimap
Return aSetMultimap
backed bySortedMap
.'Sorted'
is about the map, not the value.- Type Parameters:
K
- the key typeE
-- Returns:
-
newSortedSetMultimap
public static <K extends Comparable<? super K>,E> SetMultimap<K,E> newSortedSetMultimap(Map<? extends K, ? extends E> m) Return aSetMultimap
backed bySortedMap
.'Sorted'
is about the map, not the value.- Type Parameters:
K
- the key typeE
-- Parameters:
m
-- Returns:
-
newEmptyDataSet
New empty data set.- Returns:
-
newEmptyDataSet
New empty data set.- Parameters:
columnNames
-- Returns:
-
newDataSet
Convert the specified Map to a two columnsDataSet
: one column is for keys and one column is for values.- Parameters:
keyColumnName
-valueColumnName
-m
-- Returns:
-
newDataSet
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.- Type Parameters:
T
-- Parameters:
rows
- list of row which can be: Map/Entity/Array/List- Returns:
-
newDataSet
If the specifiedcolumnNames
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.- Type Parameters:
T
-- Parameters:
columnNames
-rows
- list of row which can be: Map/Entity/Array/List- Returns:
-
newDataSet
-
newDataSet
New data set.- Type Parameters:
C
-- Parameters:
map
- keys are column names, values are columns- Returns:
-
merge
-
merge
-
merge
-
toArray
Returns an empty array if the specified collection is null or empty.- Parameters:
c
-- Returns:
-
toArray
- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
toArray
- Type Parameters:
A
-T
-- Parameters:
c
-a
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray
isnull
.
-
toArray
public static <A,T extends A> A[] toArray(Collection<T> c, int fromIndex, int toIndex, A[] a) throws IllegalArgumentException - Type Parameters:
A
-T
-- Parameters:
c
-fromIndex
-toIndex
-a
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedArray
isnull
.
-
toArray
- Type Parameters:
A
-T
-- Parameters:
c
-arraySupplier
-- Returns:
-
toArray
public static <A,T extends A> A[] toArray(Collection<T> c, int fromIndex, int toIndex, IntFunction<A[]> arraySupplier) - Type Parameters:
A
-T
-- Parameters:
c
-fromIndex
-toIndex
-arraySupplier
-- Returns:
-
toArray
public static <A,T extends A> A[] toArray(Class<A[]> targetClass, Collection<T> c) throws IllegalArgumentException - Type Parameters:
A
-T
-- Parameters:
targetClass
-c
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedClass
isnull
.
-
toArray
public static <A,T extends A> A[] toArray(Class<A[]> targetClass, Collection<T> c, int fromIndex, int toIndex) throws IllegalArgumentException - Type Parameters:
A
-T
-- Parameters:
targetClass
-c
-fromIndex
-toIndex
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedClass
isnull
.
-
toBooleanArray
To boolean array.- Parameters:
c
-- Returns:
-
toBooleanArray
To boolean array.- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
toBooleanArray
To boolean array.- Parameters:
c
-defaultForNull
-- Returns:
-
toBooleanArray
public static boolean[] toBooleanArray(Collection<Boolean> c, int fromIndex, int toIndex, boolean defaultForNull) To boolean array.- Parameters:
c
-fromIndex
-toIndex
-defaultForNull
-- Returns:
-
toBooleanArray
public static boolean[] toBooleanArray(byte[] a) -
toCharArray
To char array.- Parameters:
c
-- Returns:
-
toCharArray
To char array.- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
toCharArray
To char array.- Parameters:
c
-defaultForNull
-- Returns:
-
toCharArray
public static char[] toCharArray(Collection<Character> c, int fromIndex, int toIndex, char defaultForNull) To char array.- Parameters:
c
-fromIndex
-toIndex
-defaultForNull
-- Returns:
-
toByteArray
To byte array.- Parameters:
c
-- Returns:
-
toByteArray
To byte array.- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
toByteArray
To byte array.- Parameters:
c
-defaultForNull
-- Returns:
-
toByteArray
public static byte[] toByteArray(Collection<? extends Number> c, int fromIndex, int toIndex, byte defaultForNull) To byte array.- Parameters:
c
-fromIndex
-toIndex
-defaultForNull
-- Returns:
-
toByteArray
public static byte[] toByteArray(boolean[] a) -
toShortArray
To short array.- Parameters:
c
-- Returns:
-
toShortArray
To short array.- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
toShortArray
To short array.- Parameters:
c
-defaultForNull
-- Returns:
-
toShortArray
public static short[] toShortArray(Collection<? extends Number> c, int fromIndex, int toIndex, short defaultForNull) To short array.- Parameters:
c
-fromIndex
-toIndex
-defaultForNull
-- Returns:
-
toIntArray
To int array.- Parameters:
c
-- Returns:
-
toIntArray
To int array.- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
toIntArray
To int array.- Parameters:
c
-defaultForNull
-- Returns:
-
toIntArray
public static int[] toIntArray(Collection<? extends Number> c, int fromIndex, int toIndex, int defaultForNull) To int array.- Parameters:
c
-fromIndex
-toIndex
-defaultForNull
-- Returns:
-
toIntArray
public static int[] toIntArray(char[] a) -
toLongArray
To long array.- Parameters:
c
-- Returns:
-
toLongArray
To long array.- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
toLongArray
To long array.- Parameters:
c
-defaultForNull
-- Returns:
-
toLongArray
public static long[] toLongArray(Collection<? extends Number> c, int fromIndex, int toIndex, long defaultForNull) To long array.- Parameters:
c
-fromIndex
-toIndex
-defaultForNull
-- Returns:
-
toFloatArray
To float array.- Parameters:
c
-- Returns:
-
toFloatArray
To float array.- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
toFloatArray
To float array.- Parameters:
c
-defaultForNull
-- Returns:
-
toFloatArray
public static float[] toFloatArray(Collection<? extends Number> c, int fromIndex, int toIndex, float defaultForNull) To float array.- Parameters:
c
-fromIndex
-toIndex
-defaultForNull
-- Returns:
-
toDoubleArray
To double array.- Parameters:
c
-- Returns:
-
toDoubleArray
To double array.- Parameters:
c
-fromIndex
-toIndex
-- Returns:
-
toDoubleArray
To double array.- Parameters:
c
-defaultForNull
-- Returns:
-
toDoubleArray
public static double[] toDoubleArray(Collection<? extends Number> c, int fromIndex, int toIndex, double defaultForNull) To double array.- Parameters:
c
-fromIndex
-toIndex
-defaultForNull
-- Returns:
-
toList
- Parameters:
a
-- Returns:
-
toList
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toList
- Parameters:
a
-- Returns:
-
toList
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toList
- Parameters:
a
-- Returns:
-
toList
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toList
- Parameters:
a
-- Returns:
-
toList
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toList
- Parameters:
a
-- Returns:
-
toList
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toList
- Parameters:
a
-- Returns:
-
toList
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toList
- Parameters:
a
-- Returns:
-
toList
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toList
- Parameters:
a
-- Returns:
-
toList
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toList
- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
toList
- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toList
-
toSet
- Parameters:
a
-- Returns:
-
toSet
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toSet
- Parameters:
a
-- Returns:
-
toSet
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toSet
- Parameters:
a
-- Returns:
-
toSet
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toSet
- Parameters:
a
-- Returns:
-
toSet
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toSet
- Parameters:
a
-- Returns:
-
toSet
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toSet
- Parameters:
a
-- Returns:
-
toSet
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toSet
- Parameters:
a
-- Returns:
-
toSet
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toSet
- Parameters:
a
-- Returns:
-
toSet
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toSet
- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
toSet
- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toSet
-
toCollection
public static <C extends Collection<Boolean>> C toCollection(boolean[] a, IntFunction<? extends C> supplier) - Type Parameters:
C
-- Parameters:
a
-supplier
-- Returns:
-
toCollection
public static <C extends Collection<Boolean>> C toCollection(boolean[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) - Type Parameters:
C
-- Parameters:
a
-fromIndex
-toIndex
-supplier
-- Returns:
-
toCollection
public static <C extends Collection<Character>> C toCollection(char[] a, IntFunction<? extends C> supplier) - Type Parameters:
C
-- Parameters:
a
-supplier
-- Returns:
-
toCollection
public static <C extends Collection<Character>> C toCollection(char[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) - Type Parameters:
C
-- Parameters:
a
-fromIndex
-toIndex
-supplier
-- Returns:
-
toCollection
public static <C extends Collection<Byte>> C toCollection(byte[] a, IntFunction<? extends C> supplier) - Type Parameters:
C
-- Parameters:
a
-supplier
-- Returns:
-
toCollection
public static <C extends Collection<Byte>> C toCollection(byte[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) - Type Parameters:
C
-- Parameters:
a
-fromIndex
-toIndex
-supplier
-- Returns:
-
toCollection
public static <C extends Collection<Short>> C toCollection(short[] a, IntFunction<? extends C> supplier) - Type Parameters:
C
-- Parameters:
a
-supplier
-- Returns:
-
toCollection
public static <C extends Collection<Short>> C toCollection(short[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) - Type Parameters:
C
-- Parameters:
a
-fromIndex
-toIndex
-supplier
-- Returns:
-
toCollection
public static <C extends Collection<Integer>> C toCollection(int[] a, IntFunction<? extends C> supplier) - Type Parameters:
C
-- Parameters:
a
-supplier
-- Returns:
-
toCollection
public static <C extends Collection<Integer>> C toCollection(int[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) - Type Parameters:
C
-- Parameters:
a
-fromIndex
-toIndex
-supplier
-- Returns:
-
toCollection
public static <C extends Collection<Long>> C toCollection(long[] a, IntFunction<? extends C> supplier) - Type Parameters:
C
-- Parameters:
a
-supplier
-- Returns:
-
toCollection
public static <C extends Collection<Long>> C toCollection(long[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) - Type Parameters:
C
-- Parameters:
a
-fromIndex
-toIndex
-supplier
-- Returns:
-
toCollection
public static <C extends Collection<Float>> C toCollection(float[] a, IntFunction<? extends C> supplier) - Type Parameters:
C
-- Parameters:
a
-supplier
-- Returns:
-
toCollection
public static <C extends Collection<Float>> C toCollection(float[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) - Type Parameters:
C
-- Parameters:
a
-fromIndex
-toIndex
-supplier
-- Returns:
-
toCollection
public static <C extends Collection<Double>> C toCollection(double[] a, IntFunction<? extends C> supplier) - Type Parameters:
C
-- Parameters:
a
-supplier
-- Returns:
-
toCollection
public static <C extends Collection<Double>> C toCollection(double[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) - Type Parameters:
C
-- Parameters:
a
-fromIndex
-toIndex
-supplier
-- Returns:
-
toCollection
- Type Parameters:
T
-C
-- Parameters:
a
-supplier
-- Returns:
-
toCollection
public static <T,C extends Collection<T>> C toCollection(T[] a, int fromIndex, int toIndex, IntFunction<? extends C> supplier) - Type Parameters:
T
-C
-- Parameters:
a
-fromIndex
-toIndex
-supplier
-- Returns:
-
toCollection
public static <T,C extends Collection<T>> C toCollection(Iterator<? extends T> iter, Supplier<? extends C> supplier) -
asArray
The input array is returned.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
asMap
- Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-- Returns:
-
asMap
- Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-- Returns:
-
asMap
- Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-- Returns:
-
asMap
- Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-- Returns:
-
asMap
- Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-k5
-v5
-- Returns:
-
asMap
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) - Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-k5
-v5
-k6
-v6
-- Returns:
-
asMap
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) - Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-k5
-v5
-k6
-v6
-k7
-v7
-- Returns:
-
asMap
Deprecated.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
a
-- Returns:
-
asLinkedHashMap
As linked hash map.- Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-- Returns:
-
asLinkedHashMap
As linked hash map.- Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-- Returns:
-
asLinkedHashMap
As linked hash map.- Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-- Returns:
-
asLinkedHashMap
As linked hash map.- Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-- Returns:
-
asLinkedHashMap
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) As linked hash map.- Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-k5
-v5
-- Returns:
-
asLinkedHashMap
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) As linked hash map.- Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-k5
-v5
-k6
-v6
-- Returns:
-
asLinkedHashMap
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) As linked hash map.- Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-k5
-v5
-k6
-v6
-k7
-v7
-- Returns:
-
asLinkedHashMap
Deprecated.As linked hash map.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
a
-- Returns:
-
asProps
-
asProps
-
asProps
-
asProps
-
asProps
-
asProps
Deprecated.- Parameters:
a
- pairs of property name and value or a Java Entity Object what allows access to properties using getter and setter methods.- Returns:
-
asList
- Type Parameters:
T
-- Parameters:
e
-- Returns:
-
asList
- Type Parameters:
T
-- Parameters:
e1
-e2
-- Returns:
-
asList
- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-- Returns:
-
asList
- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-- Returns:
-
asList
- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-- Returns:
-
asList
- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-- Returns:
-
asList
- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-e7
-- Returns:
-
asList
- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-e7
-e8
-- Returns:
-
asList
- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-e7
-e8
-e9
-- Returns:
-
asList
- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
asLinkedList
As linked list.- Type Parameters:
T
-- Parameters:
e
-- Returns:
-
asLinkedList
As linked list.- Type Parameters:
T
-- Parameters:
e1
-e2
-- Returns:
-
asLinkedList
As linked list.- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-- Returns:
-
asLinkedList
As linked list.- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-- Returns:
-
asLinkedList
As linked list.- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-- Returns:
-
asLinkedList
As linked list.- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-- Returns:
-
asLinkedList
As linked list.- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-e7
-- Returns:
-
asLinkedList
As linked list.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
asSet
- Type Parameters:
T
-- Parameters:
e
-- Returns:
-
asSet
- Type Parameters:
T
-- Parameters:
e1
-e2
-- Returns:
-
asSet
- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-- Returns:
-
asSet
- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-- Returns:
-
asSet
- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-- Returns:
-
asSet
- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-- Returns:
-
asSet
- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-e7
-- Returns:
-
asSet
- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-e7
-e8
-- Returns:
-
asSet
- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-e7
-e8
-e9
-- Returns:
-
asSet
- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
asLinkedHashSet
As linked linked hash set.- Type Parameters:
T
-- Parameters:
e
-- Returns:
-
asLinkedHashSet
As linked linked hash set.- Type Parameters:
T
-- Parameters:
e1
-e2
-- Returns:
-
asLinkedHashSet
As linked linked hash set.- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-- Returns:
-
asLinkedHashSet
As linked linked hash set.- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-- Returns:
-
asLinkedHashSet
As linked linked hash set.- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-- Returns:
-
asLinkedHashSet
As linked linked hash set.- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-- Returns:
-
asLinkedHashSet
As linked linked hash set.- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-e7
-- Returns:
-
asLinkedHashSet
As linked hash set.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
asSortedSet
As sorted set.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
asQueue
- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
asArrayBlockingQueue
As array blocking queue.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
asLinkedBlockingQueue
As linked blocking queue.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
asConcurrentLinkedQueue
As concurrent linked queue.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
asDelayQueue
As delay queue.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
asPriorityQueue
As priority queue.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
asDeque
- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
asArrayDeque
As array deque.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
asLinkedBlockingDeque
As linked blocking deque.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
asConcurrentLinkedDeque
As concurrent linked deque.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
asMultiset
- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
asSingletonList
Wrap the specified value with a singleton list.- Type Parameters:
T
-- Parameters:
o
-- Returns:
- an immutable list
- See Also:
-
asSingletonSet
Wrap the specified value with a singleton set.- Type Parameters:
T
-- Parameters:
o
-- Returns:
- an immutable set
- See Also:
-
asSingletonMap
Wrap the specified key/value with a singleton map.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
key
-value
-- Returns:
- an immutable Map
- See Also:
-
registerConverter
public static BiFunction<Object,Class<?>, registerConverterObject> (Class<?> srcClass, BiFunction<?, Class<?>, ?> converter) - Parameters:
srcClass
-converter
-- Returns:
- the previous
converter
associated withsrcClass
, ornull
if there was no mapping forsrcClass
.
-
convert
Try to convert the specifiedobj
to the specifiedtargetClass
. Default value oftargetClass
is returned ifsourceObject
is null. An instance oftargetClass
is returned if convert successfully- Type Parameters:
T
-- Parameters:
obj
-targetClass
-- Returns:
-
convert
- Type Parameters:
T
-- Parameters:
obj
-targetType
-- Returns:
-
parseBoolean
Returns aBoolean
with a value represented by the specified string. TheBoolean
returned represents a true value if the string argument is notnull
and is equal, ignoring case, to the string"true"
.- Parameters:
str
- a string.- Returns:
-
parseChar
Parses the char.- Parameters:
str
-- Returns:
-
parseByte
Deprecated.replaced byNumbers.toByte(String)
Returns the value by callingByte.valueOf(String)
ifstr
is notnull
, otherwise, the default value 0 forbyte
is returned.- Parameters:
str
-- Returns:
- Throws:
NumberFormatException
- If the string is not a parsablebyte
.- See Also:
-
parseShort
Deprecated.replaced byNumbers.toShort(String)
Returns the value by callingShort.valueOf(String)
ifstr
is notnull
, otherwise, the default value 0 forshort
is returned.- Parameters:
str
-- Returns:
- Throws:
NumberFormatException
- If the string is not a parsableshort
.- See Also:
-
parseInt
Deprecated.replaced byNumbers.toInt(String)
Returns the value by callingInteger.valueOf(String)
ifstr
is notnull
, otherwise, the default value 0 forint
is returned.- Parameters:
str
-- Returns:
- Throws:
NumberFormatException
- If the string is not a parsableint
.- See Also:
-
parseLong
Deprecated.replaced byNumbers.toLong(String)
Returns the value by callingLong.valueOf(String)
ifstr
is notnull
, otherwise, the default value 0 forlong
is returned.- Parameters:
str
-- Returns:
- Throws:
NumberFormatException
- If the string is not a parsablelong
.- See Also:
-
parseFloat
Deprecated.replaced byNumbers.toFloat(String)
Returns the value by callingFloat.valueOf(String)
ifstr
is notnull
, otherwise, the default value 0f forfloat
is returned.- Parameters:
str
-- Returns:
- Throws:
NumberFormatException
- If the string is not a parsablefloat
.- See Also:
-
parseDouble
Deprecated.replaced byNumbers.toDouble(String)
Returns the value by callingDouble.valueOf(String)
ifstr
is notnull
, otherwise, the default value 0d fordouble
is returned.- Parameters:
str
-- Returns:
- Throws:
NumberFormatException
- If the string is not a parsabledouble
.- See Also:
-
base64Encode
Base 64 encode.- Parameters:
binaryData
-- Returns:
-
base64EncodeString
-
base64EncodeUtf8String
-
base64EncodeChunked
Base 64 encode chunked.- Parameters:
binaryData
-- Returns:
-
base64Decode
Base 64 decode.- Parameters:
base64String
-- Returns:
-
base64DecodeToString
Base 64 decode to string.- Parameters:
base64String
-- Returns:
-
base64DecodeToUtf8String
-
base64UrlEncode
Base 64 url encode.- Parameters:
binaryData
-- Returns:
-
base64UrlDecode
Base 64 url decode.- Parameters:
base64String
-- Returns:
-
base64UrlDecodeToString
Base 64 url decode to string.- Parameters:
base64String
-- Returns:
-
base64UrlDecodeToUtf8String
-
urlEncode
- Parameters:
parameters
-- Returns:
-
urlEncode
- Parameters:
parameters
-charset
-- Returns:
-
urlDecode
- Parameters:
urlQuery
-- Returns:
-
urlDecode
- Parameters:
urlQuery
-charset
-- Returns:
-
urlDecode
- Type Parameters:
T
-- Parameters:
targetClass
-urlQuery
-- Returns:
-
urlDecode
- Type Parameters:
T
-- Parameters:
targetClass
-urlQuery
-charset
-- Returns:
-
guid
Returns the UUID without '-'.- Returns:
-
uuid
Returns an UUID.- Returns:
-
isEntity
Deprecated.replaced byClassUtil.isEntity(Class)
Checks if is entity.- Parameters:
cls
-- Returns:
- true, if is entity
- See Also:
-
clone
public static <T> T clone(T obj) - Type Parameters:
T
-- Parameters:
obj
- a Java object which must be serializable and deserializable throughKryo
orJSON
.- Returns:
null
ifentity
isnull
-
clone
public static <T> T clone(Object obj, Class<? extends T> targetClass) throws IllegalArgumentException Deeply copy by: obj -> serialize -> kryo/Json -> deserialize -> new object.- Type Parameters:
T
-- Parameters:
obj
- a Java object which must be serializable and deserialiable throughKryo
orJSON
.targetClass
-- Returns:
- a new instance of
targetClass
even ifentity
isnull
. - Throws:
IllegalArgumentException
- iftargetClass
isnull
.
-
copy
public 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 specifiedentity
.- Type Parameters:
T
-- Parameters:
entity
- a Java Object what allows access to properties using getter and setter methods.- Returns:
null
ifentity
isnull
-
copy
- Type Parameters:
T
-- Parameters:
entity
-selectPropNames
-- Returns:
null
ifentity
isnull
-
copy
public static <T> T copy(Object entity, Class<? extends T> targetClass) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
entity
-targetClass
-- Returns:
- a new instance of
targetClass
even ifentity
isnull
. - Throws:
IllegalArgumentException
- iftargetClass
isnull
.
-
copy
public static <T> T copy(Object entity, Collection<String> selectPropNames, Class<? extends T> targetClass) throws IllegalArgumentException Returns a new created instance of the specifiedcls
and set with same properties retrieved by 'getXXX' method in the specifiedentity
.- Type Parameters:
T
-- Parameters:
entity
- a Java Object what allows access to properties using getter and setter methods.selectPropNames
-targetClass
- a Java Object what allows access to properties using getter and setter methods.- Returns:
- a new instance of
targetClass
even ifentity
isnull
. - Throws:
IllegalArgumentException
- iftargetClass
isnull
.
-
copy
public static <T> T copy(Object entity, boolean ignoreUnmatchedProperty, Set<String> ignorePropNames, Class<? extends T> targetClass) throws IllegalArgumentException - Type Parameters:
T
-- Parameters:
entity
-ignoreUnmatchedProperty
-ignorePropNames
-targetClass
-- Returns:
- a new instance of
targetClass
even ifentity
isnull
. - Throws:
IllegalArgumentException
- iftargetClass
isnull
.
-
merge
- Parameters:
sourceEntity
-targetEntity
-- Returns:
targetEntity
- Throws:
IllegalArgumentException
- iftargetEntity
isnull
.
-
merge
public static <T> T merge(Object sourceEntity, T targetEntity, Collection<String> selectPropNames) throws IllegalArgumentException Set all the signed properties(including all primitive type properties) in the specifiedsourceEntity
to the specifiedtargetEntity
.- Parameters:
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
-- Returns:
targetEntity
- Throws:
IllegalArgumentException
- iftargetEntity
isnull
.
-
merge
public static <T> T merge(Object sourceEntity, T targetEntity, BiPredicate<String, ?> filter) throws IllegalArgumentExceptionSet all the signed properties(including all primitive type properties) in the specifiedsourceEntity
to the specifiedtargetEntity
.- Parameters:
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
-- Returns:
targetEntity
- Throws:
IllegalArgumentException
- iftargetEntity
isnull
.
-
merge
public static <T> T merge(Object sourceEntity, T targetEntity, boolean ignoreUnmatchedProperty, Set<String> ignorePropNames) throws IllegalArgumentException - Parameters:
sourceEntity
-targetEntity
-ignoreUnmatchedProperty
-ignorePropNames
-- Returns:
targetEntity
- Throws:
IllegalArgumentException
- iftargetEntity
isnull
.
-
merge
public static <T> T merge(Object sourceEntity, T targetEntity, BinaryOperator<?> mergeFunc) throws IllegalArgumentException - Parameters:
sourceEntity
-targetEntity
-mergeFunc
- the first parameter is source property value, the second parameter is target property value.- Returns:
targetEntity
- Throws:
IllegalArgumentException
- iftargetEntity
isnull
.
-
merge
public static <T> T merge(Object sourceEntity, T targetEntity, Collection<String> selectPropNames, BinaryOperator<?> mergeFunc) throws IllegalArgumentException Set all the signed properties(including all primitive type properties) in the specifiedsourceEntity
to the specifiedtargetEntity
.- Parameters:
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.- Returns:
targetEntity
- Throws:
IllegalArgumentException
- iftargetEntity
isnull
.
-
merge
public static <T> T merge(Object sourceEntity, T targetEntity, BiPredicate<String, ?> filter, BinaryOperator<?> mergeFunc) throws IllegalArgumentExceptionSet all the signed properties(including all primitive type properties) in the specifiedsourceEntity
to the specifiedtargetEntity
.- Parameters:
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.- Returns:
targetEntity
- Throws:
IllegalArgumentException
- iftargetEntity
isnull
.
-
merge
public static <T> T merge(Object sourceEntity, T targetEntity, boolean ignoreUnmatchedProperty, Set<String> ignorePropNames, BinaryOperator<?> mergeFunc) throws IllegalArgumentException - Parameters:
sourceEntity
-targetEntity
-ignoreUnmatchedProperty
-ignorePropNames
-mergeFunc
- the first parameter is source property value, the second parameter is target property value.- Returns:
targetEntity
- Throws:
IllegalArgumentException
- iftargetEntity
isnull
.
-
erase
- Parameters:
entity
-propNames
-
-
erase
- Parameters:
entity
-propNames
-
-
eraseAll
- Parameters:
entity
-
-
emptyList
Returns an empty immutableList
.- Type Parameters:
T
-- Returns:
- See Also:
-
emptySet
Returns an empty immutableSet
.- Type Parameters:
T
-- Returns:
- See Also:
-
emptySortedSet
Returns an empty immutableSortedSet
.- Type Parameters:
T
-- Returns:
- See Also:
-
emptyMap
Returns an empty immutableMap
.- Type Parameters:
K
- the key typeV
- the value type- Returns:
- See Also:
-
emptySortedMap
Returns an empty immutableSortedMap
.- Type Parameters:
K
- the key typeV
- the value type- Returns:
- See Also:
-
emptyIterator
Returns an empty immutableIterator
.- Type Parameters:
T
-- Returns:
- See Also:
-
emptyListIterator
Returns an empty immutableListIterator
.- Type Parameters:
T
-- Returns:
- See Also:
-
emptyInputStream
Returns an empty immutableInputStream
.- Returns:
-
anyNull
public static <T> boolean anyNull(T a, T b) - Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
anyNull
public static <T> boolean anyNull(T a, T b, T c) - Type Parameters:
T
-- Parameters:
a
-b
-c
-- Returns:
-
anyNull
- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
anyNull
- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
allNull
public static <T> boolean allNull(T a, T b) - Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
allNull
public static <T> boolean allNull(T a, T b, T c) - Type Parameters:
T
-- Parameters:
a
-b
-c
-- Returns:
-
allNull
- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
allNull
- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
anyNullOrEmpty
Any null or empty.- Parameters:
a
-b
-- Returns:
-
anyNullOrEmpty
Any null or empty.- Parameters:
a
-b
-c
-- Returns:
-
anyNullOrEmpty
Any null or empty.- Parameters:
css
-- Returns:
-
anyNullOrEmpty
Any null or empty.- Parameters:
css
-- Returns:
-
anyNullOrEmpty
public static <T> boolean anyNullOrEmpty(T[] a, T[] b) - Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
anyNullOrEmpty
public static <T> boolean anyNullOrEmpty(T[] a, T[] b, T[] c) - Type Parameters:
T
-- Parameters:
a
-b
-c
-- Returns:
-
anyNullOrEmpty
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
anyNullOrEmpty
- Type Parameters:
T
-- Parameters:
a
-b
-c
-- Returns:
-
allNullOrEmpty
All null or empty.- Parameters:
cs1
-cs2
-- Returns:
-
allNullOrEmpty
All null or empty.- Parameters:
cs1
-cs2
-cs3
-- Returns:
-
allNullOrEmpty
All null or empty.- Parameters:
css
-- Returns:
-
allNullOrEmpty
All null or empty.- Parameters:
css
-- Returns:
-
allNullOrEmpty
public static <T> boolean allNullOrEmpty(T[] a, T[] b) - Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
allNullOrEmpty
public static <T> boolean allNullOrEmpty(T[] a, T[] b, T[] c) - Type Parameters:
T
-- Parameters:
a
-b
-c
-- Returns:
-
allNullOrEmpty
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
allNullOrEmpty
- Type Parameters:
T
-- Parameters:
a
-b
-c
-- Returns:
-
first
- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
first
- Type Parameters:
T
-- Parameters:
iter
-- Returns:
-
last
- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
last
- Type Parameters:
T
-- Parameters:
iter
-- Returns:
-
firstNonNull
First non null.- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
firstNonNull
First non null.- Type Parameters:
T
-- Parameters:
a
-b
-c
-- Returns:
-
firstNonNull
First non null.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
firstNonNull
First non null.- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
firstNonNull
First non null.- Type Parameters:
T
-- Parameters:
iter
-- Returns:
-
lastNonNull
Last non null.- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
lastNonNull
Last non null.- Type Parameters:
T
-- Parameters:
a
-b
-c
-- Returns:
-
lastNonNull
Last non null.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
lastNonNull
Last non null.- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
lastNonNull
Last non null.- Type Parameters:
T
-- Parameters:
iter
-- Returns:
-
firstNonEmpty
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
firstNonEmpty
- Type Parameters:
T
-- Parameters:
a
-b
-c
-- Returns:
-
firstNonBlank
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
firstNonBlank
- Type Parameters:
T
-- Parameters:
a
-b
-c
-- Returns:
-
firstNonEmpty
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
firstNonEmpty
- Type Parameters:
T
-- Parameters:
a
-b
-c
-- Returns:
-
firstNonEmpty
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
firstNonEmpty
- Type Parameters:
T
-- Parameters:
a
-b
-c
-- Returns:
-
firstEntry
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
map
-- Returns:
-
lastEntry
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
map
-- Returns:
-
firstOrNullIfEmpty
public static <T> T firstOrNullIfEmpty(T[] a) First or null if empty.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
firstOrNullIfEmpty
First or null if empty.- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
firstOrNullIfEmpty
First or null if empty.- Type Parameters:
T
-- Parameters:
iter
-- Returns:
-
firstOrDefaultIfEmpty
public static <T> T firstOrDefaultIfEmpty(T[] a, T defaultValueForEmpty) First or default if empty.- Type Parameters:
T
-- Parameters:
a
-defaultValueForEmpty
-- Returns:
-
firstOrDefaultIfEmpty
First or default if empty.- Type Parameters:
T
-- Parameters:
c
-defaultValueForEmpty
-- Returns:
-
firstOrDefaultIfEmpty
First or default if empty.- Type Parameters:
T
-- Parameters:
iter
-defaultValueForEmpty
-- Returns:
-
lastOrNullIfEmpty
public static <T> T lastOrNullIfEmpty(T[] a) Last or null if empty.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
lastOrNullIfEmpty
Last or null if empty.- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
lastOrNullIfEmpty
Last or null if empty.- Type Parameters:
T
-- Parameters:
iter
-- Returns:
-
lastOrDefaultIfEmpty
public static <T> T lastOrDefaultIfEmpty(T[] a, T defaultValueForEmpty) Last or default if empty.- Type Parameters:
T
-- Parameters:
a
-defaultValueForEmpty
-- Returns:
-
lastOrDefaultIfEmpty
Last or default if empty.- Type Parameters:
T
-- Parameters:
c
-defaultValueForEmpty
-- Returns:
-
lastOrDefaultIfEmpty
Last or default if empty.- Type Parameters:
T
-- Parameters:
iter
-defaultValueForEmpty
-- Returns:
-
findFirst
public static <T,E extends Exception> u.Nullable<T> findFirst(T[] a, Throwables.Predicate<? super T, E> predicate) throws E- Type Parameters:
T
-E
-- Parameters:
a
-predicate
-- Returns:
- the nullable
- Throws:
E
- the e
-
findFirst
public static <T,E extends Exception> u.Nullable<T> findFirst(Collection<? extends T> c, Throwables.Predicate<? super T, E> predicate) throws E- Type Parameters:
T
-E
-- Parameters:
c
-predicate
-- Returns:
- the nullable
- Throws:
E
- the e
-
findFirst
public static <T,E extends Exception> u.Nullable<T> findFirst(Iterator<? extends T> iter, Throwables.Predicate<? super T, E> predicate) throws E- Type Parameters:
T
-E
-- Parameters:
iter
-predicate
-- Returns:
- Throws:
E
-
findLast
public static <T,E extends Exception> u.Nullable<T> findLast(T[] a, Throwables.Predicate<? super T, E> predicate) throws E- Type Parameters:
T
-E
-- Parameters:
a
-predicate
-- Returns:
- the nullable
- Throws:
E
- the e
-
findLast
public static <T,E extends Exception> u.Nullable<T> findLast(Collection<? extends T> c, Throwables.Predicate<? super T, E> predicate) throws E- Type Parameters:
T
-E
-- Parameters:
c
-predicate
-- Returns:
- the nullable
- Throws:
E
- the e
-
findFirstNonNull
public static <T,E extends Exception> u.Optional<T> findFirstNonNull(T[] a, Throwables.Predicate<? super T, E> predicate) throws EFind first non null.- Type Parameters:
T
-E
-- Parameters:
a
-predicate
-- Returns:
- the optional
- Throws:
E
- the e
-
findFirstNonNull
public static <T,E extends Exception> u.Optional<T> findFirstNonNull(Collection<? extends T> c, Throwables.Predicate<? super T, E> predicate) throws EFind first non null.- Type Parameters:
T
-E
-- Parameters:
c
-predicate
-- Returns:
- the optional
- Throws:
E
- the e
-
findFirstNonNull
public static <T,E extends Exception> u.Optional<T> findFirstNonNull(Iterator<? extends T> iter, Throwables.Predicate<? super T, E> predicate) throws E- Type Parameters:
T
-E
-- Parameters:
iter
-predicate
-- Returns:
- Throws:
E
-
findLastNonNull
public static <T,E extends Exception> u.Optional<T> findLastNonNull(T[] a, Throwables.Predicate<? super T, E> predicate) throws EFind last non null.- Type Parameters:
T
-E
-- Parameters:
a
-predicate
-- Returns:
- the optional
- Throws:
E
- the e
-
findLastNonNull
public static <T,E extends Exception> u.Optional<T> findLastNonNull(Collection<? extends T> c, Throwables.Predicate<? super T, E> predicate) throws EFind last non null.- Type Parameters:
T
-E
-- Parameters:
c
-predicate
-- Returns:
- the optional
- Throws:
E
- the e
-
first
Return at most firstn
elements.- Type Parameters:
T
-- Parameters:
c
-n
-- Returns:
- the list
-
last
Return at most lastn
elements.- Type Parameters:
T
-- Parameters:
c
-n
-- Returns:
- the list
-
slice
Returns a read-onlySeq
.- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-- Returns:
- the immutable collection<? extends t>
-
slice
Returns a read-onlyImmutableCollection
.- Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-- Returns:
- the immutable collection<? extends t>
-
slice
public static <T> ImmutableCollection<T> slice(Collection<? extends T> c, int fromIndex, int toIndex) Returns a read-onlyImmutableCollection
.- Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-- Returns:
- the immutable collection<? extends t>
-
slice
- Type Parameters:
T
-- Parameters:
iter
-fromIndex
-toIndex
-- Returns:
-
len
Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.- Parameters:
s
-- Returns:
-
len
public static int len(boolean[] a) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.- Parameters:
a
-- Returns:
-
len
public static int len(char[] a) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.- Parameters:
a
-- Returns:
-
len
public static int len(byte[] a) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.- Parameters:
a
-- Returns:
-
len
public static int len(short[] a) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.- Parameters:
a
-- Returns:
-
len
public static int len(int[] a) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.- Parameters:
a
-- Returns:
-
len
public static int len(long[] a) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.- Parameters:
a
-- Returns:
-
len
public static int len(float[] a) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.- Parameters:
a
-- Returns:
-
len
public static int len(double[] a) Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.- Parameters:
a
-- Returns:
-
len
Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.- Parameters:
a
-- Returns:
-
size
Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.- Parameters:
c
-- Returns:
-
size
Returns the length/size of the specifiedArray/Collection/Map/CharSequence
, or0
if it's empty ornull
.- Parameters:
m
-- Returns:
-
nullToEmpty
Returns an immutable empty list if the specified List isnull
, otherwise itself is returned.- Type Parameters:
T
-- Parameters:
list
-- Returns:
-
nullToEmpty
Returns an immutable empty set if the specified Set isnull
, otherwise itself is returned.- Type Parameters:
T
-- Parameters:
set
-- Returns:
-
nullToEmpty
Returns an immutable emptySortedSet
if the specified SortedSet isnull
, otherwise itself is returned.- Type Parameters:
T
-- Parameters:
set
-- Returns:
-
nullToEmpty
Returns an immutable empty map if the specified Map isnull
, otherwise itself is returned.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
map
-- Returns:
-
nullToEmpty
Returns an immutable emptySortedMap
if the specified SortedMap isnull
, otherwise itself is returned.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
map
-- Returns:
-
nullToEmpty
Returns an immutable emptyIterator
if the specified Iterator isnull
, otherwise itself is returned.- Type Parameters:
T
-- Parameters:
iter
-- Returns:
-
nullToEmpty
Returns an immutable emptyListIterator
if the specified ListIterator isnull
, otherwise itself is returned.- Type Parameters:
T
-- Parameters:
iter
-- Returns:
-
nullToEmpty
Null to empty.- Parameters:
str
-- Returns:
-
nullToEmpty
public static boolean[] nullToEmpty(boolean[] a) Null to empty.- Parameters:
a
-- Returns:
-
nullToEmpty
public static char[] nullToEmpty(char[] a) Null to empty.- Parameters:
a
-- Returns:
-
nullToEmpty
public static byte[] nullToEmpty(byte[] a) Null to empty.- Parameters:
a
-- Returns:
-
nullToEmpty
public static short[] nullToEmpty(short[] a) Null to empty.- Parameters:
a
-- Returns:
-
nullToEmpty
public static int[] nullToEmpty(int[] a) Null to empty.- Parameters:
a
-- Returns:
-
nullToEmpty
public static long[] nullToEmpty(long[] a) Null to empty.- Parameters:
a
-- Returns:
-
nullToEmpty
public static float[] nullToEmpty(float[] a) Null to empty.- Parameters:
a
-- Returns:
-
nullToEmpty
public static double[] nullToEmpty(double[] a) Null to empty.- Parameters:
a
-- Returns:
-
nullToEmpty
Null to empty.- Parameters:
a
-- Returns:
-
nullToEmpty
Deprecated.replaced byCommonUtil.nullToEmpty(Object[], Class)
Null to empty.- Parameters:
a
-- Returns:
-
nullToEmpty
Deprecated.replaced byCommonUtil.nullToEmpty(Object[], Class)
Null to empty.- Type Parameters:
T
-- Parameters:
arrayType
-a
-- Returns:
-
nullToEmpty
Null to empty.- Type Parameters:
T
-- Parameters:
a
-arrayType
-- Returns:
-
nullToEmpty
Returns an immutable empty Collection if the specified ImmutableCollection isnull
, otherwise itself is returned.- Type Parameters:
T
-- Parameters:
c
-- Returns:
-
nullToEmpty
Returns an immutable empty list if the specified ImmutableList isnull
, otherwise itself is returned.- Type Parameters:
T
-- Parameters:
list
-- Returns:
-
nullToEmpty
Returns an immutable empty list if the specified ImmutableSet isnull
, otherwise itself is returned.- Type Parameters:
T
-- Parameters:
set
-- Returns:
-
nullToEmpty
Returns an immutable empty list if the specified ImmutableSortedSet isnull
, otherwise itself is returned.- Type Parameters:
T
-- Parameters:
set
-- Returns:
-
nullToEmpty
Returns an immutable empty map if the specified ImmutableMap isnull
, otherwise itself is returned.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
map
-- Returns:
-
nullToEmpty
Returns an immutable empty map if the specified ImmutableSortedMap isnull
, otherwise itself is returned.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
map
-- Returns:
-
nullToEmpty
Returns an immutable empty map if the specified ImmutableBiMap isnull
, otherwise itself is returned.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
map
-- Returns:
-
isNullOrEmpty
Checks if is null or empty.- Parameters:
s
-- Returns:
- true, if is null or empty
-
isNullOrEmpty
public static boolean isNullOrEmpty(boolean[] a) Checks if is null or empty.- Parameters:
a
-- Returns:
- true, if is null or empty
-
isNullOrEmpty
public static boolean isNullOrEmpty(char[] a) Checks if is null or empty.- Parameters:
a
-- Returns:
- true, if is null or empty
-
isNullOrEmpty
public static boolean isNullOrEmpty(byte[] a) Checks if is null or empty.- Parameters:
a
-- Returns:
- true, if is null or empty
-
isNullOrEmpty
public static boolean isNullOrEmpty(short[] a) Checks if is null or empty.- Parameters:
a
-- Returns:
- true, if is null or empty
-
isNullOrEmpty
public static boolean isNullOrEmpty(int[] a) Checks if is null or empty.- Parameters:
a
-- Returns:
- true, if is null or empty
-
isNullOrEmpty
public static boolean isNullOrEmpty(long[] a) Checks if is null or empty.- Parameters:
a
-- Returns:
- true, if is null or empty
-
isNullOrEmpty
public static boolean isNullOrEmpty(float[] a) Checks if is null or empty.- Parameters:
a
-- Returns:
- true, if is null or empty
-
isNullOrEmpty
public static boolean isNullOrEmpty(double[] a) Checks if is null or empty.- Parameters:
a
-- Returns:
- true, if is null or empty
-
isNullOrEmpty
Checks if is null or empty.- Parameters:
a
-- Returns:
- true, if is null or empty
-
isNullOrEmpty
Checks if is null or empty.- Parameters:
c
-- Returns:
- true, if is null or empty
-
isNullOrEmpty
Not null or empty.- Parameters:
iter
-- Returns:
-
isNullOrEmpty
Not null or empty.- Parameters:
iter
-- Returns:
-
isNullOrEmpty
Checks if is null or empty.- Parameters:
m
-- Returns:
- true, if is null or empty
-
isNullOrEmpty
Checks if is null or empty.- Parameters:
list
-- Returns:
- true, if is null or empty
-
isNullOrEmpty
Checks if is null or empty.- Parameters:
s
-- Returns:
- true, if is null or empty
-
isNullOrEmpty
Checks if is null or empty.- Parameters:
s
-- Returns:
- true, if is null or empty
-
isNullOrEmpty
Checks if is null or empty.- Parameters:
m
-- Returns:
- true, if is null or empty
-
isNullOrEmpty
Checks if is null or empty.- Parameters:
rs
-- Returns:
- true, if is null or empty
-
isNullOrEmptyOrBlank
Checks if is null or empty or blank.- Parameters:
s
-- Returns:
- true, if is null or empty or blank
-
notNullOrEmpty
Not null or empty.- Parameters:
s
-- Returns:
-
notNullOrEmpty
public static boolean notNullOrEmpty(boolean[] a) Not null or empty.- Parameters:
a
-- Returns:
-
notNullOrEmpty
public static boolean notNullOrEmpty(char[] a) Not null or empty.- Parameters:
a
-- Returns:
-
notNullOrEmpty
public static boolean notNullOrEmpty(byte[] a) Not null or empty.- Parameters:
a
-- Returns:
-
notNullOrEmpty
public static boolean notNullOrEmpty(short[] a) Not null or empty.- Parameters:
a
-- Returns:
-
notNullOrEmpty
public static boolean notNullOrEmpty(int[] a) Not null or empty.- Parameters:
a
-- Returns:
-
notNullOrEmpty
public static boolean notNullOrEmpty(long[] a) Not null or empty.- Parameters:
a
-- Returns:
-
notNullOrEmpty
public static boolean notNullOrEmpty(float[] a) Not null or empty.- Parameters:
a
-- Returns:
-
notNullOrEmpty
public static boolean notNullOrEmpty(double[] a) Not null or empty.- Parameters:
a
-- Returns:
-
notNullOrEmpty
Not null or empty.- Parameters:
a
-- Returns:
-
notNullOrEmpty
Not null or empty.- Parameters:
c
-- Returns:
-
notNullOrEmpty
Not null or empty.- Parameters:
iter
-- Returns:
-
notNullOrEmpty
Not null or empty.- Parameters:
iter
-- Returns:
-
notNullOrEmpty
Not null or empty.- Parameters:
m
-- Returns:
-
notNullOrEmpty
Not null or empty.- Parameters:
list
-- Returns:
-
notNullOrEmpty
Not null or empty.- Parameters:
s
-- Returns:
-
notNullOrEmpty
Not null or empty.- Parameters:
s
-- Returns:
-
notNullOrEmpty
Not null or empty.- Parameters:
m
-- Returns:
-
notNullOrEmpty
Not null or empty.- Parameters:
rs
-- Returns:
-
notNullOrEmptyOrBlank
Not null or empty or blank.- Parameters:
s
-- Returns:
-
checkIndex
- Parameters:
index
-length
-- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
checkFromToIndex
public static void checkFromToIndex(int fromIndex, int toIndex, int length) throws IndexOutOfBoundsException Check from to index.- Parameters:
fromIndex
-toIndex
-length
-- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
checkFromIndexSize
public static void checkFromIndexSize(int fromIndex, int size, int length) throws IndexOutOfBoundsException Check from index size.- Parameters:
fromIndex
- the lower-bound (inclusive) of the sub-intervalsize
- the size of the sub-rangelength
- the upper-bound (exclusive) of the range- Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
checkArgument
public static void checkArgument(boolean expression) Ensures the truth of an expression involving one or more parameters to the calling method.- Parameters:
expression
- a boolean expression- Throws:
IllegalArgumentException
- ifexpression
is false
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.- Parameters:
expression
- a boolean expressionerrorMessage
- the exception message to use if the check fails; will be converted to a string usingString.valueOf(Object)
- Throws:
IllegalArgumentException
- ifexpression
is false
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p
-
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-
-
checkArgument
public 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.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-p3
-
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p
-
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p
-
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p
-
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p
-
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-p3
-
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p
-
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-p3
-
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p
-
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-
-
checkArgument
public 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.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-p3
-
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p
-
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-
-
checkArgument
public 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.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-p3
-
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p
-
-
checkArgument
Ensures the truth of an expression involving one or more parameters to the calling method.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-
-
checkArgument
public 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.See
checkArgument(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-p3
-
-
checkArgument
- Type Parameters:
E
-- Parameters:
b
-errorMessageSupplier
-
-
checkArgNotNull
public static <T> T checkArgNotNull(T obj) Check arg not null.- Type Parameters:
T
-- Parameters:
obj
-- Returns:
- Throws:
IllegalArgumentException
- ifobj
isnull
-
checkArgNotNull
Check arg not null.- Type Parameters:
T
-- Parameters:
obj
-errorMessage
-- Returns:
- Throws:
IllegalArgumentException
- ifobj
isnull
-
checkArgNotNullOrEmpty
Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.- Type Parameters:
T
-- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
isnull
or empty.
-
checkArgNotNullOrEmpty
Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
isnull
or empty.
-
checkArgNotNullOrEmpty
Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
isnull
or empty.
-
checkArgNotNullOrEmpty
Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
isnull
or empty.
-
checkArgNotNullOrEmpty
Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
isnull
or empty.
-
checkArgNotNullOrEmpty
Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
isnull
or empty.
-
checkArgNotNullOrEmpty
Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
isnull
or empty.
-
checkArgNotNullOrEmpty
Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
isnull
or empty.
-
checkArgNotNullOrEmpty
Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
isnull
or empty.
-
checkArgNotNullOrEmpty
Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.- Type Parameters:
T
-- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
isnull
or empty.
-
checkArgNotNullOrEmpty
Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.- Type Parameters:
T
-- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
isnull
or empty.
-
checkArgNotNullOrEmpty
Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.- Type Parameters:
T
-- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
isnull
or empty.
-
checkArgNotNullOrEmpty
Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.- Type Parameters:
T
-- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
isnull
or empty.
-
checkArgNotNullOrEmpty
Checks if the specifiedarg
isnull
or empty, and throwsIllegalArgumentException
if it is.- Type Parameters:
T
-- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
isnull
or empty.
-
checkArgNotNullOrEmptyOrBlank
Check if the specified parameter is null or empty or blank.- Type Parameters:
T
-- Parameters:
arg
-msg
- name of parameter or error message- Returns:
- Throws:
IllegalArgumentException
- if the specified parameter is null or empty.
-
checkArgNotNegative
Checks if the specifiedarg
is not negative, and throwsIllegalArgumentException
if it is.- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
is negative.
-
checkArgNotNegative
Checks if the specifiedarg
is not negative, and throwsIllegalArgumentException
if it is.- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
is negative.
-
checkArgNotNegative
Checks if the specifiedarg
is not negative, and throwsIllegalArgumentException
if it is.- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
is negative.
-
checkArgPositive
Checks if the specifiedarg
is positive, and throwsIllegalArgumentException
if it is not.- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
is negative.
-
checkArgPositive
Checks if the specifiedarg
is positive, and throwsIllegalArgumentException
if it is not.- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
is negative.
-
checkArgPositive
Checks if the specifiedarg
is positive, and throwsIllegalArgumentException
if it is not.- Parameters:
arg
-argNameOrErrorMsg
-- Returns:
- Throws:
IllegalArgumentException
- if the specifiedarg
is negative.
-
checkElementNotNull
Check if the specifiedCollection
contains anynull
element.- Type Parameters:
T
-- Parameters:
c
-- Throws:
IllegalArgumentException
- ifnull
element found inc
-
checkElementNotNull
Check if the specifiedCollection
contains anynull
element.- Type Parameters:
T
-- Parameters:
c
-errorMessage
-- Throws:
IllegalArgumentException
- ifnull
element found inc
-
checkKeyNotNull
Check if the specifiedMap
contains anynull
key.- Type Parameters:
T
-- Parameters:
m
-- Throws:
IllegalArgumentException
- ifnull
key found inm
-
checkKeyNotNull
Check if the specifiedMap
contains anynull
key.- Type Parameters:
T
-- Parameters:
m
-errorMessage
-- Throws:
IllegalArgumentException
- ifnull
key found inm
-
checkValueNotNull
Check if the specifiedMap
contains anynull
value.- Type Parameters:
T
-- Parameters:
m
-- Throws:
IllegalArgumentException
- ifnull
value found inm
-
checkValueNotNull
Check if the specifiedMap
contains anynull
value.- Type Parameters:
T
-- Parameters:
m
-errorMessage
-- Throws:
IllegalArgumentException
- ifnull
value found inm
-
checkState
public 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.- Parameters:
expression
- a boolean expression- Throws:
IllegalStateException
- ifexpression
is false
-
checkState
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.- Parameters:
expression
- a boolean expressionerrorMessage
- the exception message to use if the check fails; will be converted to a string usingString.valueOf(Object)
- Throws:
IllegalStateException
- ifexpression
is false
-
checkState
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.See
checkState(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p
-
-
checkState
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.See
checkState(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-
-
checkState
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.See
checkState(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-p3
-
-
checkState
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.See
checkState(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p
-
-
checkState
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.See
checkState(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-
-
checkState
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.See
checkState(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-p3
-
-
checkState
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.See
checkState(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p
-
-
checkState
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.See
checkState(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-
-
checkState
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.See
checkState(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-p3
-
-
checkState
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.See
checkState(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p
-
-
checkState
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.See
checkState(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-
-
checkState
public 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.See
checkState(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-p3
-
-
checkState
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.See
checkState(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p
-
-
checkState
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.See
checkState(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-
-
checkState
public 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.See
checkState(boolean, String, Object...)
for details.- Parameters:
b
-errorMessageTemplate
-p1
-p2
-p3
-
-
checkState
- Type Parameters:
E
-- Parameters:
b
-errorMessageSupplier
-
-
compare
public static int compare(boolean a, boolean b) - Parameters:
a
-b
-- Returns:
-
compare
public static int compare(byte a, byte b) - Parameters:
a
-b
-- Returns:
-
compare
public static int compare(short a, short b) - Parameters:
a
-b
-- Returns:
-
compare
public static int compare(int a, int b) - Parameters:
a
-b
-- Returns:
-
compare
public static int compare(long a, long b) - Parameters:
a
-b
-- Returns:
-
compare
public static int compare(float a, float b) - Parameters:
a
-b
-- Returns:
-
compare
public static int compare(double a, double b) - Parameters:
a
-b
-- Returns:
-
compare
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
compare
Returns 0 if the arguments are identical andc.compare(a, b)
otherwise. Consequently, if both arguments arenull
0 is returned.Note that if one of the arguments is
null
, aNullPointerException
may or may not be thrown depending on what ordering policy, if any, theComparator
chooses to have fornull
values.- Type Parameters:
T
- the type of the objects being compared- Parameters:
a
- an objectb
- an object to be compared witha
cmp
- theComparator
to compare the first two arguments- Returns:
- 0 if the arguments are identical and
c.compare(a, b)
otherwise. - See Also:
-
compare
public static <T1 extends Comparable<T1>,T2 extends Comparable<T2>> int 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.0
is returned if all of the pairs of values are equal.- Type Parameters:
T1
-T2
-- Parameters:
a1
-b1
-a2
-b2
-- Returns:
-
compare
public static <T1 extends Comparable<T1>,T2 extends Comparable<T2>, int compareT3 extends Comparable<T3>> (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.0
is returned if all of the pairs of values are equal.- Type Parameters:
T1
-T2
-T3
-- Parameters:
a1
-b1
-a2
-b2
-a3
-b3
-- Returns:
-
compare
@Deprecated public static <T1 extends Comparable<T1>,T2 extends Comparable<T2>, int compareT3 extends Comparable<T3>, T4 extends Comparable<T4>> (T1 a1, T1 b1, T2 a2, T2 b2, T3 a3, T3 b3, T4 a4, T4 b4) Deprecated.please useBuilder.ComparisonBuilder
Continue to compare the pairs of values(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.- Type Parameters:
T1
-T2
-T3
-T4
-- Parameters:
a1
-b1
-a2
-b2
-a3
-b3
-a4
-b4
-- Returns:
- See Also:
-
compare
@Deprecated public static <T1 extends Comparable<T1>,T2 extends Comparable<T2>, int compareT3 extends Comparable<T3>, T4 extends Comparable<T4>, T5 extends Comparable<T5>> (T1 a1, T1 b1, T2 a2, T2 b2, T3 a3, T3 b3, T4 a4, T4 b4, T5 a5, T5 b5) Deprecated.please useBuilder.ComparisonBuilder
Continue to compare the pairs of values(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.- Type Parameters:
T1
-T2
-T3
-T4
-T5
-- Parameters:
a1
-b1
-a2
-b2
-a3
-b3
-a4
-b4
-a5
-b5
-- Returns:
- See Also:
-
compare
@Deprecated public static <T1 extends Comparable<T1>,T2 extends Comparable<T2>, int compareT3 extends Comparable<T3>, T4 extends Comparable<T4>, T5 extends Comparable<T5>, T6 extends Comparable<T6>> (T1 a1, T1 b1, T2 a2, T2 b2, T3 a3, T3 b3, T4 a4, T4 b4, T5 a5, T5 b5, T6 a6, T6 b6) Deprecated.please useBuilder.ComparisonBuilder
Continue to compare the pairs of values(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.- Type Parameters:
T1
-T2
-T3
-T4
-T5
-T6
-- Parameters:
a1
-b1
-a2
-b2
-a3
-b3
-a4
-b4
-a5
-b5
-a6
-b6
-- Returns:
- See Also:
-
compare
@Deprecated public static <T1 extends Comparable<T1>,T2 extends Comparable<T2>, int compareT3 extends Comparable<T3>, T4 extends Comparable<T4>, T5 extends Comparable<T5>, T6 extends Comparable<T6>, T7 extends Comparable<T7>> (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) Deprecated.please useBuilder.ComparisonBuilder
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.0
is returned if all of the pairs of values are equal.- Type Parameters:
T1
-T2
-T3
-T4
-T5
-T6
-T7
-- Parameters:
a1
-b1
-a2
-b2
-a3
-b3
-a4
-b4
-a5
-b5
-a6
-b6
-a7
-b7
-- Returns:
- See Also:
-
compare
public static int compare(boolean[] a, boolean[] b) - Parameters:
a
-b
-- Returns:
-
compare
public static int compare(boolean[] a, int fromIndexA, boolean[] b, int fromIndexB, int len) - Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
compare
public static int compare(char[] a, char[] b) - Parameters:
a
-b
-- Returns:
-
compare
public static int compare(char[] a, int fromIndexA, char[] b, int fromIndexB, int len) - Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
compare
public static int compare(byte[] a, byte[] b) - Parameters:
a
-b
-- Returns:
-
compare
public static int compare(byte[] a, int fromIndexA, byte[] b, int fromIndexB, int len) - Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
compare
public static int compare(short[] a, short[] b) - Parameters:
a
-b
-- Returns:
-
compare
public static int compare(short[] a, int fromIndexA, short[] b, int fromIndexB, int len) - Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
compare
public static int compare(int[] a, int[] b) - Parameters:
a
-b
-- Returns:
-
compare
public static int compare(int[] a, int fromIndexA, int[] b, int fromIndexB, int len) - Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
compare
public static int compare(long[] a, long[] b) - Parameters:
a
-b
-- Returns:
-
compare
public static int compare(long[] a, int fromIndexA, long[] b, int fromIndexB, int len) - Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
compare
public static int compare(float[] a, float[] b) - Parameters:
a
-b
-- Returns:
-
compare
public static int compare(float[] a, int fromIndexA, float[] b, int fromIndexB, int len) - Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
compare
public static int compare(double[] a, double[] b) - Parameters:
a
-b
-- Returns:
-
compare
public static int compare(double[] a, int fromIndexA, double[] b, int fromIndexB, int len) - Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
compare
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
compare
public static <T extends Comparable<? super T>> int compare(T[] a, int fromIndexA, T[] b, int fromIndexB, int len) - Type Parameters:
T
-- Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
compare
- Type Parameters:
T
-- Parameters:
a
-b
-cmp
-- Returns:
-
compare
public static <T> int compare(T[] a, int fromIndexA, T[] b, int fromIndexB, int len, Comparator<? super T> cmp) - Type Parameters:
T
-- Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-cmp
-- Returns:
-
compare
- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
compare
public static <T> int compare(Collection<T> a, int fromIndexA, Collection<T> b, int fromIndexB, int len) - Type Parameters:
T
-- Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
compare
- Type Parameters:
T
-- Parameters:
a
-b
-cmp
-- Returns:
-
compare
public static <T> int compare(Collection<T> a, int fromIndexA, Collection<T> b, int fromIndexB, int len, Comparator<? super T> cmp) - Type Parameters:
T
-- Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-cmp
-- Returns:
-
compareIgnoreCase
Compare ignore case.- Parameters:
a
-b
-- Returns:
-
lessThan
Returnstrue
isa < b
, otherwisefalse
is returned.- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
lessEqual
Returnstrue
isa <= b
, otherwisefalse
is returned.- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
greaterThan
Returnstrue
isa > b
, otherwisefalse
is returned.- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
greaterEqual
Returnstrue
isa >= b
, otherwisefalse
is returned.- Type Parameters:
T
-- Parameters:
a
-b
-- Returns:
-
gtAndLt
Returnstrue
ismin < value < max
, otherwisefalse
is returned.- Type Parameters:
T
-- Parameters:
value
-min
-max
-- Returns:
-
geAndLt
Returnstrue
ismin <= value < max
, otherwisefalse
is returned.- Type Parameters:
T
-- Parameters:
value
-min
-max
-- Returns:
-
geAndLe
Returnstrue
ismin <= value <= max
, otherwisefalse
is returned.- Type Parameters:
T
-- Parameters:
value
-min
-max
-- Returns:
-
gtAndLe
Returnstrue
ismin < value <= max
, otherwisefalse
is returned.- Type Parameters:
T
-- Parameters:
value
-min
-max
-- Returns:
-
between
Deprecated.replaced bygtAndLt(Comparable, Comparable, Comparable)
- Type Parameters:
T
-- Parameters:
value
-min
-max
-- Returns:
-
equals
public static boolean equals(boolean a, boolean b) - Parameters:
a
-b
-- Returns:
- boolean
-
equals
public static boolean equals(char a, char b) - Parameters:
a
-b
-- Returns:
- boolean
-
equals
public static boolean equals(byte a, byte b) - Parameters:
a
-b
-- Returns:
- boolean
-
equals
public static boolean equals(short a, short b) - Parameters:
a
-b
-- Returns:
- boolean
-
equals
public static boolean equals(int a, int b) - Parameters:
a
-b
-- Returns:
- boolean
-
equals
public static boolean equals(long a, long b) - Parameters:
a
-b
-- Returns:
- boolean
-
equals
public static boolean equals(float a, float b) - Parameters:
a
-b
-- Returns:
- boolean
-
equals
public static boolean equals(double a, double b) - Parameters:
a
-b
-- Returns:
- boolean
-
equals
- Parameters:
a
-b
-- Returns:
-
equalsIgnoreCase
Equals ignore case.- Parameters:
a
-b
-- Returns:
-
equals
- Parameters:
a
-b
-- Returns:
- boolean
-
deepEquals
- Parameters:
a
-b
-- Returns:
- boolean
-
equals
public static boolean equals(boolean[] a, boolean[] b) - Parameters:
a
-b
-- Returns:
- boolean
- See Also:
-
equals
public static boolean equals(boolean[] a, int fromIndexA, boolean[] b, int fromIndexB, int len) - Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
equals
public static boolean equals(char[] a, char[] b) - Parameters:
a
-b
-- Returns:
- boolean
- See Also:
-
equals
public static boolean equals(char[] a, int fromIndexA, char[] b, int fromIndexB, int len) - Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
equals
public static boolean equals(byte[] a, byte[] b) - Parameters:
a
-b
-- Returns:
- boolean
- See Also:
-
equals
public static boolean equals(byte[] a, int fromIndexA, byte[] b, int fromIndexB, int len) - Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
equals
public static boolean equals(short[] a, short[] b) - Parameters:
a
-b
-- Returns:
- boolean
- See Also:
-
equals
public static boolean equals(short[] a, int fromIndexA, short[] b, int fromIndexB, int len) - Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
equals
public static boolean equals(int[] a, int[] b) - Parameters:
a
-b
-- Returns:
- boolean
- See Also:
-
equals
public static boolean equals(int[] a, int fromIndexA, int[] b, int fromIndexB, int len) - Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
equals
public static boolean equals(long[] a, long[] b) - Parameters:
a
-b
-- Returns:
- boolean
- See Also:
-
equals
public static boolean equals(long[] a, int fromIndexA, long[] b, int fromIndexB, int len) - Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
equals
public static boolean equals(float[] a, float[] b) - Parameters:
a
-b
-- Returns:
- boolean
- See Also:
-
equals
public static boolean equals(float[] a, int fromIndexA, float[] b, int fromIndexB, int len) - Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
equals
public static boolean equals(double[] a, double[] b) - Parameters:
a
-b
-- Returns:
- boolean
- See Also:
-
equals
public static boolean equals(double[] a, int fromIndexA, double[] b, int fromIndexB, int len) - Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
equals
- Parameters:
a
-b
-- Returns:
- boolean
- See Also:
-
equals
- Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
deepEquals
- Parameters:
a
-b
-- Returns:
- See Also:
-
deepEquals
- Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
equalsIgnoreCase
Equals ignore case.- Parameters:
a
-b
-- Returns:
-
equalsIgnoreCase
public static boolean equalsIgnoreCase(String[] a, int fromIndexA, String[] b, int fromIndexB, int len) Equals ignore case.- Parameters:
a
-fromIndexA
-b
-fromIndexB
-len
-- Returns:
-
equalsByCommonProps
- Parameters:
entity1
-entity2
-- Returns:
- See Also:
-
MapDifference#of(Object, Object)
-
equalsByCommonProps
public static boolean equalsByCommonProps(Object entity1, Object entity2, Collection<String> propNamesToCompare) - Parameters:
entity1
-entity2
-propNamesToCompare
-- Returns:
- See Also:
-
MapDifference#of(Object, Object)
-
hashCode
public static int hashCode(boolean value) - Parameters:
value
-- Returns:
- int
-
hashCode
public static int hashCode(char value) - Parameters:
value
-- Returns:
- int
-
hashCode
public static int hashCode(byte value) - Parameters:
value
-- Returns:
- int
-
hashCode
public static int hashCode(short value) - Parameters:
value
-- Returns:
- int
-
hashCode
public static int hashCode(int value) - Parameters:
value
-- Returns:
- int
-
hashCode
public static int hashCode(long value) - Parameters:
value
-- Returns:
- int
-
hashCode
public static int hashCode(float value) - Parameters:
value
-- Returns:
- int
-
hashCode
public static int hashCode(double value) - Parameters:
value
-- Returns:
- int
-
hashCode
- Parameters:
obj
-- Returns:
- int
-
deepHashCode
- Parameters:
obj
-- Returns:
- int
-
hashCode
public static int hashCode(boolean[] a) - Parameters:
a
-- Returns:
- See Also:
-
hashCode
public static int hashCode(boolean[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
hashCode
public static int hashCode(char[] a) - Parameters:
a
-- Returns:
- See Also:
-
hashCode
public static int hashCode(char[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
hashCode
public static int hashCode(byte[] a) - Parameters:
a
-- Returns:
- See Also:
-
hashCode
public static int hashCode(byte[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
hashCode
public static int hashCode(short[] a) - Parameters:
a
-- Returns:
- See Also:
-
hashCode
public static int hashCode(short[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
hashCode
public static int hashCode(int[] a) - Parameters:
a
-- Returns:
- See Also:
-
hashCode
public static int hashCode(int[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
hashCode
public static int hashCode(long[] a) - Parameters:
a
-- Returns:
- See Also:
-
hashCode
public static int hashCode(long[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
hashCode
public static int hashCode(float[] a) - Parameters:
a
-- Returns:
- See Also:
-
hashCode
public static int hashCode(float[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
hashCode
public static int hashCode(double[] a) - Parameters:
a
-- Returns:
- See Also:
-
hashCode
public static int hashCode(double[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
hashCode
- Parameters:
a
-- Returns:
- See Also:
-
hashCode
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
deepHashCode
Deep hash code.- Parameters:
a
-- Returns:
- See Also:
-
deepHashCode
Deep hash code.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toString
- Parameters:
value
-- Returns:
- int
-
toString
- Parameters:
value
-- Returns:
- int
-
toString
- Parameters:
value
-- Returns:
- int
-
toString
- Parameters:
value
-- Returns:
- int
-
toString
- Parameters:
value
-- Returns:
- int
-
toString
- Parameters:
value
-- Returns:
- int
-
toString
- Parameters:
value
-- Returns:
- int
-
toString
- Parameters:
value
-- Returns:
- int
-
toString
- Parameters:
obj
-- Returns:
- int
-
deepToString
- Parameters:
obj
-- Returns:
- int
-
toString
- Parameters:
a
-- Returns:
- See Also:
-
toString
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toString
- Parameters:
a
-- Returns:
- See Also:
-
toString
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toString
- Parameters:
a
-- Returns:
- See Also:
-
toString
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toString
- Parameters:
a
-- Returns:
- See Also:
-
toString
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toString
- Parameters:
a
-- Returns:
- See Also:
-
toString
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toString
- Parameters:
a
-- Returns:
- See Also:
-
toString
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toString
- Parameters:
a
-- Returns:
- See Also:
-
toString
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toString
- Parameters:
a
-- Returns:
- See Also:
-
toString
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toString
- Parameters:
a
-- Returns:
- See Also:
-
toString
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
toString
- Parameters:
a
-defaultIfNull
-- Returns:
-
deepToString
Deep to string.- Parameters:
a
-- Returns:
- See Also:
-
deepToString
Deep to string.- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
deepToString
Deep to string.- Parameters:
a
-defaultIfNull
-- Returns:
-
reverse
public static void reverse(boolean[] a) Reverses the order of the given array.
- Parameters:
a
-
-
reverse
public static void reverse(boolean[] a, int fromIndex, int toIndex) Reverses the order of the given array in the given range.
- Parameters:
a
-fromIndex
-toIndex
-
-
reverse
public static void reverse(char[] a) Reverses the order of the given array.
- Parameters:
a
-
-
reverse
public static void reverse(char[] a, int fromIndex, int toIndex) Reverses the order of the given array in the given range.
- Parameters:
a
-fromIndex
-toIndex
-
-
reverse
public static void reverse(byte[] a) Reverses the order of the given array.
- Parameters:
a
-
-
reverse
public static void reverse(byte[] a, int fromIndex, int toIndex) Reverses the order of the given array in the given range.
- Parameters:
a
-fromIndex
-toIndex
-
-
reverse
public static void reverse(short[] a) Reverses the order of the given array.
- Parameters:
a
-
-
reverse
public static void reverse(short[] a, int fromIndex, int toIndex) Reverses the order of the given array in the given range.
- Parameters:
a
-fromIndex
-toIndex
-
-
reverse
public static void reverse(int[] a) Reverses the order of the given array.
- Parameters:
a
-
-
reverse
public static void reverse(int[] a, int fromIndex, int toIndex) Reverses the order of the given array in the given range.
- Parameters:
a
-fromIndex
-toIndex
-
-
reverse
public static void reverse(long[] a) Reverses the order of the given array.
- Parameters:
a
-
-
reverse
public static void reverse(long[] a, int fromIndex, int toIndex) Reverses the order of the given array in the given range.
- Parameters:
a
-fromIndex
-toIndex
-
-
reverse
public static void reverse(float[] a) Reverses the order of the given array.
- Parameters:
a
-
-
reverse
public static void reverse(float[] a, int fromIndex, int toIndex) Reverses the order of the given array in the given range.
- Parameters:
a
-fromIndex
-toIndex
-
-
reverse
public static void reverse(double[] a) Reverses the order of the given array.
- Parameters:
a
-
-
reverse
public static void reverse(double[] a, int fromIndex, int toIndex) Reverses the order of the given array in the given range.
- Parameters:
a
-fromIndex
-toIndex
-
-
reverse
Reverses the order of the given array.
There is no special handling for multi-dimensional arrays.
- Parameters:
a
-
-
reverse
Reverses the order of the given array in the given range.
- Parameters:
a
-fromIndex
-toIndex
-
-
reverse
- Parameters:
list
-
-
reverse
- Parameters:
list
-fromIndex
-toIndex
-
-
reverse
- Parameters:
c
-
-
rotate
public static void rotate(boolean[] a, int distance) - Parameters:
a
-distance
-
-
rotate
public static void rotate(char[] a, int distance) - Parameters:
a
-distance
-
-
rotate
public static void rotate(byte[] a, int distance) - Parameters:
a
-distance
-
-
rotate
public static void rotate(short[] a, int distance) - Parameters:
a
-distance
-
-
rotate
public static void rotate(int[] a, int distance) - Parameters:
a
-distance
-
-
rotate
public static void rotate(long[] a, int distance) - Parameters:
a
-distance
-
-
rotate
public static void rotate(float[] a, int distance) - Parameters:
a
-distance
-
-
rotate
public static void rotate(double[] a, int distance) - Parameters:
a
-distance
-
-
rotate
- Parameters:
a
-distance
-
-
rotate
- Parameters:
list
-distance
-- See Also:
-
rotate
- Parameters:
c
-distance
-
-
shuffle
public static void shuffle(boolean[] a) - Parameters:
a
-
-
shuffle
- Parameters:
a
-rnd
-
-
shuffle
public static void shuffle(char[] a) - Parameters:
a
-
-
shuffle
- Parameters:
a
-rnd
-
-
shuffle
public static void shuffle(byte[] a) - Parameters:
a
-
-
shuffle
- Parameters:
a
-rnd
-
-
shuffle
public static void shuffle(short[] a) - Parameters:
a
-
-
shuffle
- Parameters:
a
-rnd
-
-
shuffle
public static void shuffle(int[] a) - Parameters:
a
-
-
shuffle
- Parameters:
a
-rnd
-
-
shuffle
public static void shuffle(long[] a) - Parameters:
a
-
-
shuffle
- Parameters:
a
-rnd
-
-
shuffle
public static void shuffle(float[] a) - Parameters:
a
-
-
shuffle
- Parameters:
a
-rnd
-
-
shuffle
public static void shuffle(double[] a) - Parameters:
a
-
-
shuffle
- Parameters:
a
-rnd
-
-
shuffle
public static <T> void shuffle(T[] a) - Type Parameters:
T
-- Parameters:
a
-
-
shuffle
- Type Parameters:
T
-- Parameters:
a
-rnd
-
-
shuffle
- Parameters:
list
-
-
shuffle
- Parameters:
list
-rnd
-- See Also:
-
shuffle
- Parameters:
c
-
-
shuffle
- Parameters:
c
-rnd
-
-
swap
public static void swap(boolean[] a, int i, int j) - Parameters:
a
-i
-j
-
-
swap
public static void swap(char[] a, int i, int j) - Parameters:
a
-i
-j
-
-
swap
public static void swap(byte[] a, int i, int j) - Parameters:
a
-i
-j
-
-
swap
public static void swap(short[] a, int i, int j) - Parameters:
a
-i
-j
-
-
swap
public static void swap(int[] a, int i, int j) - Parameters:
a
-i
-j
-
-
swap
public static void swap(long[] a, int i, int j) - Parameters:
a
-i
-j
-
-
swap
public static void swap(float[] a, int i, int j) - Parameters:
a
-i
-j
-
-
swap
public static void swap(double[] a, int i, int j) - Parameters:
a
-i
-j
-
-
swap
- Parameters:
a
-i
-j
-
-
swap
- Parameters:
list
-i
-j
-
-
swap
- Type Parameters:
T
-- Parameters:
pair
-
-
swapIf
public static <T,E extends Exception> boolean swapIf(Pair<T, T> pair, Throwables.Predicate<? super Pair<T, throws ET>, E> predicate) - Type Parameters:
T
-E
-- Parameters:
pair
-predicate
-- Returns:
- Throws:
E
- the e
-
swap
- Type Parameters:
T
-M
-- Parameters:
triple
-
-
swapIf
public static <T,M, boolean swapIfE extends Exception> (Triple<T, M, throws ET> triple, Throwables.Predicate<? super Triple<T, M, T>, E> predicate) - Type Parameters:
T
-M
-E
-- Parameters:
triple
-predicate
-- Returns:
- Throws:
E
- the e
-
fill
public static void fill(boolean[] a, boolean val) - Parameters:
a
-val
-
-
fill
public static void fill(boolean[] a, int fromIndex, int toIndex, boolean val) - Parameters:
a
-fromIndex
-toIndex
-val
-
-
fill
public static void fill(char[] a, char val) - Parameters:
a
-val
-
-
fill
public static void fill(char[] a, int fromIndex, int toIndex, char val) - Parameters:
a
-fromIndex
-toIndex
-val
-
-
fill
public static void fill(byte[] a, byte val) - Parameters:
a
-val
-
-
fill
public static void fill(byte[] a, int fromIndex, int toIndex, byte val) - Parameters:
a
-fromIndex
-toIndex
-val
-
-
fill
public static void fill(short[] a, short val) - Parameters:
a
-val
-
-
fill
public static void fill(short[] a, int fromIndex, int toIndex, short val) - Parameters:
a
-fromIndex
-toIndex
-val
-
-
fill
public static void fill(int[] a, int val) - Parameters:
a
-val
-
-
fill
public static void fill(int[] a, int fromIndex, int toIndex, int val) - Parameters:
a
-fromIndex
-toIndex
-val
-
-
fill
public static void fill(long[] a, long val) - Parameters:
a
-val
-
-
fill
public static void fill(long[] a, int fromIndex, int toIndex, long val) - Parameters:
a
-fromIndex
-toIndex
-val
-
-
fill
public static void fill(float[] a, float val) - Parameters:
a
-val
-
-
fill
public static void fill(float[] a, int fromIndex, int toIndex, float val) - Parameters:
a
-fromIndex
-toIndex
-val
-
-
fill
public static void fill(double[] a, double val) - Parameters:
a
-val
-
-
fill
public static void fill(double[] a, int fromIndex, int toIndex, double val) - Parameters:
a
-fromIndex
-toIndex
-val
-
-
fill
- Parameters:
a
-val
-
-
fill
- Parameters:
a
-fromIndex
-toIndex
-val
-
-
fill
- Type Parameters:
T
-- Parameters:
list
-val
-
-
fill
The specified value will be added/inserted into the specified List. The List will be extended automatically if the size of the List is less than the specified toIndex.- Type Parameters:
T
-- Parameters:
list
-fromIndex
-toIndex
-val
-
-
fill
Fill the properties of the entity with random values.- Parameters:
entity
- an entity object with getter/setter method
-
fill
Fill the properties of the entity with random values.- Type Parameters:
T
-- Parameters:
entityClass
- entity class with getter/setter methods- Returns:
-
fill
Fill the properties of the entity with random values.- Type Parameters:
T
-- Parameters:
entityClass
- entity class with getter/setter methodscount
-- Returns:
-
repeat
- Type Parameters:
T
-- Parameters:
value
-n
-- Returns:
-
repeatEach
Repeats the elements in the specified Collection one by one.repeatEach(N.asList(1, 2, 3), 2) => [1, 1, 2, 2, 3, 3]
- Type Parameters:
T
-- Parameters:
c
-n
-- Returns:
-
repeatAll
repeatAll(N.asList(1, 2, 3), 2) => [1, 2, 3, 1, 2, 3]
- Type Parameters:
T
-- Parameters:
c
-n
-- Returns:
-
repeatEachToSize
Repeats the elements in the specified Collection one by one till reach the specified size.repeatEachToSize(N.asList(1, 2, 3), 5) => [1, 1, 2, 2, 3]
- Type Parameters:
T
-- Parameters:
c
-size
-- Returns:
-
repeatAllToSize
repeatAllToSize(N.asList(1, 2, 3), 5) => [1, 2, 3, 1, 2]
- Type Parameters:
T
-- Parameters:
c
-size
-- Returns:
-
copy
Copies all of the elements from one list into another. After the operation, the index of each copied element in the destination list will be identical to its index in the source list. The destination list must be at least as long as the source list. If it is longer, the remaining elements in the destination list are unaffected.This method runs in linear time.
- Type Parameters:
T
-- Parameters:
src
-dest
-- Throws:
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.- See Also:
-
copy
public static <T> void copy(List<? extends T> src, int srcPos, List<? super T> dest, int destPos, int length) - Type Parameters:
T
-- Parameters:
src
-srcPos
-dest
-destPos
-length
-
-
copy
public static void copy(boolean[] src, int srcPos, boolean[] dest, int destPos, int length) - Parameters:
src
-srcPos
-dest
-destPos
-length
-
-
copy
public static void copy(char[] src, int srcPos, char[] dest, int destPos, int length) - Parameters:
src
-srcPos
-dest
-destPos
-length
-
-
copy
public static void copy(byte[] src, int srcPos, byte[] dest, int destPos, int length) - Parameters:
src
-srcPos
-dest
-destPos
-length
-
-
copy
public static void copy(short[] src, int srcPos, short[] dest, int destPos, int length) - Parameters:
src
-srcPos
-dest
-destPos
-length
-
-
copy
public static void copy(int[] src, int srcPos, int[] dest, int destPos, int length) - Parameters:
src
-srcPos
-dest
-destPos
-length
-
-
copy
public static void copy(long[] src, int srcPos, long[] dest, int destPos, int length) - Parameters:
src
-srcPos
-dest
-destPos
-length
-
-
copy
public static void copy(float[] src, int srcPos, float[] dest, int destPos, int length) - Parameters:
src
-srcPos
-dest
-destPos
-length
-
-
copy
public static void copy(double[] src, int srcPos, double[] dest, int destPos, int length) - Parameters:
src
-srcPos
-dest
-destPos
-length
-
-
copy
- Parameters:
src
-srcPos
-dest
-destPos
-length
-
-
copy
- Parameters:
src
-srcPos
-dest
-destPos
-length
-- See Also:
-
copyOf
public static boolean[] copyOf(boolean[] original, int newLength) - Parameters:
original
-newLength
-- Returns:
- See Also:
-
copyOf
public static char[] copyOf(char[] original, int newLength) - Parameters:
original
-newLength
-- Returns:
- See Also:
-
copyOf
public static byte[] copyOf(byte[] original, int newLength) - Parameters:
original
-newLength
-- Returns:
- See Also:
-
copyOf
public static short[] copyOf(short[] original, int newLength) - Parameters:
original
-newLength
-- Returns:
- See Also:
-
copyOf
public static int[] copyOf(int[] original, int newLength) - Parameters:
original
-newLength
-- Returns:
- See Also:
-
copyOf
public static long[] copyOf(long[] original, int newLength) - Parameters:
original
-newLength
-- Returns:
- See Also:
-
copyOf
public static float[] copyOf(float[] original, int newLength) - Parameters:
original
-newLength
-- Returns:
- See Also:
-
copyOf
public static double[] copyOf(double[] original, int newLength) - Parameters:
original
-newLength
-- Returns:
- See Also:
-
copyOf
public static <T> T[] copyOf(T[] original, int newLength) - Type Parameters:
T
-- Parameters:
original
-newLength
-- Returns:
- See Also:
-
copyOf
- Type Parameters:
T
-U
-- Parameters:
original
-newLength
-newType
-- Returns:
- See Also:
-
copyOfRange
public static boolean[] copyOfRange(boolean[] original, int fromIndex, int toIndex) Copy of range.- Parameters:
original
-fromIndex
-toIndex
-- Returns:
- See Also:
-
copyOfRange
public static boolean[] copyOfRange(boolean[] original, int fromIndex, int toIndex, int step) Copy all the elements inoriginal
, throughto
-from
, bystep
.- Parameters:
original
-fromIndex
-toIndex
-step
-- Returns:
- See Also:
-
CommonUtil.copyOfRange(int[], int, int, int)
-
copyOfRange
public static char[] copyOfRange(char[] original, int fromIndex, int toIndex) Copy of range.- Parameters:
original
-fromIndex
-toIndex
-- Returns:
- See Also:
-
copyOfRange
public static char[] copyOfRange(char[] original, int fromIndex, int toIndex, int step) Copy all the elements inoriginal
, throughto
-from
, bystep
.- Parameters:
original
-fromIndex
-toIndex
-step
-- Returns:
- See Also:
-
CommonUtil.copyOfRange(int[], int, int, int)
-
copyOfRange
public static byte[] copyOfRange(byte[] original, int fromIndex, int toIndex) Copy of range.- Parameters:
original
-fromIndex
-toIndex
-- Returns:
- See Also:
-
copyOfRange
public static byte[] copyOfRange(byte[] original, int fromIndex, int toIndex, int step) Copy all the elements inoriginal
, throughto
-from
, bystep
.- Parameters:
original
-fromIndex
-toIndex
-step
-- Returns:
- See Also:
-
CommonUtil.copyOfRange(int[], int, int, int)
-
copyOfRange
public static short[] copyOfRange(short[] original, int fromIndex, int toIndex) Copy of range.- Parameters:
original
-fromIndex
-toIndex
-- Returns:
- See Also:
-
copyOfRange
public static short[] copyOfRange(short[] original, int fromIndex, int toIndex, int step) Copy all the elements inoriginal
, throughto
-from
, bystep
.- Parameters:
original
-fromIndex
-toIndex
-step
-- Returns:
- See Also:
-
CommonUtil.copyOfRange(int[], int, int, int)
-
copyOfRange
public static int[] copyOfRange(int[] original, int fromIndex, int toIndex) Copy of range.- Parameters:
original
-fromIndex
-toIndex
-- Returns:
- See Also:
-
copyOfRange
public static int[] copyOfRange(int[] original, int fromIndex, int toIndex, int step) Copy all the elements inoriginal
, throughto
-from
, bystep
.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]
- Parameters:
original
-fromIndex
-toIndex
-step
-- Returns:
-
copyOfRange
public static long[] copyOfRange(long[] original, int fromIndex, int toIndex) Copy of range.- Parameters:
original
-fromIndex
-toIndex
-- Returns:
- See Also:
-
copyOfRange
public static long[] copyOfRange(long[] original, int fromIndex, int toIndex, int step) Copy all the elements inoriginal
, throughto
-from
, bystep
.- Parameters:
original
-fromIndex
-toIndex
-step
-- Returns:
- See Also:
-
CommonUtil.copyOfRange(int[], int, int, int)
-
copyOfRange
public static float[] copyOfRange(float[] original, int fromIndex, int toIndex) Copy of range.- Parameters:
original
-fromIndex
-toIndex
-- Returns:
- See Also:
-
copyOfRange
public static float[] copyOfRange(float[] original, int fromIndex, int toIndex, int step) Copy all the elements inoriginal
, throughto
-from
, bystep
.- Parameters:
original
-fromIndex
-toIndex
-step
-- Returns:
- See Also:
-
CommonUtil.copyOfRange(int[], int, int, int)
-
copyOfRange
public static double[] copyOfRange(double[] original, int fromIndex, int toIndex) Copy of range.- Parameters:
original
-fromIndex
-toIndex
-- Returns:
- See Also:
-
copyOfRange
public static double[] copyOfRange(double[] original, int fromIndex, int toIndex, int step) Copy all the elements inoriginal
, throughto
-from
, bystep
.- Parameters:
original
-fromIndex
-toIndex
-step
-- Returns:
- See Also:
-
CommonUtil.copyOfRange(int[], int, int, int)
-
copyOfRange
public static <T> T[] copyOfRange(T[] original, int fromIndex, int toIndex) Copy of range.- Type Parameters:
T
-- Parameters:
original
-fromIndex
-toIndex
-- Returns:
- See Also:
-
Arrays#copyOfRange(T[], int, int)
-
copyOfRange
public static <T> T[] copyOfRange(T[] original, int fromIndex, int toIndex, int step) Copy all the elements inoriginal
, throughto
-from
, bystep
.- Type Parameters:
T
-- Parameters:
original
-fromIndex
-toIndex
-step
-- Returns:
-
copyOfRange
public static <T,U> T[] copyOfRange(U[] original, int fromIndex, int toIndex, Class<? extends T[]> newType) - Type Parameters:
T
-U
-- Parameters:
original
-fromIndex
-toIndex
-newType
-- Returns:
-
copyOfRange
public static <T> T[] copyOfRange(T[] original, int fromIndex, int toIndex, int step, Class<? extends T[]> newType) Copy all the elements inoriginal
, throughto
-from
, bystep
.- Type Parameters:
T
-- Parameters:
original
-fromIndex
-toIndex
-step
-newType
-- Returns:
- See Also:
-
CommonUtil.copyOfRange(int[], int, int, int)
-
copyOfRange
Copy of range.- Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-- Returns:
- See Also:
-
Arrays#copyOfRange(T[], int, int)
-
copyOfRange
Copy all the elements inoriginal
, throughto
-from
, bystep
.- Type Parameters:
T
-- Parameters:
c
-fromIndex
-toIndex
-step
-- Returns:
-
copyOfRange
Copy of range.- Parameters:
str
-fromIndex
-toIndex
-- Returns:
-
copyOfRange
Copy of range.- Parameters:
str
-fromIndex
-toIndex
-step
-- Returns:
- See Also:
-
CommonUtil.copyOfRange(int[], int, int, int)
-
clone
public static boolean[] clone(boolean[] original) Clone the original array.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static char[] clone(char[] original) Clone the original array.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static byte[] clone(byte[] original) Clone the original array.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static short[] clone(short[] original) Clone the original array.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static int[] clone(int[] original) Clone the original array.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static long[] clone(long[] original) Clone the original array.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static float[] clone(float[] original) Clone the original array.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static double[] clone(double[] original) Clone the original array.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static <T> T[] clone(T[] original) Clone the original array.null
is returned if the input array isnull
.- Type Parameters:
T
-- Parameters:
original
-- Returns:
-
clone
public static boolean[][] clone(boolean[][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static char[][] clone(char[][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static byte[][] clone(byte[][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static short[][] clone(short[][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static int[][] clone(int[][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static long[][] clone(long[][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static float[][] clone(float[][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static double[][] clone(double[][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static <T> T[][] clone(T[][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Type Parameters:
T
-- Parameters:
original
-- Returns:
-
clone
public static boolean[][][] clone(boolean[][][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static char[][][] clone(char[][][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static byte[][][] clone(byte[][][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static short[][][] clone(short[][][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static int[][][] clone(int[][][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static long[][][] clone(long[][][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static float[][][] clone(float[][][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static double[][][] clone(double[][][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Parameters:
original
-- Returns:
-
clone
public static <T> T[][][] clone(T[][][] original) Clone the original array and its sub arrays.null
is returned if the input array isnull
.- Type Parameters:
T
-- Parameters:
original
-- Returns:
-
copy
- Type Parameters:
T
-- Parameters:
newType
-a
-- Returns:
-
copy
- Type Parameters:
T
-- Parameters:
newType
-a
-- Returns:
-
copy
- Type Parameters:
T
-- Parameters:
newType
-a
-- Returns:
-
isSorted
public static boolean isSorted(boolean[] a) -
isSorted
public static boolean isSorted(boolean[] a, int fromIndex, int toIndex) -
isSorted
public static boolean isSorted(char[] a) -
isSorted
public static boolean isSorted(char[] a, int fromIndex, int toIndex) -
isSorted
public static boolean isSorted(byte[] a) -
isSorted
public static boolean isSorted(byte[] a, int fromIndex, int toIndex) -
isSorted
public static boolean isSorted(short[] a) -
isSorted
public static boolean isSorted(short[] a, int fromIndex, int toIndex) -
isSorted
public static boolean isSorted(int[] a) -
isSorted
public static boolean isSorted(int[] a, int fromIndex, int toIndex) -
isSorted
public static boolean isSorted(long[] a) -
isSorted
public static boolean isSorted(long[] a, int fromIndex, int toIndex) -
isSorted
public static boolean isSorted(float[] a) -
isSorted
public static boolean isSorted(float[] a, int fromIndex, int toIndex) -
isSorted
public static boolean isSorted(double[] a) -
isSorted
public static boolean isSorted(double[] a, int fromIndex, int toIndex) -
isSorted
-
isSorted
-
isSorted
-
isSorted
-
isSorted
-
isSorted
public static <T extends Comparable<? super T>> boolean isSorted(Collection<T> c, int fromIndex, int toIndex) -
isSorted
-
isSorted
public static <T> boolean isSorted(Collection<T> c, int fromIndex, int toIndex, Comparator<? super T> cmp) -
sort
public static void sort(boolean[] a) - Parameters:
a
-
-
sort
public static void sort(char[] a) - Parameters:
a
-
-
sort
public static void sort(char[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
sort
public static void sort(byte[] a) - Parameters:
a
-
-
sort
public static void sort(byte[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
sort
public static void sort(short[] a) - Parameters:
a
-
-
sort
public static void sort(short[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
sort
public static void sort(int[] a) - Parameters:
a
-
-
sort
public static void sort(int[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
sort
public static void sort(long[] a) - Parameters:
a
-
-
sort
public static void sort(long[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
sort
public static void sort(float[] a) - Parameters:
a
-
-
sort
public static void sort(float[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
sort
public static void sort(double[] a) - Parameters:
a
-
-
sort
public static void sort(double[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
sort
- Parameters:
a
-
-
sort
- Parameters:
a
-fromIndex
-toIndex
-
-
sort
- Type Parameters:
T
-- Parameters:
a
-cmp
-
-
sort
- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-cmp
-
-
sort
- Type Parameters:
T
-- Parameters:
list
-
-
sort
public static <T extends Comparable<? super T>> void sort(List<? extends T> list, int fromIndex, int toIndex) - Type Parameters:
T
-- Parameters:
list
-fromIndex
-toIndex
-
-
sort
- Type Parameters:
T
-- Parameters:
list
-cmp
-
-
sort
public static <T> void sort(List<? extends T> list, int fromIndex, int toIndex, Comparator<? super T> cmp) - Type Parameters:
T
-- Parameters:
list
-fromIndex
-toIndex
-cmp
-
-
sortBy
public static <T,U extends Comparable<? super U>> void sortBy(T[] a, Function<? super T, ? extends U> keyMapper) - Type Parameters:
T
-U
-- Parameters:
a
-keyMapper
-
-
sortBy
public static <T,U extends Comparable<? super U>> void sortBy(List<? extends T> list, Function<? super T, ? extends U> keyMapper) - Type Parameters:
T
-U
-- Parameters:
list
-keyMapper
-
-
sortByInt
Sort by int.- Type Parameters:
T
-- Parameters:
a
-keyMapper
-
-
sortByInt
Sort by int.- Type Parameters:
T
-- Parameters:
list
-keyMapper
-
-
sortByLong
Sort by long.- Type Parameters:
T
-- Parameters:
a
-keyMapper
-
-
sortByLong
Sort by long.- Type Parameters:
T
-- Parameters:
list
-keyMapper
-
-
sortByFloat
Sort by float.- Type Parameters:
T
-- Parameters:
a
-keyMapper
-
-
sortByFloat
Sort by float.- Type Parameters:
T
-- Parameters:
list
-keyMapper
-
-
sortByDouble
Sort by double.- Type Parameters:
T
-- Parameters:
a
-keyMapper
-
-
sortByDouble
Sort by double.- Type Parameters:
T
-- Parameters:
list
-keyMapper
-
-
parallelSort
public static void parallelSort(char[] a) - Parameters:
a
-
-
parallelSort
public static void parallelSort(char[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
parallelSort
public static void parallelSort(byte[] a) - Parameters:
a
-
-
parallelSort
public static void parallelSort(byte[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
parallelSort
public static void parallelSort(short[] a) - Parameters:
a
-
-
parallelSort
public static void parallelSort(short[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
parallelSort
public static void parallelSort(int[] a) - Parameters:
a
-
-
parallelSort
public static void parallelSort(int[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
parallelSort
public static void parallelSort(long[] a) - Parameters:
a
-
-
parallelSort
public static void parallelSort(long[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
parallelSort
public static void parallelSort(float[] a) - Parameters:
a
-
-
parallelSort
public static void parallelSort(float[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
parallelSort
public static void parallelSort(double[] a) - Parameters:
a
-
-
parallelSort
public static void parallelSort(double[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
parallelSort
- Parameters:
a
-
-
parallelSort
public static <T extends Comparable<? super T>> void parallelSort(T[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
parallelSort
- Type Parameters:
T
-- Parameters:
a
-cmp
-
-
parallelSort
- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-cmp
-
-
parallelSort
- Type Parameters:
T
-- Parameters:
list
-
-
parallelSort
public static <T extends Comparable<? super T>> void parallelSort(List<? extends T> list, int fromIndex, int toIndex) - Type Parameters:
T
-- Parameters:
list
-fromIndex
-toIndex
-
-
parallelSort
- Type Parameters:
T
-- Parameters:
list
-cmp
-
-
parallelSort
public static <T> void parallelSort(List<? extends T> list, int fromIndex, int toIndex, Comparator<? super T> cmp) - Type Parameters:
T
-- Parameters:
list
-fromIndex
-toIndex
-cmp
-
-
parallelSortBy
public static <T,U extends Comparable<? super U>> void parallelSortBy(T[] a, Function<? super T, ? extends U> keyMapper) Parallel sort by.- Type Parameters:
T
-U
-- Parameters:
a
-keyMapper
-
-
parallelSortBy
public static <T,U extends Comparable<? super U>> void parallelSortBy(List<? extends T> list, Function<? super T, ? extends U> keyMapper) Parallel sort by.- Type Parameters:
T
-U
-- Parameters:
list
-keyMapper
-
-
parallelSortByInt
Parallel sort by int.- Type Parameters:
T
-- Parameters:
a
-keyMapper
-
-
parallelSortByInt
public static <T> void parallelSortByInt(List<? extends T> list, ToIntFunction<? super T> keyMapper) Parallel sort by int.- Type Parameters:
T
-- Parameters:
list
-keyMapper
-
-
parallelSortByLong
Parallel sort by long.- Type Parameters:
T
-- Parameters:
a
-keyMapper
-
-
parallelSortByLong
public static <T> void parallelSortByLong(List<? extends T> list, ToLongFunction<? super T> keyMapper) Parallel sort by long.- Type Parameters:
T
-- Parameters:
list
-keyMapper
-
-
parallelSortByFloat
Parallel sort by float.- Type Parameters:
T
-- Parameters:
a
-keyMapper
-
-
parallelSortByFloat
public static <T> void parallelSortByFloat(List<? extends T> list, ToFloatFunction<? super T> keyMapper) Parallel sort by float.- Type Parameters:
T
-- Parameters:
list
-keyMapper
-
-
parallelSortByDouble
Parallel sort by double.- Type Parameters:
T
-- Parameters:
a
-keyMapper
-
-
parallelSortByDouble
public static <T> void parallelSortByDouble(List<? extends T> list, ToDoubleFunction<? super T> keyMapper) Parallel sort by double.- Type Parameters:
T
-- Parameters:
list
-keyMapper
-
-
reverseSort
public static void reverseSort(boolean[] a) - Parameters:
a
-
-
reverseSort
public static void reverseSort(char[] a) - Parameters:
a
-
-
reverseSort
public static void reverseSort(char[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
reverseSort
public static void reverseSort(byte[] a) - Parameters:
a
-
-
reverseSort
public static void reverseSort(byte[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
reverseSort
public static void reverseSort(short[] a) - Parameters:
a
-
-
reverseSort
public static void reverseSort(short[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
reverseSort
public static void reverseSort(int[] a) - Parameters:
a
-
-
reverseSort
public static void reverseSort(int[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
reverseSort
public static void reverseSort(long[] a) - Parameters:
a
-
-
reverseSort
public static void reverseSort(long[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
reverseSort
public static void reverseSort(float[] a) - Parameters:
a
-
-
reverseSort
public static void reverseSort(float[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
reverseSort
public static void reverseSort(double[] a) - Parameters:
a
-
-
reverseSort
public static void reverseSort(double[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
reverseSort
- Parameters:
a
-
-
reverseSort
- Parameters:
a
-fromIndex
-toIndex
-
-
reverseSort
- Type Parameters:
T
-- Parameters:
list
-
-
reverseSort
public static <T extends Comparable<? super T>> void reverseSort(List<? extends T> list, int fromIndex, int toIndex) - Type Parameters:
T
-- Parameters:
list
-fromIndex
-toIndex
-
-
reverseSortBy
public static <T,U extends Comparable<? super U>> void reverseSortBy(T[] a, Function<? super T, ? extends U> keyMapper) Reverse sort by.- Type Parameters:
T
-U
-- Parameters:
a
-keyMapper
-
-
reverseSortBy
public static <T,U extends Comparable<? super U>> void reverseSortBy(List<? extends T> list, Function<? super T, ? extends U> keyMapper) Reverse sort by.- Type Parameters:
T
-U
-- Parameters:
list
-keyMapper
-
-
bucketSort
public static void bucketSort(int[] a) - Parameters:
a
-
-
bucketSort
public static void bucketSort(int[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
bucketSort
public static void bucketSort(long[] a) - Parameters:
a
-
-
bucketSort
public static void bucketSort(long[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
bucketSort
public static void bucketSort(float[] a) - Parameters:
a
-
-
bucketSort
public static void bucketSort(float[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
bucketSort
public static void bucketSort(double[] a) - Parameters:
a
-
-
bucketSort
public static void bucketSort(double[] a, int fromIndex, int toIndex) - Parameters:
a
-fromIndex
-toIndex
-
-
bucketSort
Note: All the objects with same value will be replaced by first element with the same value.- Parameters:
a
-
-
bucketSort
Note: All the objects with same value will be replaced by first element with the same value.- Parameters:
a
- the elements in the array must implements theComparable
interface.fromIndex
-toIndex
-
-
bucketSort
- Type Parameters:
T
-- Parameters:
a
-cmp
-
-
bucketSort
Note: All the objects with same value will be replaced by first element with the same value.- Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-cmp
-
-
bucketSort
Note: All the objects with same value will be replaced by first element with the same value.- Type Parameters:
T
-- Parameters:
list
-
-
bucketSort
public static <T extends Comparable<? super T>> void bucketSort(List<T> list, int fromIndex, int toIndex) Note: All the objects with same value will be replaced by first element with the same value.- Type Parameters:
T
-- Parameters:
list
-fromIndex
-toIndex
-
-
bucketSort
Note: All the objects with same value will be replaced by first element with the same value.- Type Parameters:
T
-- Parameters:
list
-cmp
-
-
bucketSort
public static <T> void bucketSort(List<? extends T> list, int fromIndex, int toIndex, Comparator<? super T> cmp) Note: All the objects with same value will be replaced by first element with the same value.- Type Parameters:
T
-- Parameters:
list
-fromIndex
-toIndex
-cmp
-
-
bucketSortBy
public static <T,U extends Comparable<? super U>> void bucketSortBy(T[] a, Function<? super T, ? extends U> keyMapper) Bucket sort by.- Type Parameters:
T
-U
-- Parameters:
a
-keyMapper
-
-
bucketSortBy
public static <T,U extends Comparable<? super U>> void bucketSortBy(List<? extends T> list, Function<? super T, ? extends U> keyMapper) Bucket sort by.- Type Parameters:
T
-U
-- Parameters:
list
-keyMapper
-
-
binarySearch
public static int binarySearch(char[] a, char valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
binarySearch
public static int binarySearch(char[] a, int fromIndex, int toIndex, char valueToFind) - Parameters:
a
-fromIndex
-toIndex
-valueToFind
-- Returns:
-
binarySearch
public static int binarySearch(byte[] a, byte valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
binarySearch
public static int binarySearch(byte[] a, int fromIndex, int toIndex, byte valueToFind) - Parameters:
a
-fromIndex
-toIndex
-valueToFind
-- Returns:
-
binarySearch
public static int binarySearch(short[] a, short valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
binarySearch
public static int binarySearch(short[] a, int fromIndex, int toIndex, short valueToFind) - Parameters:
a
-fromIndex
-toIndex
-valueToFind
-- Returns:
-
binarySearch
public static int binarySearch(int[] a, int valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
binarySearch
public static int binarySearch(int[] a, int fromIndex, int toIndex, int valueToFind) - Parameters:
a
-fromIndex
-toIndex
-valueToFind
-- Returns:
-
binarySearch
public static int binarySearch(long[] a, long valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
binarySearch
public static int binarySearch(long[] a, int fromIndex, int toIndex, long valueToFind) - Parameters:
a
-fromIndex
-toIndex
-valueToFind
-- Returns:
-
binarySearch
public static int binarySearch(float[] a, float valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
binarySearch
public static int binarySearch(float[] a, int fromIndex, int toIndex, float valueToFind) - Parameters:
a
-fromIndex
-toIndex
-valueToFind
-- Returns:
-
binarySearch
public static int binarySearch(double[] a, double valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
binarySearch
public static int binarySearch(double[] a, int fromIndex, int toIndex, double valueToFind) - Parameters:
a
-fromIndex
-toIndex
-valueToFind
-- Returns:
-
binarySearch
- Parameters:
a
-valueToFind
-- Returns:
-
binarySearch
- Parameters:
a
-fromIndex
-toIndex
-valueToFind
-- Returns:
-
binarySearch
- Type Parameters:
T
-- Parameters:
a
-valueToFind
-cmp
-- Returns:
-
binarySearch
public static <T> int binarySearch(T[] a, int fromIndex, int toIndex, T valueToFind, Comparator<? super T> cmp) - Type Parameters:
T
-- Parameters:
a
-fromIndex
-toIndex
-valueToFind
-cmp
-- Returns:
-
binarySearch
public static <T extends Comparable<? super T>> int binarySearch(List<? extends T> list, T valueToFind) - Type Parameters:
T
-- Parameters:
list
-valueToFind
-- Returns:
-
binarySearch
public static <T extends Comparable<? super T>> int binarySearch(List<? extends T> list, int fromIndex, int toIndex, T valueToFind) - Type Parameters:
T
-- Parameters:
list
-fromIndex
-toIndex
-valueToFind
-- Returns:
-
binarySearch
public static <T> int binarySearch(List<? extends T> list, T valueToFind, Comparator<? super T> cmp) - Type Parameters:
T
-- Parameters:
list
-valueToFind
-cmp
-- Returns:
-
binarySearch
public static <T> int binarySearch(List<? extends T> list, int fromIndex, int toIndex, T valueToFind, Comparator<? super T> cmp) - Type Parameters:
T
-- Parameters:
list
-fromIndex
-toIndex
-valueToFind
-cmp
-- Returns:
- See Also:
-
binarySearchBy
public static <T,U extends Comparable<? super U>> int binarySearchBy(T[] a, T valueToFind, Function<? super T, ? extends U> valueToFindMapper) Binary search by.- Type Parameters:
T
-U
-- Parameters:
a
-valueToFind
-valueToFindMapper
-- Returns:
-
binarySearchBy
public static <T,U extends Comparable<? super U>> int binarySearchBy(List<? extends T> list, T valueToFind, Function<? super T, ? extends U> valueToFindMapper) Binary search by.- Type Parameters:
T
-U
-- Parameters:
list
-valueToFind
-valueToFindMapper
-- Returns:
-
indexOf
public static int indexOf(boolean[] a, boolean valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
indexOf
public static int indexOf(boolean[] a, int startIndex, boolean valueToFind) - Parameters:
a
-startIndex
- the index from which to start the search.valueToFind
-- Returns:
-
indexOf
public static int indexOf(char[] a, char valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
indexOf
public static int indexOf(char[] a, int startIndex, char valueToFind) - Parameters:
a
-startIndex
- the index from which to start the search.valueToFind
-- Returns:
-
indexOf
public static int indexOf(byte[] a, byte valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
indexOf
public static int indexOf(byte[] a, int startIndex, byte valueToFind) - Parameters:
a
-startIndex
- the index from which to start the search.valueToFind
-- Returns:
-
indexOf
public static int indexOf(short[] a, short valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
indexOf
public static int indexOf(short[] a, int startIndex, short valueToFind) - Parameters:
a
-startIndex
- the index from which to start the search.valueToFind
-- Returns:
-
indexOf
public static int indexOf(int[] a, int valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
indexOf
public static int indexOf(int[] a, int startIndex, int valueToFind) - Parameters:
a
-startIndex
- the index from which to start the search.valueToFind
-- Returns:
-
indexOf
public static int indexOf(long[] a, long valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
indexOf
public static int indexOf(long[] a, int startIndex, long valueToFind) - Parameters:
a
-startIndex
- the index from which to start the search.valueToFind
-- Returns:
-
indexOf
public static int indexOf(float[] a, float valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
indexOf
public static int indexOf(float[] a, int startIndex, float valueToFind) - Parameters:
a
-startIndex
- the index from which to start the search.valueToFind
-- Returns:
-
indexOf
public static int indexOf(double[] a, double valueToFind) - Parameters:
a
-valueToFind
-- Returns:
-
indexOf
public static int indexOf(double[] a, int startIndex, double valueToFind) - Parameters:
a
-startIndex
- the index from which to start the search.valueToFind
-- Returns:
-
indexOf
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 anull
input array.- Parameters:
a
- the array to search through for the object, may benull
valueToFind
-tolerance
- tolerance of the search- Returns:
- the index of the value within the array,
INDEX_NOT_FOUND
(-1
) if not found ornull
array input
-
indexOf
public 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 anull
input array.A negative startIndex is treated as zero. A startIndex larger than the array length will return
INDEX_NOT_FOUND
(-1
).- Parameters:
a
- the array to search through for the object, may benull
valueToFind
-startIndex
- the index to start searching attolerance
- tolerance of the search- Returns:
- the index of the value within the array,
INDEX_NOT_FOUND
(-1
) if not found ornull
array input
-
indexOf
- Parameters:
a
-valueToFind
-- Returns:
-
indexOf
- Parameters:
a
-startIndex
- the index from which to start the search.valueToFind
-- Returns:
-
indexOf
- Parameters:
c
-valueToFind
-- Returns:
-
indexOf
- Parameters:
list
-startIndex
- the index from which to start the search.valueToFind
-- Returns:
-
indexOf
-
indexOfIgnoreCase
-
indexOf
-
indexOfSubList
Index of sub list.- Parameters:
sourceList
-subListToFind
-- Returns:
- See Also:
-
lastIndexOf
public static int lastIndexOf(boolean[] a, boolean valueToFind) Last index of.- Parameters:
a
-valueToFind
-- Returns:
-
lastIndexOf
public static int lastIndexOf(boolean[] a, int startIndexFromBack, boolean valueToFind) Last index of.- Parameters:
a
-startIndexFromBack
- the start index to traverse backwards fromvalueToFind
-- Returns:
-
lastIndexOf
public static int lastIndexOf(char[] a, char valueToFind) Last index of.- Parameters:
a
-valueToFind
-- Returns:
-
lastIndexOf
public static int lastIndexOf(char[] a, int startIndexFromBack, char valueToFind) Last index of.- Parameters:
a
-startIndexFromBack
- the start index to traverse backwards fromvalueToFind
-- Returns:
-
lastIndexOf
public static int lastIndexOf(byte[] a, byte valueToFind) Last index of.- Parameters:
a
-valueToFind
-- Returns:
-
lastIndexOf
public static int lastIndexOf(byte[] a, int startIndexFromBack, byte valueToFind) Last index of.- Parameters:
a
-startIndexFromBack
- the start index to traverse backwards fromvalueToFind
-- Returns:
-
lastIndexOf
public static int lastIndexOf(short[] a, short valueToFind) Last index of.- Parameters:
a
-valueToFind
-- Returns:
-
lastIndexOf
public static int lastIndexOf(short[] a, int startIndexFromBack, short valueToFind) Last index of.- Parameters:
a
-startIndexFromBack
- the start index to traverse backwards fromvalueToFind
-- Returns:
-
lastIndexOf
public static int lastIndexOf(int[] a, int valueToFind) Last index of.- Parameters:
a
-valueToFind
-- Returns:
-
lastIndexOf
public static int lastIndexOf(int[] a, int startIndexFromBack, int valueToFind) Last index of.- Parameters:
a
-startIndexFromBack
- the start index to traverse backwards fromvalueToFind
-- Returns:
-
lastIndexOf
public static int lastIndexOf(long[] a, long valueToFind) Last index of.- Parameters:
a
-valueToFind
-- Returns:
-
lastIndexOf
public static int lastIndexOf(long[] a, int startIndexFromBack, long valueToFind) Last index of.- Parameters:
a
-startIndexFromBack
- the start index to traverse backwards fromvalueToFind
-- Returns:
-
lastIndexOf
public static int lastIndexOf(float[] a, float valueToFind) Last index of.- Parameters:
a
-valueToFind
-- Returns:
-
lastIndexOf
public static int lastIndexOf(float[] a, int startIndexFromBack, float valueToFind) Last index of.- Parameters:
a
-startIndexFromBack
- the start index to traverse backwards fromvalueToFind
-- Returns:
-
lastIndexOf
public static int lastIndexOf(double[] a, double valueToFind) Last index of.- Parameters:
a
-valueToFind
-- Returns:
-
lastIndexOf
public static int lastIndexOf(double[] a, int startIndexFromBack, double valueToFind) Last index of.- Parameters:
a
-startIndexFromBack
- the start index to traverse backwards fromvalueToFind
-- Returns:
-
lastIndexOf
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 anull
input array.- Parameters:
a
- the array to search through for the object, may benull
valueToFind
-tolerance
- tolerance of the search- Returns:
- the index of the value within the array,
INDEX_NOT_FOUND
(-1
) if not found ornull
array input
-
lastIndexOf
public 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 anull
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.- Parameters:
a
- the array to traverse for looking for the object, may benull
valueToFind
-startIndexFromBack
- the start index to traverse backwards fromtolerance
- search for value within plus/minus this amount- Returns:
- the last index of the value within the array,
INDEX_NOT_FOUND
(-1
) if not found ornull
array input
-
lastIndexOf
Last index of.- Parameters:
a
-valueToFind
-- Returns:
-
lastIndexOf
Last index of.- Parameters:
a
-startIndexFromBack
- the start index to traverse backwards fromvalueToFind
-- Returns:
-
lastIndexOf
Last index of.- Parameters:
c
-valueToFind
-- Returns:
-
lastIndexOf
Last index of.- Parameters:
c
-startIndexFromBack
- the start index to traverse backwards fromvalueToFind
-- Returns:
-
lastIndexOfIgnoreCase
-
lastIndexOfSubList
Last index of sub list.- Parameters:
sourceList
-subListToFind
-- Returns:
- See Also:
-
findFirstIndex
public static <T,E extends Exception> u.OptionalInt findFirstIndex(T[] a, Throwables.Predicate<? super T, E> predicate) throws EFind first index.- Type Parameters:
T
-E
-- Parameters:
a
-predicate
-- Returns:
- the optional int
- Throws:
E
- the e
-
findFirstIndex
public static <T,U, u.OptionalInt findFirstIndexE extends Exception> (T[] a, U valueToFind, Throwables.BiPredicate<? super T, ? super U, throws EE> predicate) Find first index.- Type Parameters:
T
-U
-E
-- Parameters:
a
-predicate
-valueToFind
-- Returns:
- the optional int
- Throws:
E
- the e
-
findFirstIndex
public static <T,E extends Exception> u.OptionalInt findFirstIndex(Collection<? extends T> c, Throwables.Predicate<? super T, E> predicate) throws EFind first index.- Type Parameters:
T
-E
-- Parameters:
c
-predicate
-- Returns:
- the optional int
- Throws:
E
- the e
-
findFirstIndex
public static <T,U, u.OptionalInt findFirstIndexE extends Exception> (Collection<? extends T> c, U valueToFind, Throwables.BiPredicate<? super T, ? super U, throws EE> predicate) Find first index.- Type Parameters:
T
-U
-E
-- Parameters:
c
-valueToFind
-predicate
-- Returns:
- the optional int
- Throws:
E
- the e
-
findLastIndex
public static <T,E extends Exception> u.OptionalInt findLastIndex(T[] a, Throwables.Predicate<? super T, E> predicate) throws EFind last index.- Type Parameters:
T
-E
-- Parameters:
a
-predicate
-- Returns:
- the optional int
- Throws:
E
- the e
-
findLastIndex
public static <T,U, u.OptionalInt findLastIndexE extends Exception> (T[] a, U valueToFind, Throwables.BiPredicate<? super T, ? super U, throws EE> predicate) Find last index.- Type Parameters:
T
-U
-E
-- Parameters:
a
-valueToFind
-predicate
-- Returns:
- the optional int
- Throws:
E
- the e
-
findLastIndex
public static <T,E extends Exception> u.OptionalInt findLastIndex(Collection<? extends T> c, Throwables.Predicate<? super T, E> predicate) throws EFind last index.- Type Parameters:
T
-E
-- Parameters:
c
-predicate
-- Returns:
- the optional int
- Throws:
E
- the e
-
findLastIndex
public static <T,U, u.OptionalInt findLastIndexE extends Exception> (Collection<? extends T> c, U valueToFind, Throwables.BiPredicate<? super T, ? super U, throws EE> predicate) - Type Parameters:
T
-U
-E
-- Parameters:
c
-valueToFind
-predicate
-- Returns:
- Throws:
E
-
gtAndLt(Comparable, Comparable, Comparable)