Arrays Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This class contains various methods for manipulating arrays (such as sorting and searching).
[Android.Runtime.Register("java/util/Arrays", DoNotGenerateAcw=true)]
public class Arrays : Java.Lang.Object
[<Android.Runtime.Register("java/util/Arrays", DoNotGenerateAcw=true)>]
type Arrays = class
inherit Object
- Inheritance
- Attributes
Remarks
This class contains various methods for manipulating arrays (such as sorting and searching). This class also contains a static factory that allows arrays to be viewed as lists.
The methods in this class all throw a NullPointerException
, if the specified array reference is null, except where noted.
The documentation for the methods contained in this class includes brief descriptions of the implementations. Such descriptions should be regarded as implementation notes, rather than parts of the specification. Implementors should feel free to substitute other algorithms, so long as the specification itself is adhered to. (For example, the algorithm used by sort(Object[])
does not have to be a MergeSort, but it does have to be stable.)
This class is a member of the Java Collections Framework.
Added in 1.2.
Java documentation for java.util.Arrays
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
Arrays(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
Properties
Class |
Returns the runtime class of this |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
PeerReference | (Inherited from Object) |
ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
Methods
AsList(Object[]) |
Returns a fixed-size list backed by the specified array. |
BinarySearch(Byte[], Int32, Int32, SByte) |
Searches a range of the specified array of bytes for the specified value using the binary search algorithm. |
BinarySearch(Byte[], SByte) |
Searches the specified array of bytes for the specified value using the binary search algorithm. |
BinarySearch(Char[], Char) |
Searches the specified array of chars for the specified value using the binary search algorithm. |
BinarySearch(Char[], Int32, Int32, Char) |
Searches a range of the specified array of chars for the specified value using the binary search algorithm. |
BinarySearch(Double[], Double) |
Searches the specified array of doubles for the specified value using the binary search algorithm. |
BinarySearch(Double[], Int32, Int32, Double) |
Searches a range of the specified array of doubles for the specified value using the binary search algorithm. |
BinarySearch(Int16[], Int16) |
Searches the specified array of shorts for the specified value using the binary search algorithm. |
BinarySearch(Int16[], Int32, Int32, Int16) |
Searches a range of the specified array of shorts for the specified value using the binary search algorithm. |
BinarySearch(Int32[], Int32, Int32, Int32) |
Searches a range of the specified array of ints for the specified value using the binary search algorithm. |
BinarySearch(Int32[], Int32) |
Searches the specified array of ints for the specified value using the binary search algorithm. |
BinarySearch(Int64[], Int32, Int32, Int64) |
Searches a range of the specified array of longs for the specified value using the binary search algorithm. |
BinarySearch(Int64[], Int64) |
Searches the specified array of longs for the specified value using the binary search algorithm. |
BinarySearch(Object[], Int32, Int32, Object, IComparator) |
Searches a range of the specified array for the specified object using the binary search algorithm. |
BinarySearch(Object[], Int32, Int32, Object) |
Searches a range of the specified array for the specified object using the binary search algorithm. |
BinarySearch(Object[], Object, IComparator) |
Searches the specified array for the specified object using the binary search algorithm. |
BinarySearch(Object[], Object) |
Searches the specified array for the specified object using the binary search algorithm. |
BinarySearch(Single[], Int32, Int32, Single) |
Searches a range of the specified array of floats for the specified value using the binary search algorithm. |
BinarySearch(Single[], Single) |
Searches the specified array of floats for the specified value using the binary search algorithm. |
Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
Compare(Boolean[], Boolean[]) |
Compares two |
Compare(Boolean[], Int32, Int32, Boolean[], Int32, Int32) |
Compares two |
Compare(Byte[], Byte[]) |
Compares two |
Compare(Byte[], Int32, Int32, Byte[], Int32, Int32) |
Compares two |
Compare(Char[], Char[]) |
Compares two |
Compare(Char[], Int32, Int32, Char[], Int32, Int32) |
Compares two |
Compare(Double[], Double[]) |
Compares two |
Compare(Double[], Int32, Int32, Double[], Int32, Int32) |
Compares two |
Compare(Int16[], Int16[]) |
Compares two |
Compare(Int16[], Int32, Int32, Int16[], Int32, Int32) |
Compares two |
Compare(Int32[], Int32, Int32, Int32[], Int32, Int32) |
Compares two |
Compare(Int32[], Int32[]) |
Compares two |
Compare(Int64[], Int32, Int32, Int64[], Int32, Int32) |
Compares two |
Compare(Int64[], Int64[]) |
Compares two |
Compare(Object[], Int32, Int32, Object[], Int32, Int32, IComparator) |
Compares two |
Compare(Object[], Int32, Int32, Object[], Int32, Int32) |
Compares two |
Compare(Object[], Object[], IComparator) |
Compares two |
Compare(Object[], Object[]) |
Compares two |
Compare(Single[], Int32, Int32, Single[], Int32, Int32) |
Compares two |
Compare(Single[], Single[]) |
Compares two |
CompareUnsigned(Byte[], Byte[]) |
Compares two |
CompareUnsigned(Byte[], Int32, Int32, Byte[], Int32, Int32) |
Compares two |
CompareUnsigned(Int16[], Int16[]) |
Compares two |
CompareUnsigned(Int16[], Int32, Int32, Int16[], Int32, Int32) |
Compares two |
CompareUnsigned(Int32[], Int32, Int32, Int32[], Int32, Int32) |
Compares two |
CompareUnsigned(Int32[], Int32[]) |
Compares two |
CompareUnsigned(Int64[], Int32, Int32, Int64[], Int32, Int32) |
Compares two |
CompareUnsigned(Int64[], Int64[]) |
Compares two |
CopyOf(Boolean[], Int32) |
Copies the specified array, truncating or padding with |
CopyOf(Byte[], Int32) |
Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length. |
CopyOf(Char[], Int32) |
Copies the specified array, truncating or padding with null characters (if necessary) so the copy has the specified length. |
CopyOf(Double[], Int32) |
Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length. |
CopyOf(Int16[], Int32) |
Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length. |
CopyOf(Int32[], Int32) |
Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length. |
CopyOf(Int64[], Int32) |
Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length. |
CopyOf(Object[], Int32, Class) |
Copies the specified array, truncating or padding with nulls (if necessary) so the copy has the specified length. |
CopyOf(Object[], Int32) |
Copies the specified array, truncating or padding with nulls (if necessary) so the copy has the specified length. |
CopyOf(Single[], Int32) |
Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length. |
CopyOfRange(Boolean[], Int32, Int32) |
Copies the specified range of the specified array into a new array. |
CopyOfRange(Byte[], Int32, Int32) |
Copies the specified range of the specified array into a new array. |
CopyOfRange(Char[], Int32, Int32) |
Copies the specified range of the specified array into a new array. |
CopyOfRange(Double[], Int32, Int32) |
Copies the specified range of the specified array into a new array. |
CopyOfRange(Int16[], Int32, Int32) |
Copies the specified range of the specified array into a new array. |
CopyOfRange(Int32[], Int32, Int32) |
Copies the specified range of the specified array into a new array. |
CopyOfRange(Int64[], Int32, Int32) |
Copies the specified range of the specified array into a new array. |
CopyOfRange(Object[], Int32, Int32, Class) |
Copies the specified range of the specified array into a new array. |
CopyOfRange(Object[], Int32, Int32) |
Copies the specified range of the specified array into a new array. |
CopyOfRange(Single[], Int32, Int32) |
Copies the specified range of the specified array into a new array. |
DeepEquals(Object[], Object[]) |
Returns |
DeepHashCode(Object[]) |
Returns a hash code based on the "deep contents" of the specified array. |
DeepToString(Object[]) |
Returns a string representation of the "deep contents" of the specified array. |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Equals(Boolean[], Boolean[]) |
Returns |
Equals(Boolean[], Int32, Int32, Boolean[], Int32, Int32) |
Returns true if the two specified arrays of booleans, over the specified ranges, are equal to one another. |
Equals(Byte[], Byte[]) |
Returns |
Equals(Byte[], Int32, Int32, Byte[], Int32, Int32) |
Returns true if the two specified arrays of bytes, over the specified ranges, are equal to one another. |
Equals(Char[], Char[]) |
Returns |
Equals(Char[], Int32, Int32, Char[], Int32, Int32) |
Returns true if the two specified arrays of chars, over the specified ranges, are equal to one another. |
Equals(Double[], Double[]) |
Returns |
Equals(Double[], Int32, Int32, Double[], Int32, Int32) |
Returns true if the two specified arrays of doubles, over the specified ranges, are equal to one another. |
Equals(Int16[], Int16[]) |
Returns |
Equals(Int16[], Int32, Int32, Int16[], Int32, Int32) |
Returns true if the two specified arrays of shorts, over the specified ranges, are equal to one another. |
Equals(Int32[], Int32, Int32, Int32[], Int32, Int32) |
Returns true if the two specified arrays of ints, over the specified ranges, are equal to one another. |
Equals(Int32[], Int32[]) |
Returns |
Equals(Int64[], Int32, Int32, Int64[], Int32, Int32) |
Returns true if the two specified arrays of longs, over the specified ranges, are equal to one another. |
Equals(Int64[], Int64[]) |
Returns |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
Equals(Object[], Int32, Int32, Object[], Int32, Int32, IComparator) |
Returns true if the two specified arrays of Objects, over the specified ranges, are equal to one another. |
Equals(Object[], Int32, Int32, Object[], Int32, Int32) |
Returns true if the two specified arrays of Objects, over the specified ranges, are equal to one another. |
Equals(Object[], Object[], IComparator) |
Returns |
Equals(Object[], Object[]) |
Returns |
Equals(Single[], Int32, Int32, Single[], Int32, Int32) |
Returns true if the two specified arrays of floats, over the specified ranges, are equal to one another. |
Equals(Single[], Single[]) |
Returns |
Fill(Boolean[], Boolean) |
Assigns the specified boolean value to each element of the specified array of booleans. |
Fill(Boolean[], Int32, Int32, Boolean) |
Assigns the specified boolean value to each element of the specified range of the specified array of booleans. |
Fill(Byte[], Int32, Int32, SByte) |
Assigns the specified byte value to each element of the specified range of the specified array of bytes. |
Fill(Byte[], SByte) |
Assigns the specified byte value to each element of the specified array of bytes. |
Fill(Char[], Char) |
Assigns the specified char value to each element of the specified array of chars. |
Fill(Char[], Int32, Int32, Char) |
Assigns the specified char value to each element of the specified range of the specified array of chars. |
Fill(Double[], Double) |
Assigns the specified double value to each element of the specified array of doubles. |
Fill(Double[], Int32, Int32, Double) |
Assigns the specified double value to each element of the specified range of the specified array of doubles. |
Fill(Int16[], Int16) |
Assigns the specified short value to each element of the specified array of shorts. |
Fill(Int16[], Int32, Int32, Int16) |
Assigns the specified short value to each element of the specified range of the specified array of shorts. |
Fill(Int32[], Int32, Int32, Int32) |
Assigns the specified int value to each element of the specified range of the specified array of ints. |
Fill(Int32[], Int32) |
Assigns the specified int value to each element of the specified array of ints. |
Fill(Int64[], Int32, Int32, Int64) |
Assigns the specified long value to each element of the specified range of the specified array of longs. |
Fill(Int64[], Int64) |
Assigns the specified long value to each element of the specified array of longs. |
Fill(Object[], Int32, Int32, Object) |
Assigns the specified Object reference to each element of the specified range of the specified array of Objects. |
Fill(Object[], Object) |
Assigns the specified Object reference to each element of the specified array of Objects. |
Fill(Single[], Int32, Int32, Single) |
Assigns the specified float value to each element of the specified range of the specified array of floats. |
Fill(Single[], Single) |
Assigns the specified float value to each element of the specified array of floats. |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
HashCode(Boolean[]) |
Returns a hash code based on the contents of the specified array. |
HashCode(Byte[]) |
Returns a hash code based on the contents of the specified array. |
HashCode(Char[]) |
Returns a hash code based on the contents of the specified array. |
HashCode(Double[]) |
Returns a hash code based on the contents of the specified array. |
HashCode(Int16[]) |
Returns a hash code based on the contents of the specified array. |
HashCode(Int32[]) |
Returns a hash code based on the contents of the specified array. |
HashCode(Int64[]) |
Returns a hash code based on the contents of the specified array. |
HashCode(Object[]) |
Returns a hash code based on the contents of the specified array. |
HashCode(Single[]) |
Returns a hash code based on the contents of the specified array. |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
Mismatch(Boolean[], Boolean[]) |
Finds and returns the index of the first mismatch between two
|
Mismatch(Boolean[], Int32, Int32, Boolean[], Int32, Int32) |
Finds and returns the relative index of the first mismatch between two
|
Mismatch(Byte[], Byte[]) |
Finds and returns the index of the first mismatch between two |
Mismatch(Byte[], Int32, Int32, Byte[], Int32, Int32) |
Finds and returns the relative index of the first mismatch between two
|
Mismatch(Char[], Char[]) |
Finds and returns the index of the first mismatch between two |
Mismatch(Char[], Int32, Int32, Char[], Int32, Int32) |
Finds and returns the relative index of the first mismatch between two
|
Mismatch(Double[], Double[]) |
Finds and returns the index of the first mismatch between two
|
Mismatch(Double[], Int32, Int32, Double[], Int32, Int32) |
Finds and returns the relative index of the first mismatch between two
|
Mismatch(Int16[], Int16[]) |
Finds and returns the index of the first mismatch between two |
Mismatch(Int16[], Int32, Int32, Int16[], Int32, Int32) |
Finds and returns the relative index of the first mismatch between two
|
Mismatch(Int32[], Int32, Int32, Int32[], Int32, Int32) |
Finds and returns the relative index of the first mismatch between two
|
Mismatch(Int32[], Int32[]) |
Finds and returns the index of the first mismatch between two |
Mismatch(Int64[], Int32, Int32, Int64[], Int32, Int32) |
Finds and returns the relative index of the first mismatch between two
|
Mismatch(Int64[], Int64[]) |
Finds and returns the index of the first mismatch between two |
Mismatch(Object[], Int32, Int32, Object[], Int32, Int32, IComparator) |
Finds and returns the relative index of the first mismatch between two
|
Mismatch(Object[], Int32, Int32, Object[], Int32, Int32) |
Finds and returns the relative index of the first mismatch between two
|
Mismatch(Object[], Object[], IComparator) |
Finds and returns the index of the first mismatch between two
|
Mismatch(Object[], Object[]) |
Finds and returns the index of the first mismatch between two
|
Mismatch(Single[], Int32, Int32, Single[], Int32, Int32) |
Finds and returns the relative index of the first mismatch between two
|
Mismatch(Single[], Single[]) |
Finds and returns the index of the first mismatch between two |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
ParallelPrefix(Double[], IDoubleBinaryOperator) |
Cumulates, in parallel, each element of the given array in place, using the supplied function. |
ParallelPrefix(Double[], Int32, Int32, IDoubleBinaryOperator) |
Performs |
ParallelPrefix(Int32[], IIntBinaryOperator) |
Cumulates, in parallel, each element of the given array in place, using the supplied function. |
ParallelPrefix(Int32[], Int32, Int32, IIntBinaryOperator) |
Performs |
ParallelPrefix(Int64[], ILongBinaryOperator) |
Cumulates, in parallel, each element of the given array in place, using the supplied function. |
ParallelPrefix(Int64[], Int32, Int32, ILongBinaryOperator) |
Performs |
ParallelPrefix(Object[], IBinaryOperator) |
Cumulates, in parallel, each element of the given array in place, using the supplied function. |
ParallelPrefix(Object[], Int32, Int32, IBinaryOperator) |
Performs |
ParallelSetAll(Double[], IIntToDoubleFunction) |
Set all elements of the specified array, in parallel, using the provided generator function to compute each element. |
ParallelSetAll(Int32[], IIntUnaryOperator) |
Set all elements of the specified array, in parallel, using the provided generator function to compute each element. |
ParallelSetAll(Int64[], IIntToLongFunction) |
Set all elements of the specified array, in parallel, using the provided generator function to compute each element. |
ParallelSetAll(Object[], IIntFunction) |
Set all elements of the specified array, in parallel, using the provided generator function to compute each element. |
ParallelSort(Byte[], Int32, Int32) |
Sorts the specified range of the array into ascending numerical order. |
ParallelSort(Byte[]) |
Sorts the specified array into ascending numerical order. |
ParallelSort(Char[], Int32, Int32) |
Sorts the specified range of the array into ascending numerical order. |
ParallelSort(Char[]) |
Sorts the specified array into ascending numerical order. |
ParallelSort(Double[], Int32, Int32) |
Sorts the specified range of the array into ascending numerical order. |
ParallelSort(Double[]) |
Sorts the specified array into ascending numerical order. |
ParallelSort(Int16[], Int32, Int32) |
Sorts the specified range of the array into ascending numerical order. |
ParallelSort(Int16[]) |
Sorts the specified array into ascending numerical order. |
ParallelSort(Int32[], Int32, Int32) |
Sorts the specified range of the array into ascending numerical order. |
ParallelSort(Int32[]) |
Sorts the specified array into ascending numerical order. |
ParallelSort(Int64[], Int32, Int32) |
Sorts the specified range of the array into ascending numerical order. |
ParallelSort(Int64[]) |
Sorts the specified array into ascending numerical order. |
ParallelSort(Object[], IComparator) |
Sorts the specified array of objects according to the order induced by the specified comparator. |
ParallelSort(Object[], Int32, Int32, IComparator) |
Sorts the specified range of the specified array of objects according to the order induced by the specified comparator. |
ParallelSort(Object[], Int32, Int32) |
Sorts the specified range of the specified array of objects into ascending order, according to the Comparable natural ordering of its elements. |
ParallelSort(Object[]) |
Sorts the specified array of objects into ascending order, according to the Comparable natural ordering of its elements. |
ParallelSort(Single[], Int32, Int32) |
Sorts the specified range of the array into ascending numerical order. |
ParallelSort(Single[]) |
Sorts the specified array into ascending numerical order. |
SetAll(Double[], IIntToDoubleFunction) |
Set all elements of the specified array, using the provided generator function to compute each element. |
SetAll(Int32[], IIntUnaryOperator) |
Set all elements of the specified array, using the provided generator function to compute each element. |
SetAll(Int64[], IIntToLongFunction) |
Set all elements of the specified array, using the provided generator function to compute each element. |
SetAll(Object[], IIntFunction) |
Set all elements of the specified array, using the provided generator function to compute each element. |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
Sort(Byte[], Int32, Int32) |
Sorts the specified range of the array into ascending order. |
Sort(Byte[]) |
Sorts the specified array into ascending numerical order. |
Sort(Char[], Int32, Int32) |
Sorts the specified range of the array into ascending order. |
Sort(Char[]) |
Sorts the specified array into ascending numerical order. |
Sort(Double[], Int32, Int32) |
Sorts the specified range of the array into ascending order. |
Sort(Double[]) |
Sorts the specified array into ascending numerical order. |
Sort(Int16[], Int32, Int32) |
Sorts the specified range of the array into ascending order. |
Sort(Int16[]) |
Sorts the specified array into ascending numerical order. |
Sort(Int32[], Int32, Int32) |
Sorts the specified range of the array into ascending order. |
Sort(Int32[]) |
Sorts the specified array into ascending numerical order. |
Sort(Int64[], Int32, Int32) |
Sorts the specified range of the array into ascending order. |
Sort(Int64[]) |
Sorts the specified array into ascending numerical order. |
Sort(Object[], IComparator) |
Sorts the specified array of objects according to the order induced by the specified comparator. |
Sort(Object[], Int32, Int32, IComparator) |
Sorts the specified range of the specified array of objects according to the order induced by the specified comparator. |
Sort(Object[], Int32, Int32) |
Sorts the specified range of the specified array of objects into ascending order, according to the Comparable natural ordering of its elements. |
Sort(Object[]) |
Sorts the specified array of objects into ascending order, according to the Comparable natural ordering of its elements. |
Sort(Single[], Int32, Int32) |
Sorts the specified range of the array into ascending order. |
Sort(Single[]) |
Sorts the specified array into ascending numerical order. |
Spliterator(Object[], Int32, Int32) |
Returns a |
Spliterator(Object[]) |
Returns a |
ToArray<T>() | (Inherited from Object) |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
ToString(Boolean[]) |
Returns a string representation of the contents of the specified array. |
ToString(Byte[]) |
Returns a string representation of the contents of the specified array. |
ToString(Char[]) |
Returns a string representation of the contents of the specified array. |
ToString(Double[]) |
Returns a string representation of the contents of the specified array. |
ToString(Int16[]) |
Returns a string representation of the contents of the specified array. |
ToString(Int32[]) |
Returns a string representation of the contents of the specified array. |
ToString(Int64[]) |
Returns a string representation of the contents of the specified array. |
ToString(Object[]) |
Returns a string representation of the contents of the specified array. |
ToString(Single[]) |
Returns a string representation of the contents of the specified array. |
UnregisterFromRuntime() | (Inherited from Object) |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |