Sdílet prostřednictvím


Arrays.Equals Method

Definition

Overloads

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[], Int32, Int32, Char[], Int32, Int32)

Returns true if the two specified arrays of chars, over the specified ranges, are equal to one another.

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(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(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(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(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(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(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(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(Int16[], Int16[])

Returns true if the two specified arrays of shorts are equal to one another.

Equals(Single[], Single[])

Returns true if the two specified arrays of floats are equal to one another.

Equals(Int64[], Int64[])

Returns true if the two specified arrays of longs are equal to one another.

Equals(Int32[], Int32[])

Returns true if the two specified arrays of ints are equal to one another.

Equals(Double[], Double[])

Returns true if the two specified arrays of doubles are equal to one another.

Equals(Char[], Char[])

Returns true if the two specified arrays of chars are equal to one another.

Equals(Byte[], Byte[])

Returns true if the two specified arrays of bytes are equal to one another.

Equals(Boolean[], Boolean[])

Returns true if the two specified arrays of booleans are equal to one another.

Equals(Object[], Object[])

Returns true if the two specified arrays of Objects are equal to one another.

Equals(Object[], Object[], IComparator)

Returns true if the two specified arrays of Objects are equal to one another.

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.

[Android.Runtime.Register("equals", "([BII[BII)Z", "", ApiSince=33)]
public static bool Equals (byte[] a, int aFromIndex, int aToIndex, byte[] b, int bFromIndex, int bToIndex);
[<Android.Runtime.Register("equals", "([BII[BII)Z", "", ApiSince=33)>]
static member Equals : byte[] * int * int * byte[] * int * int -> bool

Parameters

a
Byte[]

the first array to be tested for equality

aFromIndex
Int32

the index (inclusive) of the first element in the first array to be tested

aToIndex
Int32

the index (exclusive) of the last element in the first array to be tested

b
Byte[]

the second array to be tested for equality

bFromIndex
Int32

the index (inclusive) of the first element in the second array to be tested

bToIndex
Int32

the index (exclusive) of the last element in the second array to be tested

Returns

true if the two arrays, over the specified ranges, are equal

Attributes

Remarks

Returns true if the two specified arrays of bytes, over the specified ranges, are equal to one another.

Two arrays are considered equal if the number of elements covered by each range is the same, and all corresponding pairs of elements over the specified ranges in the two arrays are equal. In other words, two arrays are equal if they contain, over the specified ranges, the same elements in the same order.

Added in 9.

Java documentation for java.util.Arrays.equals(byte[], int, int, byte[], int, int).

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.

Applies to

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.

[Android.Runtime.Register("equals", "([CII[CII)Z", "", ApiSince=33)]
public static bool Equals (char[] a, int aFromIndex, int aToIndex, char[] b, int bFromIndex, int bToIndex);
[<Android.Runtime.Register("equals", "([CII[CII)Z", "", ApiSince=33)>]
static member Equals : char[] * int * int * char[] * int * int -> bool

Parameters

a
Char[]

the first array to be tested for equality

aFromIndex
Int32

the index (inclusive) of the first element in the first array to be tested

aToIndex
Int32

the index (exclusive) of the last element in the first array to be tested

b
Char[]

the second array to be tested for equality

bFromIndex
Int32

the index (inclusive) of the first element in the second array to be tested

bToIndex
Int32

the index (exclusive) of the last element in the second array to be tested

Returns

true if the two arrays, over the specified ranges, are equal

Attributes

Remarks

Returns true if the two specified arrays of chars, over the specified ranges, are equal to one another.

Two arrays are considered equal if the number of elements covered by each range is the same, and all corresponding pairs of elements over the specified ranges in the two arrays are equal. In other words, two arrays are equal if they contain, over the specified ranges, the same elements in the same order.

Added in 9.

Java documentation for java.util.Arrays.equals(char[], int, int, char[], int, int).

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.

Applies to

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.

[Android.Runtime.Register("equals", "([Ljava/lang/Object;II[Ljava/lang/Object;IILjava/util/Comparator;)Z", "", ApiSince=33)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static bool Equals (Java.Lang.Object[] a, int aFromIndex, int aToIndex, Java.Lang.Object[] b, int bFromIndex, int bToIndex, Java.Util.IComparator cmp);
[<Android.Runtime.Register("equals", "([Ljava/lang/Object;II[Ljava/lang/Object;IILjava/util/Comparator;)Z", "", ApiSince=33)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member Equals : Java.Lang.Object[] * int * int * Java.Lang.Object[] * int * int * Java.Util.IComparator -> bool

Parameters

a
Object[]

the first array to be tested for equality

aFromIndex
Int32

the index (inclusive) of the first element in the first array to be tested

aToIndex
Int32

the index (exclusive) of the last element in the first array to be tested

b
Object[]

the second array to be tested for equality

bFromIndex
Int32

the index (inclusive) of the first element in the second array to be tested

bToIndex
Int32

the index (exclusive) of the last element in the second array to be tested

cmp
IComparator

the comparator to compare array elements

Returns

true if the two arrays, over the specified ranges, are equal

Attributes

Remarks

Returns true if the two specified arrays of Objects, over the specified ranges, are equal to one another.

Two arrays are considered equal if the number of elements covered by each range is the same, and all corresponding pairs of elements over the specified ranges in the two arrays are equal. In other words, two arrays are equal if they contain, over the specified ranges, the same elements in the same order.

Two objects e1 and e2 are considered equal if, given the specified comparator, cmp.compare(e1, e2) == 0.

Added in 9.

Java documentation for java.util.Arrays.equals(T[], int, int, T[], int, int, java.util.Comparator<? super T>).

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.

Applies to

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.

[Android.Runtime.Register("equals", "([DII[DII)Z", "", ApiSince=33)]
public static bool Equals (double[] a, int aFromIndex, int aToIndex, double[] b, int bFromIndex, int bToIndex);
[<Android.Runtime.Register("equals", "([DII[DII)Z", "", ApiSince=33)>]
static member Equals : double[] * int * int * double[] * int * int -> bool

Parameters

a
Double[]

the first array to be tested for equality

aFromIndex
Int32

the index (inclusive) of the first element in the first array to be tested

aToIndex
Int32

the index (exclusive) of the last element in the first array to be tested

b
Double[]

the second array to be tested for equality

bFromIndex
Int32

the index (inclusive) of the first element in the second array to be tested

bToIndex
Int32

the index (exclusive) of the last element in the second array to be tested

Returns

true if the two arrays, over the specified ranges, are equal

Attributes

Remarks

Returns true if the two specified arrays of doubles, over the specified ranges, are equal to one another.

Two arrays are considered equal if the number of elements covered by each range is the same, and all corresponding pairs of elements over the specified ranges in the two arrays are equal. In other words, two arrays are equal if they contain, over the specified ranges, the same elements in the same order.

Two doubles d1 and d2 are considered equal if:

{@code new Double(d1).equals(new Double(d2))}

(Unlike the == operator, this method considers NaN equal to itself, and 0.0d unequal to -0.0d.)

Added in 9.

Java documentation for java.util.Arrays.equals(double[], int, int, double[], int, int).

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.

Applies to

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.

[Android.Runtime.Register("equals", "([FII[FII)Z", "", ApiSince=33)]
public static bool Equals (float[] a, int aFromIndex, int aToIndex, float[] b, int bFromIndex, int bToIndex);
[<Android.Runtime.Register("equals", "([FII[FII)Z", "", ApiSince=33)>]
static member Equals : single[] * int * int * single[] * int * int -> bool

Parameters

a
Single[]

the first array to be tested for equality

aFromIndex
Int32

the index (inclusive) of the first element in the first array to be tested

aToIndex
Int32

the index (exclusive) of the last element in the first array to be tested

b
Single[]

the second array to be tested for equality

bFromIndex
Int32

the index (inclusive) of the first element in the second array to be tested

bToIndex
Int32

the index (exclusive) of the last element in the second array to be tested

Returns

true if the two arrays, over the specified ranges, are equal

Attributes

Remarks

Returns true if the two specified arrays of floats, over the specified ranges, are equal to one another.

Two arrays are considered equal if the number of elements covered by each range is the same, and all corresponding pairs of elements over the specified ranges in the two arrays are equal. In other words, two arrays are equal if they contain, over the specified ranges, the same elements in the same order.

Two floats f1 and f2 are considered equal if:

{@code new Float(f1).equals(new Float(f2))}

(Unlike the == operator, this method considers NaN equal to itself, and 0.0f unequal to -0.0f.)

Added in 9.

Java documentation for java.util.Arrays.equals(float[], int, int, float[], int, int).

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.

Applies to

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.

[Android.Runtime.Register("equals", "([III[III)Z", "", ApiSince=33)]
public static bool Equals (int[] a, int aFromIndex, int aToIndex, int[] b, int bFromIndex, int bToIndex);
[<Android.Runtime.Register("equals", "([III[III)Z", "", ApiSince=33)>]
static member Equals : int[] * int * int * int[] * int * int -> bool

Parameters

a
Int32[]

the first array to be tested for equality

aFromIndex
Int32

the index (inclusive) of the first element in the first array to be tested

aToIndex
Int32

the index (exclusive) of the last element in the first array to be tested

b
Int32[]

the second array to be tested for equality

bFromIndex
Int32

the index (inclusive) of the first element in the second array to be tested

bToIndex
Int32

the index (exclusive) of the last element in the second array to be tested

Returns

true if the two arrays, over the specified ranges, are equal

Attributes

Remarks

Returns true if the two specified arrays of ints, over the specified ranges, are equal to one another.

Two arrays are considered equal if the number of elements covered by each range is the same, and all corresponding pairs of elements over the specified ranges in the two arrays are equal. In other words, two arrays are equal if they contain, over the specified ranges, the same elements in the same order.

Added in 9.

Java documentation for java.util.Arrays.equals(int[], int, int, int[], int, int).

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.

Applies to

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.

[Android.Runtime.Register("equals", "([JII[JII)Z", "", ApiSince=33)]
public static bool Equals (long[] a, int aFromIndex, int aToIndex, long[] b, int bFromIndex, int bToIndex);
[<Android.Runtime.Register("equals", "([JII[JII)Z", "", ApiSince=33)>]
static member Equals : int64[] * int * int * int64[] * int * int -> bool

Parameters

a
Int64[]

the first array to be tested for equality

aFromIndex
Int32

the index (inclusive) of the first element in the first array to be tested

aToIndex
Int32

the index (exclusive) of the last element in the first array to be tested

b
Int64[]

the second array to be tested for equality

bFromIndex
Int32

the index (inclusive) of the first element in the second array to be tested

bToIndex
Int32

the index (exclusive) of the last element in the second array to be tested

Returns

true if the two arrays, over the specified ranges, are equal

Attributes

Remarks

Returns true if the two specified arrays of longs, over the specified ranges, are equal to one another.

Two arrays are considered equal if the number of elements covered by each range is the same, and all corresponding pairs of elements over the specified ranges in the two arrays are equal. In other words, two arrays are equal if they contain, over the specified ranges, the same elements in the same order.

Added in 9.

Java documentation for java.util.Arrays.equals(long[], int, int, long[], int, int).

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.

Applies to

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.

[Android.Runtime.Register("equals", "([ZII[ZII)Z", "", ApiSince=33)]
public static bool Equals (bool[] a, int aFromIndex, int aToIndex, bool[] b, int bFromIndex, int bToIndex);
[<Android.Runtime.Register("equals", "([ZII[ZII)Z", "", ApiSince=33)>]
static member Equals : bool[] * int * int * bool[] * int * int -> bool

Parameters

a
Boolean[]

the first array to be tested for equality

aFromIndex
Int32

the index (inclusive) of the first element in the first array to be tested

aToIndex
Int32

the index (exclusive) of the last element in the first array to be tested

b
Boolean[]

the second array to be tested for equality

bFromIndex
Int32

the index (inclusive) of the first element in the second array to be tested

bToIndex
Int32

the index (exclusive) of the last element in the second array to be tested

Returns

true if the two arrays, over the specified ranges, are equal

Attributes

Remarks

Returns true if the two specified arrays of booleans, over the specified ranges, are equal to one another.

Two arrays are considered equal if the number of elements covered by each range is the same, and all corresponding pairs of elements over the specified ranges in the two arrays are equal. In other words, two arrays are equal if they contain, over the specified ranges, the same elements in the same order.

Added in 9.

Java documentation for java.util.Arrays.equals(boolean[], int, int, boolean[], int, int).

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.

Applies to

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.

[Android.Runtime.Register("equals", "([SII[SII)Z", "", ApiSince=33)]
public static bool Equals (short[] a, int aFromIndex, int aToIndex, short[] b, int bFromIndex, int bToIndex);
[<Android.Runtime.Register("equals", "([SII[SII)Z", "", ApiSince=33)>]
static member Equals : int16[] * int * int * int16[] * int * int -> bool

Parameters

a
Int16[]

the first array to be tested for equality

aFromIndex
Int32

the index (inclusive) of the first element in the first array to be tested

aToIndex
Int32

the index (exclusive) of the last element in the first array to be tested

b
Int16[]

the second array to be tested for equality

bFromIndex
Int32

the index (inclusive) of the first element in the second array to be tested

bToIndex
Int32

the index (exclusive) of the last element in the second array to be tested

Returns

true if the two arrays, over the specified ranges, are equal

Attributes

Remarks

Returns true if the two specified arrays of shorts, over the specified ranges, are equal to one another.

Two arrays are considered equal if the number of elements covered by each range is the same, and all corresponding pairs of elements over the specified ranges in the two arrays are equal. In other words, two arrays are equal if they contain, over the specified ranges, the same elements in the same order.

Added in 9.

Java documentation for java.util.Arrays.equals(short[], int, int, short[], int, int).

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.

Applies to

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.

[Android.Runtime.Register("equals", "([Ljava/lang/Object;II[Ljava/lang/Object;II)Z", "", ApiSince=33)]
public static bool Equals (Java.Lang.Object[] a, int aFromIndex, int aToIndex, Java.Lang.Object[] b, int bFromIndex, int bToIndex);
[<Android.Runtime.Register("equals", "([Ljava/lang/Object;II[Ljava/lang/Object;II)Z", "", ApiSince=33)>]
static member Equals : Java.Lang.Object[] * int * int * Java.Lang.Object[] * int * int -> bool

Parameters

a
Object[]

the first array to be tested for equality

aFromIndex
Int32

the index (inclusive) of the first element in the first array to be tested

aToIndex
Int32

the index (exclusive) of the last element in the first array to be tested

b
Object[]

the second array to be tested for equality

bFromIndex
Int32

the index (inclusive) of the first element in the second array to be tested

bToIndex
Int32

the index (exclusive) of the last element in the second array to be tested

Returns

true if the two arrays, over the specified ranges, are equal

Attributes

Remarks

Returns true if the two specified arrays of Objects, over the specified ranges, are equal to one another.

Two arrays are considered equal if the number of elements covered by each range is the same, and all corresponding pairs of elements over the specified ranges in the two arrays are equal. In other words, two arrays are equal if they contain, over the specified ranges, the same elements in the same order.

Two objects e1 and e2 are considered equal if Objects.equals(e1, e2).

Added in 9.

Java documentation for java.util.Arrays.equals(java.lang.Object[], int, int, java.lang.Object[], int, int).

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.

Applies to

Equals(Int16[], Int16[])

Returns true if the two specified arrays of shorts are equal to one another.

[Android.Runtime.Register("equals", "([S[S)Z", "")]
public static bool Equals (short[]? a, short[]? a2);
[<Android.Runtime.Register("equals", "([S[S)Z", "")>]
static member Equals : int16[] * int16[] -> bool

Parameters

a
Int16[]

one array to be tested for equality

a2
Int16[]

the other array to be tested for equality

Returns

true if the two arrays are equal

Attributes

Remarks

Returns true if the two specified arrays of shorts are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Java documentation for java.util.Arrays.equals(short[], short[]).

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.

Applies to

Equals(Single[], Single[])

Returns true if the two specified arrays of floats are equal to one another.

[Android.Runtime.Register("equals", "([F[F)Z", "")]
public static bool Equals (float[]? a, float[]? a2);
[<Android.Runtime.Register("equals", "([F[F)Z", "")>]
static member Equals : single[] * single[] -> bool

Parameters

a
Single[]

one array to be tested for equality

a2
Single[]

the other array to be tested for equality

Returns

true if the two arrays are equal

Attributes

Remarks

Returns true if the two specified arrays of floats are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Two floats f1 and f2 are considered equal if:

{@code new Float(f1).equals(new Float(f2))}

(Unlike the == operator, this method considers NaN equal to itself, and 0.0f unequal to -0.0f.)

Java documentation for java.util.Arrays.equals(float[], float[]).

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.

Applies to

Equals(Int64[], Int64[])

Returns true if the two specified arrays of longs are equal to one another.

[Android.Runtime.Register("equals", "([J[J)Z", "")]
public static bool Equals (long[]? a, long[]? a2);
[<Android.Runtime.Register("equals", "([J[J)Z", "")>]
static member Equals : int64[] * int64[] -> bool

Parameters

a
Int64[]

one array to be tested for equality

a2
Int64[]

the other array to be tested for equality

Returns

true if the two arrays are equal

Attributes

Remarks

Returns true if the two specified arrays of longs are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Java documentation for java.util.Arrays.equals(long[], long[]).

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.

Applies to

Equals(Int32[], Int32[])

Returns true if the two specified arrays of ints are equal to one another.

[Android.Runtime.Register("equals", "([I[I)Z", "")]
public static bool Equals (int[]? a, int[]? a2);
[<Android.Runtime.Register("equals", "([I[I)Z", "")>]
static member Equals : int[] * int[] -> bool

Parameters

a
Int32[]

one array to be tested for equality

a2
Int32[]

the other array to be tested for equality

Returns

true if the two arrays are equal

Attributes

Remarks

Returns true if the two specified arrays of ints are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Java documentation for java.util.Arrays.equals(int[], int[]).

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.

Applies to

Equals(Double[], Double[])

Returns true if the two specified arrays of doubles are equal to one another.

[Android.Runtime.Register("equals", "([D[D)Z", "")]
public static bool Equals (double[]? a, double[]? a2);
[<Android.Runtime.Register("equals", "([D[D)Z", "")>]
static member Equals : double[] * double[] -> bool

Parameters

a
Double[]

one array to be tested for equality

a2
Double[]

the other array to be tested for equality

Returns

true if the two arrays are equal

Attributes

Remarks

Returns true if the two specified arrays of doubles are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Two doubles d1 and d2 are considered equal if:

{@code new Double(d1).equals(new Double(d2))}

(Unlike the == operator, this method considers NaN equal to itself, and 0.0d unequal to -0.0d.)

Java documentation for java.util.Arrays.equals(double[], double[]).

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.

Applies to

Equals(Char[], Char[])

Returns true if the two specified arrays of chars are equal to one another.

[Android.Runtime.Register("equals", "([C[C)Z", "")]
public static bool Equals (char[]? a, char[]? a2);
[<Android.Runtime.Register("equals", "([C[C)Z", "")>]
static member Equals : char[] * char[] -> bool

Parameters

a
Char[]

one array to be tested for equality

a2
Char[]

the other array to be tested for equality

Returns

true if the two arrays are equal

Attributes

Remarks

Returns true if the two specified arrays of chars are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Java documentation for java.util.Arrays.equals(char[], char[]).

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.

Applies to

Equals(Byte[], Byte[])

Returns true if the two specified arrays of bytes are equal to one another.

[Android.Runtime.Register("equals", "([B[B)Z", "")]
public static bool Equals (byte[]? a, byte[]? a2);
[<Android.Runtime.Register("equals", "([B[B)Z", "")>]
static member Equals : byte[] * byte[] -> bool

Parameters

a
Byte[]

one array to be tested for equality

a2
Byte[]

the other array to be tested for equality

Returns

true if the two arrays are equal

Attributes

Remarks

Returns true if the two specified arrays of bytes are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Java documentation for java.util.Arrays.equals(byte[], byte[]).

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.

Applies to

Equals(Boolean[], Boolean[])

Returns true if the two specified arrays of booleans are equal to one another.

[Android.Runtime.Register("equals", "([Z[Z)Z", "")]
public static bool Equals (bool[]? a, bool[]? a2);
[<Android.Runtime.Register("equals", "([Z[Z)Z", "")>]
static member Equals : bool[] * bool[] -> bool

Parameters

a
Boolean[]

one array to be tested for equality

a2
Boolean[]

the other array to be tested for equality

Returns

true if the two arrays are equal

Attributes

Remarks

Returns true if the two specified arrays of booleans are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Java documentation for java.util.Arrays.equals(boolean[], boolean[]).

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.

Applies to

Equals(Object[], Object[])

Returns true if the two specified arrays of Objects are equal to one another.

[Android.Runtime.Register("equals", "([Ljava/lang/Object;[Ljava/lang/Object;)Z", "")]
public static bool Equals (Java.Lang.Object[]? a, Java.Lang.Object[]? a2);
[<Android.Runtime.Register("equals", "([Ljava/lang/Object;[Ljava/lang/Object;)Z", "")>]
static member Equals : Java.Lang.Object[] * Java.Lang.Object[] -> bool

Parameters

a
Object[]

one array to be tested for equality

a2
Object[]

the other array to be tested for equality

Returns

true if the two arrays are equal

Attributes

Remarks

Returns true if the two specified arrays of Objects are equal to one another. The two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. Two objects e1 and e2 are considered equal if Objects.equals(e1, e2). In other words, the two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Java documentation for java.util.Arrays.equals(java.lang.Object[], java.lang.Object[]).

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.

Applies to

Equals(Object[], Object[], IComparator)

Returns true if the two specified arrays of Objects are equal to one another.

[Android.Runtime.Register("equals", "([Ljava/lang/Object;[Ljava/lang/Object;Ljava/util/Comparator;)Z", "", ApiSince=33)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static bool Equals (Java.Lang.Object[]? a, Java.Lang.Object[]? a2, Java.Util.IComparator cmp);
[<Android.Runtime.Register("equals", "([Ljava/lang/Object;[Ljava/lang/Object;Ljava/util/Comparator;)Z", "", ApiSince=33)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member Equals : Java.Lang.Object[] * Java.Lang.Object[] * Java.Util.IComparator -> bool

Parameters

a
Object[]

one array to be tested for equality

a2
Object[]

the other array to be tested for equality

cmp
IComparator

the comparator to compare array elements

Returns

true if the two arrays are equal

Attributes

Remarks

Returns true if the two specified arrays of Objects are equal to one another.

Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, the two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.

Two objects e1 and e2 are considered equal if, given the specified comparator, cmp.compare(e1, e2) == 0.

Added in 9.

Java documentation for java.util.Arrays.equals(T[], T[], java.util.Comparator<? super T>).

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.

Applies to