DoubleBuffer.CompareTo(DoubleBuffer) Method

Definition

Compares this buffer to another.

[Android.Runtime.Register("compareTo", "(Ljava/nio/DoubleBuffer;)I", "GetCompareTo_Ljava_nio_DoubleBuffer_Handler")]
public virtual int CompareTo (Java.Nio.DoubleBuffer? that);
[<Android.Runtime.Register("compareTo", "(Ljava/nio/DoubleBuffer;)I", "GetCompareTo_Ljava_nio_DoubleBuffer_Handler")>]
abstract member CompareTo : Java.Nio.DoubleBuffer -> int
override this.CompareTo : Java.Nio.DoubleBuffer -> 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 other is not a double buffer.

Remarks

Compares this buffer to another.

Two double 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 double elements are compared as if by invoking Double#compare(double,double), except that -0.0 and 0.0 are considered to be equal. Double.NaN is considered by this method to be equal to itself and greater than all other double values (including Double.POSITIVE_INFINITY).

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

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

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