public final class Float64Array extends TypeArray
Modifier and Type | Field and Description |
---|---|
static int |
BYTES_PER_ELEMENT |
Modifier and Type | Method and Description |
---|---|
static Float64Array |
create(ArrayBuffer buffer)
Create a new Float64Array object using the passed
ArrayBuffer for
its storage. |
static Float64Array |
create(ArrayBuffer buffer,
int byteOffset)
Create a new Float64Array object using the passed
ArrayBuffer for
its storage. |
static Float64Array |
create(ArrayBuffer buffer,
int byteOffset,
int length)
Create a new Float64Array object using the passed
ArrayBuffer for
its storage. |
static Float64Array |
create(double... array)
Create a new
ArrayBuffer with enough bytes to hold array.length
elements of this typed array, then creates a typed array view referring
to the full buffer. |
static Float64Array |
create(int length)
Create a new
ArrayBuffer with enough bytes to hold length elements
of this typed array, then creates a typed array view referring to the full
buffer. |
static Float64Array |
create(com.google.gwt.core.client.JsArrayNumber array)
Create a new
ArrayBuffer with enough bytes to hold array.length
elements of this typed array, then creates a typed array view referring
to the full buffer. |
static Float64Array |
create(TypeArray array)
Create a new
ArrayBuffer with enough bytes to hold array.length
elements of this typed array, then creates a typed array view referring
to the full buffer. |
double |
get(int index)
Returns the element at the given numeric index.
|
void |
set(int index,
double value)
Sets the element at the given numeric index to the given value.
|
void |
set(com.google.gwt.core.client.JsArrayNumber array)
Set multiple values, reading input values from the array.
|
void |
set(com.google.gwt.core.client.JsArrayNumber array,
int offset)
/**
Set multiple values, reading input values from the array.
|
Float64Array |
slice(int begin)
Returns a new Float64Array view of the
ArrayBuffer store for this
Float64Array, referencing the elements at begin, inclusive, up to end,
exclusive. |
Float64Array |
slice(int begin,
int end)
Returns a new Float64Array view of the
ArrayBuffer store for this
Float64Array, referencing the elements at begin, inclusive, up to end,
exclusive. |
getLength, reverse, set, set
getBuffer, getByteLength, getByteOffset
public static final int BYTES_PER_ELEMENT
public static Float64Array create(int length)
ArrayBuffer
with enough bytes to hold length elements
of this typed array, then creates a typed array view referring to the full
buffer.length
- public static Float64Array create(TypeArray array)
ArrayBuffer
with enough bytes to hold array.length
elements of this typed array, then creates a typed array view referring
to the full buffer. The contents of the new view are initialized to the
contents of the given typed array or sequence, with each element converted
to the appropriate typed array type.array
- public static Float64Array create(double... array)
ArrayBuffer
with enough bytes to hold array.length
elements of this typed array, then creates a typed array view referring
to the full buffer. The contents of the new view are initialized to the
contents of the given typed array or sequence, with each element converted
to the appropriate typed array type.array
- public static Float64Array create(com.google.gwt.core.client.JsArrayNumber array)
ArrayBuffer
with enough bytes to hold array.length
elements of this typed array, then creates a typed array view referring
to the full buffer. The contents of the new view are initialized to the
contents of the given typed array or sequence, with each element converted
to the appropriate typed array type.array
- public static Float64Array create(ArrayBuffer buffer)
ArrayBuffer
for
its storage. The Float64Array spans the entire ArrayBuffer
range.buffer
- public static Float64Array create(ArrayBuffer buffer, int byteOffset)
ArrayBuffer
for
its storage. The Float64Array extends from the given byteOffset until the
end of the ArrayBuffer
.
The given byteOffset must be a multiple of the element size of the
specific type, otherwise an INDEX_SIZE_ERR exception is raised.
If a given byteOffset references an area beyond the end of the
ArrayBuffer
an INDEX_SIZE_ERR exception is raised.
The length of the ArrayBuffer
minus the byteOffset must be a
multiple of the element size of the specific type, or an INDEX_SIZE_ERR
exception is raised.buffer
- byteOffset
- indicates the offset in bytes from the start of the
ArrayBuffer
public static Float64Array create(ArrayBuffer buffer, int byteOffset, int length)
ArrayBuffer
for
its storage.
The given byteOffset must be a multiple of the element size of the
specific type, otherwise an INDEX_SIZE_ERR exception is raised.
If a given byteOffset and length references an area beyond the end of the
ArrayBuffer
an INDEX_SIZE_ERR exception is raised.buffer
- byteOffset
- indicates the offset in bytes from the start of the
ArrayBuffer
length
- the count of elements from the offset that this
Float64Array will referencepublic double get(int index)
index
- public void set(int index, double value)
index
- value
- public void set(com.google.gwt.core.client.JsArrayNumber array)
public void set(com.google.gwt.core.client.JsArrayNumber array, int offset)
array
- offset
- indicates the index in the current array where values are
written.public Float64Array slice(int begin)
ArrayBuffer
store for this
Float64Array, referencing the elements at begin, inclusive, up to end,
exclusive. If either begin or end is negative, it refers to an index from
the end of the array, as opposed to from the beginning.
The slice contains all elements from begin to the end of the Float64Array.
The range specified by the begin and end values is clamped to the valid
index range for the current array. If the computed length of the new
Float64Array would be negative, it is clamped to zero.
The returned Float64Array will be of the same type as the array on which this
method is invoked.begin
- public Float64Array slice(int begin, int end)
ArrayBuffer
store for this
Float64Array, referencing the elements at begin, inclusive, up to end,
exclusive. If either begin or end is negative, it refers to an index from
the end of the array, as opposed to from the beginning.
The slice contains all elements from begin to the end of the Float64Array.
The range specified by the begin and end values is clamped to the valid
index range for the current array. If the computed length of the new
Float64Array would be negative, it is clamped to zero.
The returned Float64Array will be of the same type as the array on which this
method is invoked.begin
- end
-