Sdílet prostřednictvím


DoubleBuffer.Get Method

Definition

Overloads

Get()

Relative get method.

Get(Double[])

Relative bulk get method.

Get(Int32)

Absolute get method.

Get(Double[], Int32, Int32)

Relative bulk get method.

Get()

Relative get method.

[Android.Runtime.Register("get", "()D", "GetGetHandler")]
public abstract double Get ();
[<Android.Runtime.Register("get", "()D", "GetGetHandler")>]
abstract member Get : unit -> double

Returns

The double at the buffer's current position

Attributes

Exceptions

if the position is equal or greater than limit.

Remarks

Relative get method. Reads the double at this buffer's current position, and then increments the position.

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

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

Get(Double[])

Relative bulk get method.

[Android.Runtime.Register("get", "([D)Ljava/nio/DoubleBuffer;", "GetGet_arrayDHandler")]
public virtual Java.Nio.DoubleBuffer? Get (double[]? dst);
[<Android.Runtime.Register("get", "([D)Ljava/nio/DoubleBuffer;", "GetGet_arrayDHandler")>]
abstract member Get : double[] -> Java.Nio.DoubleBuffer
override this.Get : double[] -> Java.Nio.DoubleBuffer

Parameters

dst
Double[]

The destination array

Returns

This buffer

Attributes

Exceptions

if dst.length is greater than remaining().

Remarks

Relative bulk get method.

This method transfers doubles from this buffer into the given destination array. An invocation of this method of the form src.get(a) behaves in exactly the same way as the invocation

src.get(a, 0, a.length)

Java documentation for java.nio.DoubleBuffer.get(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

Get(Int32)

Absolute get method.

[Android.Runtime.Register("get", "(I)D", "GetGet_IHandler")]
public abstract double Get (int index);
[<Android.Runtime.Register("get", "(I)D", "GetGet_IHandler")>]
abstract member Get : int -> double

Parameters

index
Int32

The index from which the double will be read

Returns

The double at the given index

Attributes

Exceptions

if index is invalid.

Remarks

Absolute get method. Reads the double at the given index.

Java documentation for java.nio.DoubleBuffer.get(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

Get(Double[], Int32, Int32)

Relative bulk get method.

[Android.Runtime.Register("get", "([DII)Ljava/nio/DoubleBuffer;", "GetGet_arrayDIIHandler")]
public virtual Java.Nio.DoubleBuffer? Get (double[]? dst, int offset, int length);
[<Android.Runtime.Register("get", "([DII)Ljava/nio/DoubleBuffer;", "GetGet_arrayDIIHandler")>]
abstract member Get : double[] * int * int -> Java.Nio.DoubleBuffer
override this.Get : double[] * int * int -> Java.Nio.DoubleBuffer

Parameters

dst
Double[]

The array into which doubles are to be written

offset
Int32

The offset within the array of the first double to be written; must be non-negative and no larger than dst.length

length
Int32

The maximum number of doubles to be written to the given array; must be non-negative and no larger than dst.length - offset

Returns

This buffer

Attributes

Exceptions

if either dstOffset or doubleCount is invalid.

if doubleCount is greater than remaining().

Remarks

Relative bulk get method.

This method transfers doubles from this buffer into the given destination array. If there are fewer doubles remaining in the buffer than are required to satisfy the request, that is, if length&nbsp;&gt;&nbsp;remaining(), then no doubles are transferred and a BufferUnderflowException is thrown.

Otherwise, this method copies length doubles from this buffer into the given array, starting at the current position of this buffer and at the given offset in the array. The position of this buffer is then incremented by length.

In other words, an invocation of this method of the form src.get(dst,&nbsp;off,&nbsp;len) has exactly the same effect as the loop

{@code
                for (int i = off; i < off + len; i++)
                    dst[i] = src.get();
            }

except that it first checks that there are sufficient doubles in this buffer and it is potentially much more efficient.

Java documentation for java.nio.DoubleBuffer.get(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