Sdílet prostřednictvím


ShortBuffer.CompareTo(ShortBuffer) Method

Definition

Compares this buffer to another.

[Android.Runtime.Register("compareTo", "(Ljava/nio/ShortBuffer;)I", "GetCompareTo_Ljava_nio_ShortBuffer_Handler")]
public virtual int CompareTo (Java.Nio.ShortBuffer? that);
[<Android.Runtime.Register("compareTo", "(Ljava/nio/ShortBuffer;)I", "GetCompareTo_Ljava_nio_ShortBuffer_Handler")>]
abstract member CompareTo : Java.Nio.ShortBuffer -> int
override this.CompareTo : Java.Nio.ShortBuffer -> int

Parameters

Returns

A negative integer, zero, or a positive integer as this buffer is less than, equal to, or greater than the given buffer

Attributes

Exceptions

if otherBuffer is not a short buffer.

Remarks

Compares this buffer to another.

Two short buffers are compared by comparing their sequences of remaining elements lexicographically, without regard to the starting position of each sequence within its corresponding buffer.

Pairs of short elements are compared as if by invoking Short#compare(short,short).

A short buffer is not comparable to any other type of object.

Java documentation for java.nio.ShortBuffer.compareTo(java.nio.ShortBuffer).

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