Copyright© 2008-2022 Sitevision AB, all rights reserved.
@Requireable(value="ArraysInstance") public interface ArraysInstance
java.util.Arrays
class that delegates all method calls to the corresponding Arrays
method.
Note! Method documentations in this interface are only excerpts. For full documentation, see official java.util.Arrays
Javadoc.
Tip! You would typically use InstanceCreatorUtil
to create array instances.
An instance of the Sitevision class implementing this interface can be obtained via InstanceCreatorUtil.getArraysInstance()
.
See InstanceCreatorUtil
for how to obtain an instance of the InstanceCreatorUtil
interface.
Modifier and Type | Method and Description |
---|---|
<T> List<T> |
asList(T... anArray)
Returns a fixed-size list backed by the specified array.
|
int |
binarySearch(byte[] anArray,
byte aKey)
Searches the specified array of bytes for the specified value using the binary search algorithm.
|
int |
binarySearch(byte[] anArray,
int aFromIndex,
int aToIndex,
byte aKey)
Searches a range of the specified array of bytes for the specified value using the binary search algorithm.
|
int |
binarySearch(char[] anArray,
char aKey)
Searches the specified array of chars for the specified value using the binary search algorithm.
|
int |
binarySearch(char[] anArray,
int aFromIndex,
int aToIndex,
char aKey)
Searches a range of the specified array of chars for the specified value using the binary search algorithm.
|
int |
binarySearch(double[] anArray,
double aKey)
Searches the specified array of doubles for the specified value using the binary search algorithm.
|
int |
binarySearch(double[] anArray,
int aFromIndex,
int aToIndex,
double aKey)
Searches a range of the specified array of doubles for the specified value using the binary search algorithm.
|
int |
binarySearch(float[] anArray,
float aKey)
Searches the specified array of floats for the specified value using the binary search algorithm.
|
int |
binarySearch(float[] anArray,
int aFromIndex,
int aToIndex,
float aKey)
Searches a range of the specified array of floats for the specified value using the binary search algorithm.
|
int |
binarySearch(int[] anArray,
int aKey)
Searches the specified array of ints for the specified value using the binary search algorithm.
|
int |
binarySearch(int[] anArray,
int aFromIndex,
int aToIndex,
int aKey)
Searches a range of the specified array of ints for the specified value using the binary search algorithm.
|
int |
binarySearch(long[] anArray,
int aFromIndex,
int aToIndex,
long aKey)
Searches a range of the specified array of longs for the specified value using the binary search algorithm.
|
int |
binarySearch(long[] anArray,
long aKey)
Searches the specified array of longs for the specified value using the binary search algorithm.
|
int |
binarySearch(Object[] anArray,
int aFromIndex,
int aToIndex,
Object aKey)
Searches a range of the specified array for the specified object using the binary search algorithm.
|
int |
binarySearch(Object[] anArray,
Object aKey)
Searches the specified array for the specified object using the binary search algorithm.
|
int |
binarySearch(short[] anArray,
int aFromIndex,
int aToIndex,
short aKey)
Searches a range of the specified array of shorts for the specified value using the binary search algorithm.
|
int |
binarySearch(short[] anArray,
short aKey)
Searches the specified array of shorts for the specified value using the binary search algorithm.
|
<T> int |
binarySearch(T[] anArray,
int aFromIndex,
int aToIndex,
T aKey,
Comparator<? super T> aComparator)
Searches a range of the specified array for the specified object using the binary search algorithm.
|
<T> int |
binarySearch(T[] anArray,
T aKey,
Comparator<? super T> aComparator)
Searches the specified array for the specified object using the binary search algorithm.
|
boolean[] |
copyOf(boolean[] anArray,
int aNewLength)
Copies the specified array, truncating or padding with false (if necessary) so the copy has the specified length.
|
byte[] |
copyOf(byte[] anArray,
int aNewLength)
Copies the specified array, truncating or padding with zeros (if necessary)
so the copy has the specified length.
|
char[] |
copyOf(char[] anArray,
int aNewLength)
Copies the specified array, truncating or padding with null characters (if necessary) so the copy has the specified length.
|
double[] |
copyOf(double[] anArray,
int aNewLength)
Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length.
|
float[] |
copyOf(float[] anArray,
int aNewLength)
Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length.
|
int[] |
copyOf(int[] anArray,
int aNewLength)
Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length.
|
long[] |
copyOf(long[] anArray,
int aNewLength)
Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length.
|
short[] |
copyOf(short[] anArray,
int aNewLength)
Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length.
|
<T> T[] |
copyOf(T[] anArray,
int aNewLength)
Copies the specified array, truncating or padding with nulls (if necessary) so the copy has the specified length.
|
<T,U> T[] |
copyOf(U[] anArray,
int aNewLength,
Class<? extends T[]> aNewType)
Copies the specified array, truncating or padding with nulls (if necessary)
so the copy has the specified length.
|
boolean[] |
copyOfRange(boolean[] anArray,
int aFromIndex,
int aToIndex)
Copies the specified range of the specified array into a new array.
|
byte[] |
copyOfRange(byte[] anArray,
int aFromIndex,
int aToIndex)
Copies the specified range of the specified array into a new array.
|
char[] |
copyOfRange(char[] anArray,
int aFromIndex,
int aToIndex)
Copies the specified range of the specified array into a new array.
|
double[] |
copyOfRange(double[] anArray,
int aFromIndex,
int aToIndex)
Copies the specified range of the specified array into a new array.
|
float[] |
copyOfRange(float[] anArray,
int aFromIndex,
int aToIndex)
Copies the specified range of the specified array into a new array.
|
int[] |
copyOfRange(int[] anArray,
int aFromIndex,
int aToIndex)
Copies the specified range of the specified array into a new array.
|
long[] |
copyOfRange(long[] anArray,
int aFromIndex,
int aToIndex)
Copies the specified range of the specified array into a new array.
|
short[] |
copyOfRange(short[] anArray,
int aFromIndex,
int aToIndex)
Copies the specified range of the specified array into a new array.
|
<T> T[] |
copyOfRange(T[] anArray,
int aFromIndex,
int aToIndex)
Copies the specified range of the specified array into a new array.
|
<T,U> T[] |
copyOfRange(U[] anArray,
int aFromIndex,
int aToIndex,
Class<? extends T[]> aNewType)
Copies the specified range of the specified array into a new array.
|
boolean |
deepEquals(Object[] anArray,
Object[] anAnotherArray)
Returns true if the two specified arrays are deeply equal to one another.
|
int |
deepHashCode(Object[] anArray)
Returns a hash code based on the "deep contents" of the specified array.
|
String |
deepToString(Object[] anArray)
Returns a string representation of the "deep contents" of the specified array.
|
boolean |
equals(boolean[] anArray,
boolean[] anAnotherArray)
Returns true if the two specified arrays of booleans are equal to one another.
|
boolean |
equals(byte[] anArray,
byte[] anAnotherArray)
Returns true if the two specified arrays of bytes are equal to one another.
|
boolean |
equals(char[] anArray,
char[] anAnotherArray)
Returns true if the two specified arrays of chars are equal to one another.
|
boolean |
equals(double[] anArray,
double[] anAnotherArray)
Returns true if the two specified arrays of doubles are equal to one another.
|
boolean |
equals(float[] anArray,
float[] anAnotherArray)
Returns true if the two specified arrays of floats are equal to one another.
|
boolean |
equals(int[] anArray,
int[] anAnotherArray)
Returns true if the two specified arrays of ints are equal to one another.
|
boolean |
equals(long[] anArray,
long[] anAnotherArray)
Returns true if the two specified arrays of longs are equal to one another.
|
boolean |
equals(Object[] anArray,
Object[] anAnotherArray)
Returns true if the two specified arrays of Objects are equal to one another.
|
boolean |
equals(short[] anArray,
short[] anAnotherArray)
Returns true if the two specified arrays of shorts are equal to one another.
|
void |
fill(boolean[] anArray,
boolean aValue)
Assigns the specified boolean value to each element of the specified array of booleans.
|
void |
fill(boolean[] anArray,
int aFromIndex,
int aToIndex,
boolean aValue)
Assigns the specified boolean value to each element of the specified
range of the specified array of booleans.
|
void |
fill(byte[] anArray,
byte aValue)
Assigns the specified byte value to each element of the specified array of bytes.
|
void |
fill(byte[] anArray,
int aFromIndex,
int aToIndex,
byte aValue)
Assigns the specified byte value to each element of the specified range of the specified array of bytes.
|
void |
fill(char[] anArray,
char aValue)
Assigns the specified char value to each element of the specified array of chars.
|
void |
fill(char[] anArray,
int aFromIndex,
int aToIndex,
char aValue)
Assigns the specified char value to each element of the specified range of the specified array of chars.
|
void |
fill(double[] anArray,
double aValue)
Assigns the specified double value to each element of the specified array of doubles.
|
void |
fill(double[] anArray,
int aFromIndex,
int aToIndex,
double aValue)
Assigns the specified double value to each element of the specified range of the specified array of doubles.
|
void |
fill(float[] anArray,
float aValue)
Assigns the specified float value to each element of the specified array of floats.
|
void |
fill(float[] anArray,
int aFromIndex,
int aToIndex,
float aValue)
Assigns the specified float value to each element of the specified range of the specified array of floats.
|
void |
fill(int[] anArray,
int aValue)
Assigns the specified int value to each element of the specified array of ints.
|
void |
fill(int[] anArray,
int aFromIndex,
int aToIndex,
int aValue)
Assigns the specified int value to each element of the specified range of the specified array of ints.
|
void |
fill(long[] anArray,
int aFromIndex,
int aToIndex,
long aValue)
Assigns the specified long value to each element of the specified range of the specified array of longs.
|
void |
fill(long[] anArray,
long aValue)
Assigns the specified long value to each element of the specified array of longs.
|
void |
fill(Object[] anArray,
int aFromIndex,
int aToIndex,
Object aValue)
Assigns the specified Object reference to each element of the specified range of the specified array of Objects.
|
void |
fill(Object[] anArray,
Object aValue)
Assigns the specified Object reference to each element of the specified array of Objects.
|
void |
fill(short[] anArray,
int aFromIndex,
int aToIndex,
short aValue)
Assigns the specified short value to each element of the specified range of the specified array of shorts.
|
void |
fill(short[] anArray,
short aValue)
Assigns the specified short value to each element of the specified array of shorts.
|
int |
hashCode(boolean[] anArray)
Returns a hash code based on the contents of the specified array.
|
int |
hashCode(byte[] anArray)
Returns a hash code based on the contents of the specified array.
|
int |
hashCode(char[] anArray)
Returns a hash code based on the contents of the specified array.
|
int |
hashCode(double[] anArray)
Returns a hash code based on the contents of the specified array.
|
int |
hashCode(float[] anArray)
Returns a hash code based on the contents of the specified array.
|
int |
hashCode(int[] anArray)
Returns a hash code based on the contents of the specified array.
|
int |
hashCode(long[] anArray)
Returns a hash code based on the contents of the specified array.
|
int |
hashCode(Object[] anArray)
Returns a hash code based on the contents of the specified array.
|
int |
hashCode(short[] anArray)
Returns a hash code based on the contents of the specified array.
|
void |
parallelPrefix(double[] array,
DoubleBinaryOperator op)
Cumulates, in parallel, each element of the given array in place, using the supplied function.
|
void |
parallelPrefix(double[] array,
int fromIndex,
int toIndex,
DoubleBinaryOperator op)
Performs
parallelPrefix(double[], DoubleBinaryOperator) for the given subrange of the array. |
void |
parallelPrefix(int[] array,
IntBinaryOperator op)
Cumulates, in parallel, each element of the given array in place, using the supplied function.
|
void |
parallelPrefix(int[] array,
int fromIndex,
int toIndex,
IntBinaryOperator op)
Performs
parallelPrefix(int[], IntBinaryOperator) for the given subrange of the array. |
void |
parallelPrefix(long[] array,
int fromIndex,
int toIndex,
LongBinaryOperator op)
Performs
parallelPrefix(long[], LongBinaryOperator) for the given subrange of the array. |
void |
parallelPrefix(long[] array,
LongBinaryOperator op)
Cumulates, in parallel, each element of the given array in place, using the supplied function.
|
<T> void |
parallelPrefix(T[] array,
BinaryOperator<T> op)
Cumulates, in parallel, each element of the given array in place, using the supplied function.
|
<T> void |
parallelPrefix(T[] array,
int fromIndex,
int toIndex,
BinaryOperator<T> op)
Performs
parallelPrefix(Object[], BinaryOperator) for the given subrange of the array. |
void |
parallelSetAll(double[] array,
IntToDoubleFunction generator)
Set all elements of the specified array, in parallel, using the provided generator function to compute each element.
|
void |
parallelSetAll(int[] array,
IntUnaryOperator generator)
Set all elements of the specified array, in parallel, using the provided generator function to compute each element.
|
void |
parallelSetAll(long[] array,
IntToLongFunction generator)
Set all elements of the specified array, in parallel, using the provided generator function to compute each element.
|
<T> void |
parallelSetAll(T[] array,
IntFunction<? extends T> generator)
Set all elements of the specified array, in parallel, using the provided generator function to compute each element.
|
void |
parallelSort(byte[] a)
Sorts the specified array into ascending numerical order.
|
void |
parallelSort(byte[] a,
int fromIndex,
int toIndex)
Sorts the specified range of the array into ascending numerical order.
|
void |
parallelSort(char[] a)
Sorts the specified array into ascending numerical order.
|
void |
parallelSort(char[] a,
int fromIndex,
int toIndex)
Sorts the specified range of the array into ascending numerical order.
|
void |
parallelSort(double[] a)
Sorts the specified array into ascending numerical order.
|
void |
parallelSort(double[] a,
int fromIndex,
int toIndex)
Sorts the specified range of the array into ascending numerical order.
|
void |
parallelSort(float[] a)
Sorts the specified array into ascending numerical order.
|
void |
parallelSort(float[] a,
int fromIndex,
int toIndex)
Sorts the specified range of the array into ascending numerical order.
|
void |
parallelSort(int[] a)
Sorts the specified array into ascending numerical order.
|
void |
parallelSort(int[] a,
int fromIndex,
int toIndex)
Sorts the specified range of the array into ascending numerical order.
|
void |
parallelSort(long[] a)
Sorts the specified array into ascending numerical order.
|
void |
parallelSort(long[] a,
int fromIndex,
int toIndex)
Sorts the specified range of the array into ascending numerical order.
|
void |
parallelSort(short[] a)
Sorts the specified array into ascending numerical order.
|
void |
parallelSort(short[] a,
int fromIndex,
int toIndex)
Sorts the specified range of the array into ascending numerical order.
|
<T extends Comparable<? super T>> |
parallelSort(T[] a)
Sorts the specified array of objects into ascending order, according
to the natural ordering of its elements.
|
<T> void |
parallelSort(T[] a,
Comparator<? super T> cmp)
Sorts the specified array of objects according to the order induced by
the specified comparator.
|
<T extends Comparable<? super T>> |
parallelSort(T[] a,
int fromIndex,
int toIndex)
Sorts the specified range of the specified array of objects into
ascending order, according to the
natural ordering of its elements.
|
<T> void |
parallelSort(T[] a,
int fromIndex,
int toIndex,
Comparator<? super T> cmp)
Sorts the specified range of the specified array of objects according
to the order induced by the specified comparator.
|
void |
setAll(double[] array,
IntToDoubleFunction generator)
Set all elements of the specified array, using the provided generator function to compute each element.
|
void |
setAll(int[] array,
IntUnaryOperator generator)
Set all elements of the specified array, using the provided generator function to compute each element.
|
void |
setAll(long[] array,
IntToLongFunction generator)
Set all elements of the specified array, using the provided generator function to compute each element.
|
<T> void |
setAll(T[] array,
IntFunction<? extends T> generator)
Set all elements of the specified array, using the provided generator function to compute each element.
|
void |
sort(byte[] anArray)
Sorts the specified array of bytes into ascending numerical order.
|
void |
sort(byte[] anArray,
int aFromIndex,
int aToIndex)
Sorts the specified range of the specified array of bytes into ascending numerical order.
|
void |
sort(char[] anArray)
Sorts the specified array of chars into ascending numerical order.
|
void |
sort(char[] anArray,
int aFromIndex,
int aToIndex)
Sorts the specified range of the specified array of chars into ascending numerical order.
|
void |
sort(double[] anArray)
Sorts the specified array of doubles into ascending numerical order.
|
void |
sort(double[] anArray,
int aFromIndex,
int aToIndex)
Sorts the specified range of the specified array of doubles into ascending numerical order.
|
void |
sort(float[] anArray)
Sorts the specified array of floats into ascending numerical order.
|
void |
sort(float[] anArray,
int aFromIndex,
int aToIndex)
Sorts the specified range of the specified array of floats into ascending numerical order.
|
void |
sort(int[] anArray)
Sorts the specified array of ints into ascending numerical order.
|
void |
sort(int[] anArray,
int aFromIndex,
int aToIndex)
Sorts the specified range of the specified array of ints into ascending numerical order.
|
void |
sort(long[] anArray)
Sorts the specified array of longs into ascending numerical order.
|
void |
sort(long[] anArray,
int aFromIndex,
int aToIndex)
Sorts the specified range of the specified array of longs into
ascending numerical order.
|
void |
sort(Object[] anArray)
Sorts the specified array of objects into ascending order, according to the
Comparable natural ordering of its elements. |
void |
sort(Object[] anArray,
int aFromIndex,
int aToIndex)
Sorts the specified range of the specified array of objects into ascending order, according to the
Comparable
natural ordering of its elements. |
void |
sort(short[] anArray)
Sorts the specified array of shorts into ascending numerical order.
|
void |
sort(short[] anArray,
int aFromIndex,
int aToIndex)
Sorts the specified range of the specified array of shorts into ascending numerical order.
|
<T> void |
sort(T[] anArray,
Comparator<? super T> aComparator)
Sorts the specified array of objects according to the order induced by the specified comparator.
|
<T> void |
sort(T[] anArray,
int aFromIndex,
int aToIndex,
Comparator<? super T> aComparator)
Sorts the specified range of the specified array of objects according to the order induced by the specified comparator.
|
Spliterator.OfDouble |
spliterator(double[] array)
Returns a
Spliterator.OfDouble covering all of the specified array. |
Spliterator.OfDouble |
spliterator(double[] array,
int startInclusive,
int endExclusive)
Returns a
Spliterator.OfDouble covering the specified range of the specified array. |
Spliterator.OfInt |
spliterator(int[] array)
Returns a
Spliterator.OfInt covering all of the specified array. |
Spliterator.OfInt |
spliterator(int[] array,
int startInclusive,
int endExclusive)
Returns a
Spliterator.OfInt covering the specified range of the specified array. |
Spliterator.OfLong |
spliterator(long[] array)
Returns a
Spliterator.OfLong covering all of the specified array. |
Spliterator.OfLong |
spliterator(long[] array,
int startInclusive,
int endExclusive)
Returns a
Spliterator.OfLong covering the specified range of the specified array. |
<T> Spliterator<T> |
spliterator(T[] array)
Returns a Spliterator covering all of the specified array.
|
<T> Spliterator<T> |
spliterator(T[] array,
int startInclusive,
int endExclusive)
Returns a
Spliterator covering the specified range of the specified array. |
DoubleStream |
stream(double[] array)
Returns a sequential
DoubleStream with the specified array as its source. |
DoubleStream |
stream(double[] array,
int startInclusive,
int endExclusive)
Returns a sequential
DoubleStream with the specified range of the specified array as its source. |
IntStream |
stream(int[] array)
Returns a sequential
IntStream with the specified array as its source. |
IntStream |
stream(int[] array,
int startInclusive,
int endExclusive)
Returns a sequential
IntStream with the specified range of the specified array as its source. |
LongStream |
stream(long[] array)
Returns a sequential
LongStream with the specified array as its source. |
LongStream |
stream(long[] array,
int startInclusive,
int endExclusive)
Returns a sequential
LongStream with the specified range of the specified array as its source. |
<T> Stream<T> |
stream(T[] array)
Returns a sequential
Stream with the specified array as its source. |
<T> Stream<T> |
stream(T[] array,
int startInclusive,
int endExclusive)
Returns a sequential
Stream with the specified range of the specified array as its source. |
String |
toString(boolean[] anArray)
Returns a string representation of the contents of the specified array.
|
String |
toString(byte[] anArray)
Returns a string representation of the contents of the specified array.
|
String |
toString(char[] anArray)
Returns a string representation of the contents of the specified array.
|
String |
toString(double[] anArray)
Returns a string representation of the contents of the specified array.
|
String |
toString(float[] anArray)
Returns a string representation of the contents of the specified array.
|
String |
toString(int[] anArray)
Returns a string representation of the contents of the specified array.
|
String |
toString(long[] anArray)
Returns a string representation of the contents of the specified array.
|
String |
toString(Object[] anArray)
Returns a string representation of the contents of the specified array.
|
String |
toString(short[] anArray)
Returns a string representation of the contents of the specified array.
|
void sort(long[] anArray)
anArray
- the array to be sortedvoid sort(long[] anArray, int aFromIndex, int aToIndex)
anArray
- the array to be sortedaFromIndex
- the index of the first element (inclusive) to be sortedaToIndex
- the index of the last element (exclusive) to be sortedIllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.lengthvoid sort(int[] anArray)
anArray
- the array to be sortedvoid sort(int[] anArray, int aFromIndex, int aToIndex)
anArray
- the array to be sortedaFromIndex
- the index of the first element (inclusive) to be sortedaToIndex
- the index of the last element (exclusive) to be sortedIllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.lengthvoid sort(short[] anArray)
anArray
- the array to be sortedvoid sort(short[] anArray, int aFromIndex, int aToIndex)
anArray
- the array to be sortedaFromIndex
- the index of the first element (inclusive) to be sortedaToIndex
- the index of the last element (exclusive) to be sortedIllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.lengthvoid sort(char[] anArray)
anArray
- the array to be sortedvoid sort(char[] anArray, int aFromIndex, int aToIndex)
anArray
- the array to be sortedaFromIndex
- the index of the first element (inclusive) to be sortedaToIndex
- the index of the last element (exclusive) to be sortedIllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.lengthvoid sort(byte[] anArray)
anArray
- the array to be sortedvoid sort(byte[] anArray, int aFromIndex, int aToIndex)
anArray
- the array to be sortedaFromIndex
- the index of the first element (inclusive) to be sortedaToIndex
- the index of the last element (exclusive) to be sortedIllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.lengthvoid sort(double[] anArray)
anArray
- the array to be sortedvoid sort(double[] anArray, int aFromIndex, int aToIndex)
anArray
- the array to be sortedaFromIndex
- the index of the first element (inclusive) to be sortedaToIndex
- the index of the last element (exclusive) to be sortedIllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.lengthvoid sort(float[] anArray)
anArray
- the array to be sortedvoid sort(float[] anArray, int aFromIndex, int aToIndex)
anArray
- the array to be sortedaFromIndex
- the index of the first element (inclusive) to be sortedaToIndex
- the index of the last element (exclusive) to be sortedIllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.lengthvoid sort(Object[] anArray)
Comparable
natural ordering of its elements.anArray
- the array to be sortedClassCastException
- if the array contains elements that are not mutually comparable (for example, strings and integers).void sort(Object[] anArray, int aFromIndex, int aToIndex)
Comparable
natural ordering of its elements.anArray
- the array to be sortedaFromIndex
- the index of the first element (inclusive) to be sortedaToIndex
- the index of the last element (exclusive) to be sortedIllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or
aToIndex > anArray.lengthClassCastException
- if the array contains elements that are not mutually comparable
(for example, strings and integers).<T> void sort(T[] anArray, Comparator<? super T> aComparator)
T
- the class of the objects to be sortedanArray
- the array to be sortedaComparator
- the comparator to determine the order of the array. A null value indicates that the elements'
Comparable natural ordering should be used.ClassCastException
- if the array contains elements that are not mutually comparable using the specified comparator.<T> void sort(T[] anArray, int aFromIndex, int aToIndex, Comparator<? super T> aComparator)
T
- the class of the objects to be sortedanArray
- the array to be sortedaFromIndex
- the index of the first element (inclusive) to be sortedaToIndex
- the index of the last element (exclusive) to be sortedaComparator
- the comparator to determine the order of the array. A null value indicates that the elements'
Comparable natural ordering should be used.ClassCastException
- if the array contains elements that are not mutually comparable using the specified comparator.IllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.lengthint binarySearch(long[] anArray, long aKey)
anArray
- the array to be searchedaKey
- the value to be searched forint binarySearch(long[] anArray, int aFromIndex, int aToIndex, long aKey)
anArray
- the array to be searchedaFromIndex
- the index of the first element (inclusive) to be searchedaToIndex
- the index of the last element (exclusive) to be searchedaKey
- the value to be searched forIllegalArgumentException
- if aFromIndex > aToIndex
ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.length
int binarySearch(int[] anArray, int aKey)
anArray
- the array to be searchedaKey
- the value to be searched forint binarySearch(int[] anArray, int aFromIndex, int aToIndex, int aKey)
anArray
- the array to be searchedaFromIndex
- the index of the first element (inclusive) to be searchedaToIndex
- the index of the last element (exclusive) to be searchedaKey
- the value to be searched forIllegalArgumentException
- if aFromIndex > aToIndex
ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.length
int binarySearch(short[] anArray, short aKey)
anArray
- the array to be searchedaKey
- the value to be searched forint binarySearch(short[] anArray, int aFromIndex, int aToIndex, short aKey)
anArray
- the array to be searchedaFromIndex
- the index of the first element (inclusive) to be searchedaToIndex
- the index of the last element (exclusive) to be searchedaKey
- the value to be searched forIllegalArgumentException
- if aFromIndex > aToIndex
ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.length
int binarySearch(char[] anArray, char aKey)
anArray
- the array to be searchedaKey
- the value to be searched forint binarySearch(char[] anArray, int aFromIndex, int aToIndex, char aKey)
anArray
- the array to be searchedaFromIndex
- the index of the first element (inclusive) to be searchedaToIndex
- the index of the last element (exclusive) to be searchedaKey
- the value to be searched forIllegalArgumentException
- if aFromIndex > aToIndex
ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.length
int binarySearch(byte[] anArray, byte aKey)
anArray
- the array to be searchedaKey
- the value to be searched forint binarySearch(byte[] anArray, int aFromIndex, int aToIndex, byte aKey)
anArray
- the array to be searchedaFromIndex
- the index of the first element (inclusive) to be searchedaToIndex
- the index of the last element (exclusive) to be searchedaKey
- the value to be searched forIllegalArgumentException
- if aFromIndex > aToIndex
ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.length
int binarySearch(double[] anArray, double aKey)
anArray
- the array to be searchedaKey
- the value to be searched forint binarySearch(double[] anArray, int aFromIndex, int aToIndex, double aKey)
anArray
- the array to be searchedaFromIndex
- the index of the first element (inclusive) to be searchedaToIndex
- the index of the last element (exclusive) to be searchedaKey
- the value to be searched forIllegalArgumentException
- if aFromIndex > aToIndex
ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.length
int binarySearch(float[] anArray, float aKey)
anArray
- the array to be searchedaKey
- the value to be searched forint binarySearch(float[] anArray, int aFromIndex, int aToIndex, float aKey)
anArray
- the array to be searchedaFromIndex
- the index of the first element (inclusive) to be searchedaToIndex
- the index of the last element (exclusive) to be searchedaKey
- the value to be searched forIllegalArgumentException
- if aFromIndex > aToIndex
ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.length
int binarySearch(Object[] anArray, Object aKey)
anArray
- the array to be searchedaKey
- the value to be searched forClassCastException
- if the search key is not comparable to the elements of the array.int binarySearch(Object[] anArray, int aFromIndex, int aToIndex, Object aKey)
anArray
- the array to be searchedaFromIndex
- the index of the first element (inclusive) to be searchedaToIndex
- the index of the last element (exclusive) to be searchedaKey
- the value to be searched forClassCastException
- if the search key is not comparable to the elements of the array within the specified range.IllegalArgumentException
- if aFromIndex > aToIndex
ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.length
<T> int binarySearch(T[] anArray, T aKey, Comparator<? super T> aComparator)
T
- the class of the objects to be searchedanArray
- the array to be searchedaKey
- the value to be searched foraComparator
- the comparator by which the array is ordered. A null value indicates that the elements'
Comparable natural ordering should be used.ClassCastException
- if the array contains elements that are not mutually comparable using the specified comparator,
or the search key is not comparable to the elements of the array using this comparator.<T> int binarySearch(T[] anArray, int aFromIndex, int aToIndex, T aKey, Comparator<? super T> aComparator)
T
- the class of the objects to be searchedanArray
- the array to be searchedaFromIndex
- the index of the first element (inclusive) to be searchedaToIndex
- the index of the last element (exclusive) to be searchedaKey
- the value to be searched foraComparator
- the comparator by which the array is ordered. A null value indicates that the elements'
Comparable natural ordering should be used.ClassCastException
- if the range contains elements that are not mutually comparable using the specified comparator,
or the search key is not comparable to the elements in the range using this comparator.IllegalArgumentException
- if aFromIndex > aToIndex
ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.length
boolean equals(long[] anArray, long[] anAnotherArray)
anArray
- one array to be tested for equalityanAnotherArray
- the other array to be tested for equalityboolean equals(int[] anArray, int[] anAnotherArray)
anArray
- one array to be tested for equalityanAnotherArray
- the other array to be tested for equalityboolean equals(short[] anArray, short[] anAnotherArray)
anArray
- one array to be tested for equalityanAnotherArray
- the other array to be tested for equalityboolean equals(char[] anArray, char[] anAnotherArray)
anArray
- one array to be tested for equalityanAnotherArray
- the other array to be tested for equalityboolean equals(byte[] anArray, byte[] anAnotherArray)
anArray
- one array to be tested for equalityanAnotherArray
- the other array to be tested for equalityboolean equals(boolean[] anArray, boolean[] anAnotherArray)
anArray
- one array to be tested for equalityanAnotherArray
- the other array to be tested for equalityboolean equals(double[] anArray, double[] anAnotherArray)
anArray
- one array to be tested for equalityanAnotherArray
- the other array to be tested for equalityboolean equals(float[] anArray, float[] anAnotherArray)
anArray
- one array to be tested for equalityanAnotherArray
- the other array to be tested for equalityboolean equals(Object[] anArray, Object[] anAnotherArray)
anArray
- one array to be tested for equalityanAnotherArray
- the other array to be tested for equalityvoid fill(long[] anArray, long aValue)
anArray
- the array to be filledaValue
- the value to be stored in all elements of the arrayvoid fill(long[] anArray, int aFromIndex, int aToIndex, long aValue)
anArray
- the array to be filledaFromIndex
- the index of the first element (inclusive) to be filled with the specified valueaToIndex
- the index of the last element (exclusive) to be filled with the specified valueaValue
- the value to be stored in all elements of the arrayIllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.lengthvoid fill(int[] anArray, int aValue)
anArray
- the array to be filledaValue
- the value to be stored in all elements of the arrayvoid fill(int[] anArray, int aFromIndex, int aToIndex, int aValue)
anArray
- the array to be filledaFromIndex
- the index of the first element (inclusive) to be filled with the specified valueaToIndex
- the index of the last element (exclusive) to be filled with the specified valueaValue
- the value to be stored in all elements of the arrayIllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.lengthvoid fill(short[] anArray, short aValue)
anArray
- the array to be filledaValue
- the value to be stored in all elements of the arrayvoid fill(short[] anArray, int aFromIndex, int aToIndex, short aValue)
anArray
- the array to be filledaFromIndex
- the index of the first element (inclusive) to be filled with the specified valueaToIndex
- the index of the last element (exclusive) to be filled with the specified valueaValue
- the value to be stored in all elements of the arrayIllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.lengthvoid fill(char[] anArray, char aValue)
anArray
- the array to be filledaValue
- the value to be stored in all elements of the arrayvoid fill(char[] anArray, int aFromIndex, int aToIndex, char aValue)
anArray
- the array to be filledaFromIndex
- the index of the first element (inclusive) to be filled with the specified valueaToIndex
- the index of the last element (exclusive) to be filled with the specified valueaValue
- the value to be stored in all elements of the arrayIllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.lengthvoid fill(byte[] anArray, byte aValue)
anArray
- the array to be filledaValue
- the value to be stored in all elements of the arrayvoid fill(byte[] anArray, int aFromIndex, int aToIndex, byte aValue)
anArray
- the array to be filledaFromIndex
- the index of the first element (inclusive) to be filled with the specified valueaToIndex
- the index of the last element (exclusive) to be filled with the specified valueaValue
- the value to be stored in all elements of the arrayIllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.lengthvoid fill(boolean[] anArray, boolean aValue)
anArray
- the array to be filledaValue
- the value to be stored in all elements of the arrayvoid fill(boolean[] anArray, int aFromIndex, int aToIndex, boolean aValue)
anArray
- the array to be filledaFromIndex
- the index of the first element (inclusive) to be filled with the specified valueaToIndex
- the index of the last element (exclusive) to be filled with the specified valueaValue
- the value to be stored in all elements of the arrayIllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.lengthvoid fill(double[] anArray, double aValue)
anArray
- the array to be filledaValue
- the value to be stored in all elements of the arrayvoid fill(double[] anArray, int aFromIndex, int aToIndex, double aValue)
anArray
- the array to be filledaFromIndex
- the index of the first element (inclusive) to be filled with the specified valueaToIndex
- the index of the last element (exclusive) to be filled with the specified valueaValue
- the value to be stored in all elements of the arrayIllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.lengthvoid fill(float[] anArray, float aValue)
anArray
- the array to be filledaValue
- the value to be stored in all elements of the arrayvoid fill(float[] anArray, int aFromIndex, int aToIndex, float aValue)
anArray
- the array to be filledaFromIndex
- the index of the first element (inclusive) to be filled with the specified valueaToIndex
- the index of the last element (exclusive) to be filled with the specified valueaValue
- the value to be stored in all elements of the arrayIllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.lengthvoid fill(Object[] anArray, Object aValue)
anArray
- the array to be filledaValue
- the value to be stored in all elements of the arrayArrayStoreException
- if the specified value is not of a
runtime type that can be stored in the specified arrayvoid fill(Object[] anArray, int aFromIndex, int aToIndex, Object aValue)
anArray
- the array to be filledaFromIndex
- the index of the first element (inclusive) to be filled with the specified valueaToIndex
- the index of the last element (exclusive) to be filled with the specified valueaValue
- the value to be stored in all elements of the arrayIllegalArgumentException
- if aFromIndex > aToIndexArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aToIndex > anArray.lengthArrayStoreException
- if the specified value is not of a runtime type that can be stored in the specified array<T> T[] copyOf(T[] anArray, int aNewLength)
T
- the class of the objects in the arrayanArray
- the array to be copiedaNewLength
- the length of the copy to be returnedNegativeArraySizeException
- if aNewLength is negativeNullPointerException
- if anArray is null<T,U> T[] copyOf(U[] anArray, int aNewLength, Class<? extends T[]> aNewType)
U
- the class of the objects in the original arrayT
- the class of the objects in the returned arrayanArray
- the array to be copiedaNewLength
- the length of the copy to be returnedaNewType
- the class of the copy to be returnedNegativeArraySizeException
- if aNewLength is negativeNullPointerException
- if anArray is nullArrayStoreException
- if an element copied from anArray is not of a runtime type that can be stored
in an array of class aNewTypebyte[] copyOf(byte[] anArray, int aNewLength)
anArray
- the array to be copiedaNewLength
- the length of the copy to be returnedNegativeArraySizeException
- if aNewLength is negativeNullPointerException
- if anArray is nullshort[] copyOf(short[] anArray, int aNewLength)
anArray
- the array to be copiedaNewLength
- the length of the copy to be returnedNegativeArraySizeException
- if aNewLength is negativeNullPointerException
- if anArray is nullint[] copyOf(int[] anArray, int aNewLength)
anArray
- the array to be copiedaNewLength
- the length of the copy to be returnedNegativeArraySizeException
- if aNewLength is negativeNullPointerException
- if anArray is nulllong[] copyOf(long[] anArray, int aNewLength)
anArray
- the array to be copiedaNewLength
- the length of the copy to be returnedNegativeArraySizeException
- if aNewLength is negativeNullPointerException
- if anArray is nullchar[] copyOf(char[] anArray, int aNewLength)
anArray
- the array to be copiedaNewLength
- the length of the copy to be returnedNegativeArraySizeException
- if aNewLength is negativeNullPointerException
- if anArray is nullfloat[] copyOf(float[] anArray, int aNewLength)
anArray
- the array to be copiedaNewLength
- the length of the copy to be returnedNegativeArraySizeException
- if aNewLength is negativeNullPointerException
- if anArray is nulldouble[] copyOf(double[] anArray, int aNewLength)
anArray
- the array to be copiedaNewLength
- the length of the copy to be returnedNegativeArraySizeException
- if aNewLength is negativeNullPointerException
- if anArray is nullboolean[] copyOf(boolean[] anArray, int aNewLength)
anArray
- the array to be copiedaNewLength
- the length of the copy to be returnedNegativeArraySizeException
- if aNewLength is negativeNullPointerException
- if anArray is null<T> T[] copyOfRange(T[] anArray, int aFromIndex, int aToIndex)
T
- the class of the objects in the arrayanArray
- the array from which a range is to be copiedaFromIndex
- the initial index of the range to be copied, inclusiveaToIndex
- the final index of the range to be copied, exclusive. (This index may lie outside the array.)ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aFromIndex > anArray.length()IllegalArgumentException
- if aFromIndex > aToIndexNullPointerException
- if anArray is null<T,U> T[] copyOfRange(U[] anArray, int aFromIndex, int aToIndex, Class<? extends T[]> aNewType)
U
- the class of the objects in the original arrayT
- the class of the objects in the returned arrayanArray
- the array from which a range is to be copiedaFromIndex
- the initial index of the range to be copied, inclusiveaToIndex
- the final index of the range to be copied, exclusive. (This index may lie outside the array.)aNewType
- the class of the copy to be returnedArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aFromIndex > anArray.length()IllegalArgumentException
- if aFromIndex > aToIndexNullPointerException
- if anArray is nullArrayStoreException
- if an element copied from anArray is not of a runtime type that can be stored in
an array of class aNewType.byte[] copyOfRange(byte[] anArray, int aFromIndex, int aToIndex)
anArray
- the array from which a range is to be copiedaFromIndex
- the initial index of the range to be copied, inclusiveaToIndex
- the final index of the range to be copied, exclusive. (This index may lie outside the array.)ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aFromIndex > anArray.length()IllegalArgumentException
- if aFromIndex > aToIndexNullPointerException
- if anArray is nullshort[] copyOfRange(short[] anArray, int aFromIndex, int aToIndex)
anArray
- the array from which a range is to be copiedaFromIndex
- the initial index of the range to be copied, inclusiveaToIndex
- the final index of the range to be copied, exclusive. (This index may lie outside the array.)ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aFromIndex > anArray.length()IllegalArgumentException
- if aFromIndex > aToIndexNullPointerException
- if anArray is nullint[] copyOfRange(int[] anArray, int aFromIndex, int aToIndex)
anArray
- the array from which a range is to be copiedaFromIndex
- the initial index of the range to be copied, inclusiveaToIndex
- the final index of the range to be copied, exclusive. (This index may lie outside the array.)ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aFromIndex > anArray.length()IllegalArgumentException
- if aFromIndex > aToIndexNullPointerException
- if anArray is nulllong[] copyOfRange(long[] anArray, int aFromIndex, int aToIndex)
anArray
- the array from which a range is to be copiedaFromIndex
- the initial index of the range to be copied, inclusiveaToIndex
- the final index of the range to be copied, exclusive. (This index may lie outside the array.)ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aFromIndex > anArray.length()IllegalArgumentException
- if aFromIndex > aToIndexNullPointerException
- if anArray is nullchar[] copyOfRange(char[] anArray, int aFromIndex, int aToIndex)
anArray
- the array from which a range is to be copiedaFromIndex
- the initial index of the range to be copied, inclusiveaToIndex
- the final index of the range to be copied, exclusive. (This index may lie outside the array.)ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aFromIndex > anArray.length()IllegalArgumentException
- if aFromIndex > aToIndexNullPointerException
- if anArray is nullfloat[] copyOfRange(float[] anArray, int aFromIndex, int aToIndex)
anArray
- the array from which a range is to be copiedaFromIndex
- the initial index of the range to be copied, inclusiveaToIndex
- the final index of the range to be copied, exclusive. (This index may lie outside the array.)ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aFromIndex > anArray.length()IllegalArgumentException
- if aFromIndex > aToIndexNullPointerException
- if anArray is nulldouble[] copyOfRange(double[] anArray, int aFromIndex, int aToIndex)
anArray
- the array from which a range is to be copiedaFromIndex
- the initial index of the range to be copied, inclusiveaToIndex
- the final index of the range to be copied, exclusive. (This index may lie outside the array.)ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aFromIndex > anArray.length()IllegalArgumentException
- if aFromIndex > aToIndexNullPointerException
- if anArray is nullboolean[] copyOfRange(boolean[] anArray, int aFromIndex, int aToIndex)
anArray
- the array from which a range is to be copiedaFromIndex
- the initial index of the range to be copied, inclusiveaToIndex
- the final index of the range to be copied, exclusive. (This index may lie outside the array.)ArrayIndexOutOfBoundsException
- if aFromIndex < 0 or aFromIndex > anArray.length()IllegalArgumentException
- if aFromIndex > aToIndexNullPointerException
- if anArray is null<T> List<T> asList(T... anArray)
T
- the class of the objects in the arrayanArray
- the array by which the list will be backedint hashCode(long[] anArray)
anArray
- the array whose hash value to computeint hashCode(int[] anArray)
anArray
- the array whose hash value to computeint hashCode(short[] anArray)
anArray
- the array whose hash value to computeint hashCode(char[] anArray)
anArray
- the array whose hash value to computeint hashCode(byte[] anArray)
anArray
- the array whose hash value to computeint hashCode(boolean[] anArray)
anArray
- the array whose hash value to computeint hashCode(float[] anArray)
anArray
- the array whose hash value to computeint hashCode(double[] anArray)
anArray
- the array whose hash value to computeint hashCode(Object[] anArray)
anArray
- the array whose content-based hash code to computeint deepHashCode(Object[] anArray)
anArray
- the array whose deep-content-based hash code to computeboolean deepEquals(Object[] anArray, Object[] anAnotherArray)
anArray
- one array to be tested for equalityanAnotherArray
- the other array to be tested for equalityString toString(long[] anArray)
anArray
- the array whose string representation to returnString toString(int[] anArray)
anArray
- the array whose string representation to returnString toString(short[] anArray)
anArray
- the array whose string representation to returnString toString(char[] anArray)
anArray
- the array whose string representation to returnString toString(byte[] anArray)
anArray
- the array whose string representation to returnString toString(boolean[] anArray)
anArray
- the array whose string representation to returnString toString(float[] anArray)
anArray
- the array whose string representation to returnString toString(double[] anArray)
anArray
- the array whose string representation to returnString toString(Object[] anArray)
anArray
- the array whose string representation to returnString deepToString(Object[] anArray)
anArray
- the array whose string representation to returnvoid parallelSort(byte[] a)
a
- the array to be sortedvoid parallelSort(byte[] a, int fromIndex, int toIndex)
a
- the array to be sortedfromIndex
- the index of the first element, inclusive, to be sortedtoIndex
- the index of the last element, exclusive, to be sortedIllegalArgumentException
- if fromIndex > toIndex
ArrayIndexOutOfBoundsException
- if fromIndex < 0
or toIndex > a.length
void parallelSort(char[] a)
a
- the array to be sortedvoid parallelSort(char[] a, int fromIndex, int toIndex)
a
- the array to be sortedfromIndex
- the index of the first element, inclusive, to be sortedtoIndex
- the index of the last element, exclusive, to be sortedIllegalArgumentException
- if fromIndex > toIndex
ArrayIndexOutOfBoundsException
- if fromIndex < 0
or toIndex > a.length
void parallelSort(short[] a)
a
- the array to be sortedvoid parallelSort(short[] a, int fromIndex, int toIndex)
a
- the array to be sortedfromIndex
- the index of the first element, inclusive, to be sortedtoIndex
- the index of the last element, exclusive, to be sortedIllegalArgumentException
- if fromIndex > toIndex
ArrayIndexOutOfBoundsException
- if fromIndex < 0
or toIndex > a.length
void parallelSort(int[] a)
a
- the array to be sortedvoid parallelSort(int[] a, int fromIndex, int toIndex)
a
- the array to be sortedfromIndex
- the index of the first element, inclusive, to be sortedtoIndex
- the index of the last element, exclusive, to be sortedIllegalArgumentException
- if fromIndex > toIndex
ArrayIndexOutOfBoundsException
- if fromIndex < 0
or toIndex > a.length
void parallelSort(long[] a)
a
- the array to be sortedvoid parallelSort(long[] a, int fromIndex, int toIndex)
a
- the array to be sortedfromIndex
- the index of the first element, inclusive, to be sortedtoIndex
- the index of the last element, exclusive, to be sortedIllegalArgumentException
- if fromIndex > toIndex
ArrayIndexOutOfBoundsException
- if fromIndex < 0
or toIndex > a.length
void parallelSort(float[] a)
a
- the array to be sortedvoid parallelSort(float[] a, int fromIndex, int toIndex)
a
- the array to be sortedfromIndex
- the index of the first element, inclusive, to be sortedtoIndex
- the index of the last element, exclusive, to be sortedIllegalArgumentException
- if fromIndex > toIndex
ArrayIndexOutOfBoundsException
- if fromIndex < 0
or toIndex > a.length
void parallelSort(double[] a)
a
- the array to be sortedvoid parallelSort(double[] a, int fromIndex, int toIndex)
a
- the array to be sortedfromIndex
- the index of the first element, inclusive, to be sortedtoIndex
- the index of the last element, exclusive, to be sortedIllegalArgumentException
- if fromIndex > toIndex
ArrayIndexOutOfBoundsException
- if fromIndex < 0
or toIndex > a.length
<T extends Comparable<? super T>> void parallelSort(T[] a)
T
- the class of the objects to be sorteda
- the array to be sortedClassCastException
- if the array contains elements that are not
mutually comparable (for example, strings and integers)IllegalArgumentException
- (optional) if the natural
ordering of the array elements is found to violate the
Comparable
contract<T extends Comparable<? super T>> void parallelSort(T[] a, int fromIndex, int toIndex)
T
- the class of the objects to be sorteda
- the array to be sortedfromIndex
- the index of the first element (inclusive) to be sortedtoIndex
- the index of the last element (exclusive) to be sortedIllegalArgumentException
- if fromIndex > toIndex
or
(optional) if the natural ordering of the array elements is
found to violate the Comparable
contractArrayIndexOutOfBoundsException
- if fromIndex < 0
or
toIndex > a.length
ClassCastException
- if the array contains elements that are
not mutually comparable (for example, strings and
integers).<T> void parallelSort(T[] a, Comparator<? super T> cmp)
T
- the class of the objects to be sorteda
- the array to be sortedcmp
- the comparator to determine the order of the array. A
null
value indicates that the elements'
natural ordering should be used.ClassCastException
- if the array contains elements that are
not mutually comparable using the specified comparatorIllegalArgumentException
- (optional) if the comparator is
found to violate the Comparator
contract<T> void parallelSort(T[] a, int fromIndex, int toIndex, Comparator<? super T> cmp)
T
- the class of the objects to be sorteda
- the array to be sortedfromIndex
- the index of the first element (inclusive) to be
sortedtoIndex
- the index of the last element (exclusive) to be sortedcmp
- the comparator to determine the order of the array. A
null
value indicates that the elements'
natural ordering should be used.IllegalArgumentException
- if fromIndex > toIndex
or
(optional) if the natural ordering of the array elements is
found to violate the Comparable
contractArrayIndexOutOfBoundsException
- if fromIndex < 0
or toIndex > a.length
ClassCastException
- if the array contains elements that are
not mutually comparable (for example, strings and integers).<T> void parallelPrefix(T[] array, BinaryOperator<T> op)
T
- the class of the objects in the arrayarray
- the array, which is modified in-place by this methodop
- a side-effect-free, associative function to perform the cumulationNullPointerException
- if the specified array or function is null<T> void parallelPrefix(T[] array, int fromIndex, int toIndex, BinaryOperator<T> op)
parallelPrefix(Object[], BinaryOperator)
for the given subrange of the array.T
- the class of the objects in the arrayarray
- the arrayfromIndex
- the index of the first element, inclusivetoIndex
- the index of the last element, exclusiveop
- a side-effect-free, associative function to perform the
cumulationIllegalArgumentException
- if fromIndex > toIndex
ArrayIndexOutOfBoundsException
- if fromIndex < 0
or toIndex > array.length
NullPointerException
- if the specified array or function is nullvoid parallelPrefix(long[] array, LongBinaryOperator op)
array
- the array, which is modified in-place by this methodop
- a side-effect-free, associative function to perform the cumulationNullPointerException
- if the specified array or function is nullvoid parallelPrefix(long[] array, int fromIndex, int toIndex, LongBinaryOperator op)
parallelPrefix(long[], LongBinaryOperator)
for the given subrange of the array.array
- the arrayfromIndex
- the index of the first element, inclusivetoIndex
- the index of the last element, exclusiveop
- a side-effect-free, associative function to perform the cumulationIllegalArgumentException
- if fromIndex > toIndex
ArrayIndexOutOfBoundsException
- if fromIndex < 0
or toIndex > array.length
NullPointerException
- if the specified array or function is nullvoid parallelPrefix(double[] array, DoubleBinaryOperator op)
array
- the array, which is modified in-place by this methodop
- a side-effect-free function to perform the cumulationNullPointerException
- if the specified array or function is nullvoid parallelPrefix(double[] array, int fromIndex, int toIndex, DoubleBinaryOperator op)
parallelPrefix(double[], DoubleBinaryOperator)
for the given subrange of the array.array
- the arrayfromIndex
- the index of the first element, inclusivetoIndex
- the index of the last element, exclusiveop
- a side-effect-free, associative function to perform the cumulationIllegalArgumentException
- if fromIndex > toIndex
ArrayIndexOutOfBoundsException
- if fromIndex < 0
or toIndex > array.length
NullPointerException
- if the specified array or function is nullvoid parallelPrefix(int[] array, IntBinaryOperator op)
array
- the array, which is modified in-place by this methodop
- a side-effect-free, associative function to perform the cumulationNullPointerException
- if the specified array or function is nullvoid parallelPrefix(int[] array, int fromIndex, int toIndex, IntBinaryOperator op)
parallelPrefix(int[], IntBinaryOperator)
for the given subrange of the array.array
- the arrayfromIndex
- the index of the first element, inclusivetoIndex
- the index of the last element, exclusiveop
- a side-effect-free, associative function to perform the cumulationIllegalArgumentException
- if fromIndex > toIndex
ArrayIndexOutOfBoundsException
- if fromIndex < 0
or toIndex > array.length
NullPointerException
- if the specified array or function is null<T> void setAll(T[] array, IntFunction<? extends T> generator)
T
- type of elements of the arrayarray
- array to be initializedgenerator
- a function accepting an index and producing the desired value for that positionNullPointerException
- if the generator is null<T> void parallelSetAll(T[] array, IntFunction<? extends T> generator)
T
- type of elements of the arrayarray
- array to be initializedgenerator
- a function accepting an index and producing the desired value for that positionNullPointerException
- if the generator is nullvoid setAll(int[] array, IntUnaryOperator generator)
array
- array to be initializedgenerator
- a function accepting an index and producing the desired value for that positionNullPointerException
- if the generator is nullvoid parallelSetAll(int[] array, IntUnaryOperator generator)
array
- array to be initializedgenerator
- a function accepting an index and producing the desired value for that positionNullPointerException
- if the generator is nullvoid setAll(long[] array, IntToLongFunction generator)
array
- array to be initializedgenerator
- a function accepting an index and producing the desired value for that positionNullPointerException
- if the generator is nullvoid parallelSetAll(long[] array, IntToLongFunction generator)
array
- array to be initializedgenerator
- a function accepting an index and producing the desired value for that positionNullPointerException
- if the generator is nullvoid setAll(double[] array, IntToDoubleFunction generator)
array
- array to be initializedgenerator
- a function accepting an index and producing the desired value for that positionNullPointerException
- if the generator is nullvoid parallelSetAll(double[] array, IntToDoubleFunction generator)
array
- array to be initializedgenerator
- a function accepting an index and producing the desired value for that positionNullPointerException
- if the generator is null<T> Spliterator<T> spliterator(T[] array)
T
- type of elementsarray
- the array, assumed to be unmodified during use<T> Spliterator<T> spliterator(T[] array, int startInclusive, int endExclusive)
Spliterator
covering the specified range of the specified array.T
- type of elementsarray
- the array, assumed to be unmodified during usestartInclusive
- the first index to cover, inclusiveendExclusive
- index immediately past the last index to coverArrayIndexOutOfBoundsException
- if startInclusive
is
negative, endExclusive
is less than
startInclusive
, or endExclusive
is greater than
the array sizeSpliterator.OfInt spliterator(int[] array)
Spliterator.OfInt
covering all of the specified array.array
- the array, assumed to be unmodified during useSpliterator.OfInt spliterator(int[] array, int startInclusive, int endExclusive)
Spliterator.OfInt
covering the specified range of the specified array.array
- the array, assumed to be unmodified during usestartInclusive
- the first index to cover, inclusiveendExclusive
- index immediately past the last index to coverArrayIndexOutOfBoundsException
- if startInclusive
is
negative, endExclusive
is less than
startInclusive
, or endExclusive
is greater than
the array sizeSpliterator.OfLong spliterator(long[] array)
Spliterator.OfLong
covering all of the specified array.
The spliterator reports Spliterator.SIZED
,
Spliterator.SUBSIZED
, Spliterator.ORDERED
, and
Spliterator.IMMUTABLE
.
array
- the array, assumed to be unmodified during useSpliterator.OfLong spliterator(long[] array, int startInclusive, int endExclusive)
Spliterator.OfLong
covering the specified range of the specified array.array
- the array, assumed to be unmodified during usestartInclusive
- the first index to cover, inclusiveendExclusive
- index immediately past the last index to coverArrayIndexOutOfBoundsException
- if startInclusive
is
negative, endExclusive
is less than
startInclusive
, or endExclusive
is greater than
the array sizeSpliterator.OfDouble spliterator(double[] array)
Spliterator.OfDouble
covering all of the specified array.array
- the array, assumed to be unmodified during useSpliterator.OfDouble spliterator(double[] array, int startInclusive, int endExclusive)
Spliterator.OfDouble
covering the specified range of the specified array.array
- the array, assumed to be unmodified during usestartInclusive
- the first index to cover, inclusiveendExclusive
- index immediately past the last index to coverArrayIndexOutOfBoundsException
- if startInclusive
is
negative, endExclusive
is less than
startInclusive
, or endExclusive
is greater than
the array size<T> Stream<T> stream(T[] array)
Stream
with the specified array as its source.T
- The type of the array elementsarray
- The array, assumed to be unmodified during useStream
for the array<T> Stream<T> stream(T[] array, int startInclusive, int endExclusive)
Stream
with the specified range of the specified array as its source.T
- the type of the array elementsarray
- the array, assumed to be unmodified during usestartInclusive
- the first index to cover, inclusiveendExclusive
- index immediately past the last index to coverStream
for the array rangeArrayIndexOutOfBoundsException
- if startInclusive
is
negative, endExclusive
is less than
startInclusive
, or endExclusive
is greater than
the array sizeIntStream stream(int[] array)
IntStream
with the specified array as its source.array
- the array, assumed to be unmodified during useIntStream
for the arrayIntStream stream(int[] array, int startInclusive, int endExclusive)
IntStream
with the specified range of the specified array as its source.array
- the array, assumed to be unmodified during usestartInclusive
- the first index to cover, inclusiveendExclusive
- index immediately past the last index to coverIntStream
for the array rangeArrayIndexOutOfBoundsException
- if startInclusive
is
negative, endExclusive
is less than
startInclusive
, or endExclusive
is greater than
the array sizeLongStream stream(long[] array)
LongStream
with the specified array as its source.array
- the array, assumed to be unmodified during useLongStream
for the arrayLongStream stream(long[] array, int startInclusive, int endExclusive)
LongStream
with the specified range of the specified array as its source.array
- the array, assumed to be unmodified during usestartInclusive
- the first index to cover, inclusiveendExclusive
- index immediately past the last index to coverLongStream
for the array rangeArrayIndexOutOfBoundsException
- if startInclusive
is
negative, endExclusive
is less than
startInclusive
, or endExclusive
is greater than
the array sizeDoubleStream stream(double[] array)
DoubleStream
with the specified array as its source.array
- the array, assumed to be unmodified during useDoubleStream
for the arrayDoubleStream stream(double[] array, int startInclusive, int endExclusive)
DoubleStream
with the specified range of the specified array as its source.array
- the array, assumed to be unmodified during usestartInclusive
- the first index to cover, inclusiveendExclusive
- index immediately past the last index to coverDoubleStream
for the array rangeArrayIndexOutOfBoundsException
- if startInclusive
is
negative, endExclusive
is less than
startInclusive
, or endExclusive
is greater than
the array sizeSitevision - Portal and Content Management Made Easy
Sitevision is an advanced Java enterprise portal product and a portlet container (JSR 286) that implements Java Content Repository (JSR 283).
Copyright© 2008-2022 Sitevision AB, all rights reserved.