public class Float32Array extends Objs
Objs.Constructor<T extends Objs>, Objs.Property<T>
Modifier and Type | Field and Description |
---|---|
Objs.Property<ArrayBuffer> |
buffer
The ArrayBuffer instance referenced by the array.
|
Objs.Property<Number> |
byteLength
The length in bytes of the array.
|
Objs.Property<Number> |
byteOffset
The offset in bytes of the array.
|
Objs.Property<Number> |
BYTES_PER_ELEMENT
The size in bytes of each element in the array.
|
Objs.Property<Number> |
length
The length of the array.
|
static Float32Array |
prototype
Returns a string representation of an array.
|
Modifier | Constructor and Description |
---|---|
|
Float32Array(ArrayBuffer buffer) |
|
Float32Array(ArrayBuffer buffer,
double byteOffset) |
|
Float32Array(ArrayBuffer buffer,
double byteOffset,
double length) |
|
Float32Array(ArrayLike<Number> array) |
|
Float32Array(double length) |
protected |
Float32Array(Objs.Constructor<?> c,
Object js) |
Modifier and Type | Method and Description |
---|---|
static Float32Array |
$as(Object obj) |
double |
$get(double index) |
ArrayBuffer |
buffer() |
Number |
byteLength() |
Number |
byteOffset() |
Number |
BYTES_PER_ELEMENT() |
Float32Array |
copyWithin(double target,
double start)
Returns the this object after copying a section of the array identified by start and end
to the same array starting at position target
|
Float32Array |
copyWithin(double target,
double start,
double end)
Returns the this object after copying a section of the array identified by start and end
to the same array starting at position target
|
Boolean |
every(Function.A3<? super Number,? super Number,? super Float32Array,? extends Boolean> callbackfn)
Determines whether all the members of an array satisfy the specified test.
|
Boolean |
every(Function.A3<? super Number,? super Number,? super Float32Array,? extends Boolean> callbackfn,
Object thisArg)
Determines whether all the members of an array satisfy the specified test.
|
Float32Array |
fill(double value)
Returns the this object after filling the section identified by start and end with value
|
Float32Array |
fill(double value,
double start)
Returns the this object after filling the section identified by start and end with value
|
Float32Array |
fill(double value,
double start,
double end)
Returns the this object after filling the section identified by start and end with value
|
Float32Array |
filter(Function.A3<? super Number,? super Number,? super Float32Array,? extends Boolean> callbackfn)
Returns the elements of an array that meet the condition specified in a callback function.
|
Float32Array |
filter(Function.A3<? super Number,? super Number,? super Float32Array,? extends Boolean> callbackfn,
Object thisArg)
Returns the elements of an array that meet the condition specified in a callback function.
|
double |
find(Function.A3<? super Number,? super Number,? super Array<Number>,? extends Boolean> predicate)
Returns the value of the first element in the array where predicate is true, and undefined
otherwise.
|
double |
find(Function.A3<? super Number,? super Number,? super Array<Number>,? extends Boolean> predicate,
Object thisArg)
Returns the value of the first element in the array where predicate is true, and undefined
otherwise.
|
double |
findIndex(Function.A1<? super Number,? extends Boolean> predicate)
Returns the index of the first element in the array where predicate is true, and undefined
otherwise.
|
double |
findIndex(Function.A1<? super Number,? extends Boolean> predicate,
Object thisArg)
Returns the index of the first element in the array where predicate is true, and undefined
otherwise.
|
void |
forEach(Function.A3<? super Number,? super Number,? super Float32Array,? extends Void> callbackfn)
Performs the specified action for each element in an array.
|
void |
forEach(Function.A3<? super Number,? super Number,? super Float32Array,? extends Void> callbackfn,
Object thisArg)
Performs the specified action for each element in an array.
|
static Float32Array |
from(ArrayLike<Number> arrayLike)
Creates an array from an array-like or iterable object.
|
static Float32Array |
from(ArrayLike<Number> arrayLike,
Function.A2<? super Number,? super Number,? extends Number> mapfn)
Creates an array from an array-like or iterable object.
|
static Float32Array |
from(ArrayLike<Number> arrayLike,
Function.A2<? super Number,? super Number,? extends Number> mapfn,
Object thisArg)
Creates an array from an array-like or iterable object.
|
double |
indexOf(double searchElement)
Returns the index of the first occurrence of a value in an array.
|
double |
indexOf(double searchElement,
double fromIndex)
Returns the index of the first occurrence of a value in an array.
|
String |
join()
Adds all the elements of an array separated by the specified separator string.
|
String |
join(String separator)
Adds all the elements of an array separated by the specified separator string.
|
double |
lastIndexOf(double searchElement)
Returns the index of the last occurrence of a value in an array.
|
double |
lastIndexOf(double searchElement,
double fromIndex)
Returns the index of the last occurrence of a value in an array.
|
Number |
length() |
Float32Array |
map(Function.A3<? super Number,? super Number,? super Float32Array,? extends Number> callbackfn)
Calls a defined callback function on each element of an array, and returns an array that
contains the results.
|
Float32Array |
map(Function.A3<? super Number,? super Number,? super Float32Array,? extends Number> callbackfn,
Object thisArg)
Calls a defined callback function on each element of an array, and returns an array that
contains the results.
|
static Float32Array |
of(double... items)
Returns a new array from a set of elements.
|
double |
reduce(Function.A4<? super Number,? super Number,? super Number,? super Float32Array,? extends Number> callbackfn)
Calls the specified callback function for all the elements in an array.
|
double |
reduce(Function.A4<? super Number,? super Number,? super Number,? super Float32Array,? extends Number> callbackfn,
double initialValue)
Calls the specified callback function for all the elements in an array.
|
<U> U |
reduce(Function.A4<? super U,? super Number,? super Number,? super Float32Array,? extends U> callbackfn,
U initialValue)
Calls the specified callback function for all the elements in an array.
|
double |
reduceRight(Function.A4<? super Number,? super Number,? super Number,? super Float32Array,? extends Number> callbackfn)
Calls the specified callback function for all the elements in an array, in descending order.
|
double |
reduceRight(Function.A4<? super Number,? super Number,? super Number,? super Float32Array,? extends Number> callbackfn,
double initialValue)
Calls the specified callback function for all the elements in an array, in descending order.
|
<U> U |
reduceRight(Function.A4<? super U,? super Number,? super Number,? super Float32Array,? extends U> callbackfn,
U initialValue)
Calls the specified callback function for all the elements in an array, in descending order.
|
Float32Array |
reverse()
Reverses the elements in an Array.
|
void |
set(ArrayLike<Number> array)
Sets a value or an array of values.
|
void |
set(ArrayLike<Number> array,
double offset)
Sets a value or an array of values.
|
void |
set(double index,
double value)
Sets a value or an array of values.
|
Float32Array |
slice()
Returns a section of an array.
|
Float32Array |
slice(double start)
Returns a section of an array.
|
Float32Array |
slice(double start,
double end)
Returns a section of an array.
|
Boolean |
some(Function.A3<? super Number,? super Number,? super Float32Array,? extends Boolean> callbackfn)
Determines whether the specified callback function returns true for any element of an array.
|
Boolean |
some(Function.A3<? super Number,? super Number,? super Float32Array,? extends Boolean> callbackfn,
Object thisArg)
Determines whether the specified callback function returns true for any element of an array.
|
Float32Array |
sort()
Sorts an array.
|
Float32Array |
sort(Function.A2<? super Number,? super Number,? extends Number> compareFn)
Sorts an array.
|
Float32Array |
subarray(double begin)
Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
at begin, inclusive, up to end, exclusive.
|
Float32Array |
subarray(double begin,
double end)
Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
at begin, inclusive, up to end, exclusive.
|
String |
toLocaleString()
Converts a number to a string by using the current locale.
|
$as, $cast, $delete, $get, $js, $set, create, create, defineProperties, defineProperty, freeze, getOwnPropertyDescriptor, getOwnPropertyNames, getPrototypeOf, hasOwnProperty, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, newObject, newObject, preventExtensions, propertyIsEnumerable, seal, toString, valueOf
public Objs.Property<Number> BYTES_PER_ELEMENT
public Objs.Property<ArrayBuffer> buffer
public Objs.Property<Number> byteLength
public Objs.Property<Number> byteOffset
public Objs.Property<Number> length
public static Float32Array prototype
protected Float32Array(Objs.Constructor<?> c, Object js)
public Float32Array(double length)
public Float32Array(ArrayBuffer buffer, double byteOffset, double length)
public Float32Array(ArrayBuffer buffer)
public Float32Array(ArrayBuffer buffer, double byteOffset)
public static Float32Array $as(Object obj)
public Number BYTES_PER_ELEMENT()
public ArrayBuffer buffer()
public Number byteLength()
public Number byteOffset()
public Number length()
public double $get(double index)
public Float32Array copyWithin(double target, double start, double end)
target
- If target is negative, it is treated as length+target where length is the
length of the array.start
- If start is negative, it is treated as length+start. If end is negative, it
is treated as length+end.end
- If not specified, length of the this object is used as its default value.public Float32Array copyWithin(double target, double start)
target
- If target is negative, it is treated as length+target where length is the
length of the array.start
- If start is negative, it is treated as length+start. If end is negative, it
is treated as length+end.end
- If not specified, length of the this object is used as its default value.public Boolean every(Function.A3<? super Number,? super Number,? super Float32Array,? extends Boolean> callbackfn, Object thisArg)
callbackfn
- A function that accepts up to three arguments. The every method calls
the callbackfn function for each element in array1 until the callbackfn returns false,
or until the end of the array.thisArg
- An object to which the this keyword can refer in the callbackfn function.
If thisArg is omitted, undefined is used as the this value.public Boolean every(Function.A3<? super Number,? super Number,? super Float32Array,? extends Boolean> callbackfn)
callbackfn
- A function that accepts up to three arguments. The every method calls
the callbackfn function for each element in array1 until the callbackfn returns false,
or until the end of the array.thisArg
- An object to which the this keyword can refer in the callbackfn function.
If thisArg is omitted, undefined is used as the this value.public Float32Array fill(double value, double start, double end)
value
- value to fill array section withstart
- index to start filling the array at. If start is negative, it is treated as
length+start where length is the length of the array.end
- index to stop filling the array at. If end is negative, it is treated as
length+end.public Float32Array fill(double value)
value
- value to fill array section withstart
- index to start filling the array at. If start is negative, it is treated as
length+start where length is the length of the array.end
- index to stop filling the array at. If end is negative, it is treated as
length+end.public Float32Array fill(double value, double start)
value
- value to fill array section withstart
- index to start filling the array at. If start is negative, it is treated as
length+start where length is the length of the array.end
- index to stop filling the array at. If end is negative, it is treated as
length+end.public Float32Array filter(Function.A3<? super Number,? super Number,? super Float32Array,? extends Boolean> callbackfn, Object thisArg)
callbackfn
- A function that accepts up to three arguments. The filter method calls
the callbackfn function one time for each element in the array.thisArg
- An object to which the this keyword can refer in the callbackfn function.
If thisArg is omitted, undefined is used as the this value.public Float32Array filter(Function.A3<? super Number,? super Number,? super Float32Array,? extends Boolean> callbackfn)
callbackfn
- A function that accepts up to three arguments. The filter method calls
the callbackfn function one time for each element in the array.thisArg
- An object to which the this keyword can refer in the callbackfn function.
If thisArg is omitted, undefined is used as the this value.public double find(Function.A3<? super Number,? super Number,? super Array<Number>,? extends Boolean> predicate, Object thisArg)
predicate
- find calls predicate once for each element of the array, in ascending
order, until it finds one where predicate returns true. If such an element is found, find
immediately returns that element value. Otherwise, find returns undefined.thisArg
- If provided, it will be used as the this value for each invocation of
predicate. If it is not provided, undefined is used instead.public double find(Function.A3<? super Number,? super Number,? super Array<Number>,? extends Boolean> predicate)
predicate
- find calls predicate once for each element of the array, in ascending
order, until it finds one where predicate returns true. If such an element is found, find
immediately returns that element value. Otherwise, find returns undefined.thisArg
- If provided, it will be used as the this value for each invocation of
predicate. If it is not provided, undefined is used instead.public double findIndex(Function.A1<? super Number,? extends Boolean> predicate, Object thisArg)
predicate
- find calls predicate once for each element of the array, in ascending
order, until it finds one where predicate returns true. If such an element is found, find
immediately returns that element value. Otherwise, find returns undefined.thisArg
- If provided, it will be used as the this value for each invocation of
predicate. If it is not provided, undefined is used instead.public double findIndex(Function.A1<? super Number,? extends Boolean> predicate)
predicate
- find calls predicate once for each element of the array, in ascending
order, until it finds one where predicate returns true. If such an element is found, find
immediately returns that element value. Otherwise, find returns undefined.thisArg
- If provided, it will be used as the this value for each invocation of
predicate. If it is not provided, undefined is used instead.public void forEach(Function.A3<? super Number,? super Number,? super Float32Array,? extends Void> callbackfn, Object thisArg)
callbackfn
- A function that accepts up to three arguments. forEach calls the
callbackfn function one time for each element in the array.thisArg
- An object to which the this keyword can refer in the callbackfn function.
If thisArg is omitted, undefined is used as the this value.public void forEach(Function.A3<? super Number,? super Number,? super Float32Array,? extends Void> callbackfn)
callbackfn
- A function that accepts up to three arguments. forEach calls the
callbackfn function one time for each element in the array.thisArg
- An object to which the this keyword can refer in the callbackfn function.
If thisArg is omitted, undefined is used as the this value.public double indexOf(double searchElement, double fromIndex)
searchElement
- The value to locate in the array.fromIndex
- The array index at which to begin the search. If fromIndex is omitted, the
search starts at index 0.public double indexOf(double searchElement)
searchElement
- The value to locate in the array.fromIndex
- The array index at which to begin the search. If fromIndex is omitted, the
search starts at index 0.public String join(String separator)
separator
- A string used to separate one element of an array from the next in the
resulting String. If omitted, the array elements are separated with a comma.public String join()
separator
- A string used to separate one element of an array from the next in the
resulting String. If omitted, the array elements are separated with a comma.public double lastIndexOf(double searchElement, double fromIndex)
searchElement
- The value to locate in the array.fromIndex
- The array index at which to begin the search. If fromIndex is omitted, the
search starts at index 0.public double lastIndexOf(double searchElement)
searchElement
- The value to locate in the array.fromIndex
- The array index at which to begin the search. If fromIndex is omitted, the
search starts at index 0.public Float32Array map(Function.A3<? super Number,? super Number,? super Float32Array,? extends Number> callbackfn, Object thisArg)
callbackfn
- A function that accepts up to three arguments. The map method calls the
callbackfn function one time for each element in the array.thisArg
- An object to which the this keyword can refer in the callbackfn function.
If thisArg is omitted, undefined is used as the this value.public Float32Array map(Function.A3<? super Number,? super Number,? super Float32Array,? extends Number> callbackfn)
callbackfn
- A function that accepts up to three arguments. The map method calls the
callbackfn function one time for each element in the array.thisArg
- An object to which the this keyword can refer in the callbackfn function.
If thisArg is omitted, undefined is used as the this value.public double reduce(Function.A4<? super Number,? super Number,? super Number,? super Float32Array,? extends Number> callbackfn, double initialValue)
callbackfn
- A function that accepts up to four arguments. The reduce method calls the
callbackfn function one time for each element in the array.initialValue
- If initialValue is specified, it is used as the initial value to start
the accumulation. The first call to the callbackfn function provides this value as an argument
instead of an array value.public double reduce(Function.A4<? super Number,? super Number,? super Number,? super Float32Array,? extends Number> callbackfn)
callbackfn
- A function that accepts up to four arguments. The reduce method calls the
callbackfn function one time for each element in the array.initialValue
- If initialValue is specified, it is used as the initial value to start
the accumulation. The first call to the callbackfn function provides this value as an argument
instead of an array value.public <U> U reduce(Function.A4<? super U,? super Number,? super Number,? super Float32Array,? extends U> callbackfn, U initialValue)
callbackfn
- A function that accepts up to four arguments. The reduce method calls the
callbackfn function one time for each element in the array.initialValue
- If initialValue is specified, it is used as the initial value to start
the accumulation. The first call to the callbackfn function provides this value as an argument
instead of an array value.public double reduceRight(Function.A4<? super Number,? super Number,? super Number,? super Float32Array,? extends Number> callbackfn, double initialValue)
callbackfn
- A function that accepts up to four arguments. The reduceRight method calls
the callbackfn function one time for each element in the array.initialValue
- If initialValue is specified, it is used as the initial value to start
the accumulation. The first call to the callbackfn function provides this value as an
argument instead of an array value.public double reduceRight(Function.A4<? super Number,? super Number,? super Number,? super Float32Array,? extends Number> callbackfn)
callbackfn
- A function that accepts up to four arguments. The reduceRight method calls
the callbackfn function one time for each element in the array.initialValue
- If initialValue is specified, it is used as the initial value to start
the accumulation. The first call to the callbackfn function provides this value as an
argument instead of an array value.public <U> U reduceRight(Function.A4<? super U,? super Number,? super Number,? super Float32Array,? extends U> callbackfn, U initialValue)
callbackfn
- A function that accepts up to four arguments. The reduceRight method calls
the callbackfn function one time for each element in the array.initialValue
- If initialValue is specified, it is used as the initial value to start
the accumulation. The first call to the callbackfn function provides this value as an argument
instead of an array value.public Float32Array reverse()
public void set(double index, double value)
index
- The index of the location to set.value
- The value to set.public void set(ArrayLike<Number> array, double offset)
array
- A typed or untyped array of values to set.offset
- The index in the current array at which the values are to be written.public void set(ArrayLike<Number> array)
array
- A typed or untyped array of values to set.offset
- The index in the current array at which the values are to be written.public Float32Array slice(double start, double end)
start
- The beginning of the specified portion of the array.end
- The end of the specified portion of the array.public Float32Array slice()
start
- The beginning of the specified portion of the array.end
- The end of the specified portion of the array.public Float32Array slice(double start)
start
- The beginning of the specified portion of the array.end
- The end of the specified portion of the array.public Boolean some(Function.A3<? super Number,? super Number,? super Float32Array,? extends Boolean> callbackfn, Object thisArg)
callbackfn
- A function that accepts up to three arguments. The some method calls the
callbackfn function for each element in array1 until the callbackfn returns true, or until
the end of the array.thisArg
- An object to which the this keyword can refer in the callbackfn function.
If thisArg is omitted, undefined is used as the this value.public Boolean some(Function.A3<? super Number,? super Number,? super Float32Array,? extends Boolean> callbackfn)
callbackfn
- A function that accepts up to three arguments. The some method calls the
callbackfn function for each element in array1 until the callbackfn returns true, or until
the end of the array.thisArg
- An object to which the this keyword can refer in the callbackfn function.
If thisArg is omitted, undefined is used as the this value.public Float32Array sort(Function.A2<? super Number,? super Number,? extends Number> compareFn)
compareFn
- The name of the function used to determine the order of the elements. If
omitted, the elements are sorted in ascending, ASCII character order.public Float32Array sort()
compareFn
- The name of the function used to determine the order of the elements. If
omitted, the elements are sorted in ascending, ASCII character order.public Float32Array subarray(double begin, double end)
begin
- The index of the beginning of the array.end
- The index of the end of the array.public Float32Array subarray(double begin)
begin
- The index of the beginning of the array.end
- The index of the end of the array.public String toLocaleString()
toLocaleString
in class Objs
public static Float32Array of(double... items)
items
- A set of elements to include in the new array object.public static Float32Array from(ArrayLike<Number> arrayLike, Function.A2<? super Number,? super Number,? extends Number> mapfn, Object thisArg)
arrayLike
- An array-like or iterable object to convert to an array.mapfn
- A mapping function to call on every element of the array.thisArg
- Value of 'this' used to invoke the mapfn.public static Float32Array from(ArrayLike<Number> arrayLike)
arrayLike
- An array-like or iterable object to convert to an array.mapfn
- A mapping function to call on every element of the array.thisArg
- Value of 'this' used to invoke the mapfn.public static Float32Array from(ArrayLike<Number> arrayLike, Function.A2<? super Number,? super Number,? extends Number> mapfn)
arrayLike
- An array-like or iterable object to convert to an array.mapfn
- A mapping function to call on every element of the array.thisArg
- Value of 'this' used to invoke the mapfn.Copyright © 2018. All rights reserved.