@SyntacticIterable public class Int16Array extends Iterable<Double>
Modifier and Type | Field and Description |
---|---|
ArrayBuffer |
buffer
The ArrayBuffer instance referenced by the array.
|
double |
byteLength
The length in bytes of the array.
|
double |
byteOffset
The offset in bytes of the array.
|
double |
BYTES_PER_ELEMENT
The size in bytes of each element in the array.
|
double |
length
The length of the array.
|
static Int16Array |
prototype |
constructor
Modifier | Constructor and Description |
---|---|
protected |
Int16Array() |
|
Int16Array(ArrayBuffer buffer) |
|
Int16Array(ArrayBuffer buffer,
double byteOffset) |
|
Int16Array(ArrayBuffer buffer,
double byteOffset,
double length) |
|
Int16Array(double length) |
|
Int16Array(double[] array) |
|
Int16Array(Int16Array array) |
Modifier and Type | Method and Description |
---|---|
Double |
$get(double index) |
Int16Array |
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
|
Int16Array |
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
|
IterableIterator<Tuple2<Double,Double>> |
entries()
Returns an array of key, value pairs for every entry in the array
|
Boolean |
every(TriFunction<Double,Double,Int16Array,Boolean> callbackfn)
Determines whether all the members of an array satisfy the specified test.
|
Boolean |
every(TriFunction<Double,Double,Int16Array,Boolean> callbackfn,
Object thisArg)
Determines whether all the members of an array satisfy the specified test.
|
Int16Array |
fill(double value)
Returns the this object after filling the section identified by start and end with value
|
Int16Array |
fill(double value,
double start)
Returns the this object after filling the section identified by start and end with value
|
Int16Array |
fill(double value,
double start,
double end)
Returns the this object after filling the section identified by start and end with value
|
Int16Array |
filter(TriFunction<Double,Double,Int16Array,Boolean> callbackfn)
Returns the elements of an array that meet the condition specified in a callback function.
|
Int16Array |
filter(TriFunction<Double,Double,Int16Array,Boolean> callbackfn,
Object thisArg)
Returns the elements of an array that meet the condition specified in a callback function.
|
double |
find(TriFunction<Double,Double,Array<Double>,Boolean> predicate)
Returns the value of the first element in the array where predicate is true, and undefined
otherwise.
|
double |
find(TriFunction<Double,Double,Array<Double>,Boolean> predicate,
Object thisArg)
Returns the value of the first element in the array where predicate is true, and undefined
otherwise.
|
double |
findIndex(Function<Double,Boolean> predicate)
Returns the index of the first element in the array where predicate is true, and undefined
otherwise.
|
double |
findIndex(Function<Double,Boolean> predicate,
Object thisArg)
Returns the index of the first element in the array where predicate is true, and undefined
otherwise.
|
void |
forEach(TriConsumer<Double,Double,Int16Array> callbackfn)
Performs the specified action for each element in an array.
|
void |
forEach(TriConsumer<Double,Double,Int16Array> callbackfn,
Object thisArg)
Performs the specified action for each element in an array.
|
static Int16Array |
from(ArrayLike<Double> arrayLike)
Creates an array from an array-like or iterable object.
|
static Int16Array |
from(ArrayLike<Double> arrayLike,
BiFunction<Double,Double,Double> mapfn)
Creates an array from an array-like or iterable object.
|
static Int16Array |
from(ArrayLike<Double> arrayLike,
BiFunction<Double,Double,Double> mapfn,
Object thisArg)
Creates an array from an array-like or iterable object.
|
static Int16Array |
from(Double[] arrayLike)
Creates an array from an array-like or iterable object.
|
static Int16Array |
from(Double[] arrayLike,
BiFunction<Double,Double,Double> mapfn)
Creates an array from an array-like or iterable object.
|
static Int16Array |
from(Double[] arrayLike,
BiFunction<Double,Double,Double> mapfn,
Object thisArg)
Creates an array from an array-like or iterable object.
|
static Int16Array |
from(Iterable<Double> arrayLike)
Creates an array from an array-like or iterable object.
|
static Int16Array |
from(Iterable<Double> arrayLike,
BiFunction<Double,Double,Double> mapfn)
Creates an array from an array-like or iterable object.
|
static Int16Array |
from(Iterable<Double> arrayLike,
BiFunction<Double,Double,Double> 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.
|
Iterator<Double> |
iterator()
From Iterable, to allow foreach loop (do not use directly).
|
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.
|
IterableIterator<Double> |
keys()
Returns an list of keys in the array
|
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.
|
Int16Array |
map(TriFunction<Double,Double,Int16Array,Double> callbackfn)
Calls a defined callback function on each element of an array, and returns an array that
contains the results.
|
Int16Array |
map(TriFunction<Double,Double,Int16Array,Double> callbackfn,
Object thisArg)
Calls a defined callback function on each element of an array, and returns an array that
contains the results.
|
static Int16Array |
of(double... items)
Returns a new array from a set of elements.
|
double |
reduce(Function4<Double,Double,Double,Int16Array,Double> callbackfn)
Calls the specified callback function for all the elements in an array.
|
double |
reduce(Function4<Double,Double,Double,Int16Array,Double> callbackfn,
double initialValue)
Calls the specified callback function for all the elements in an array.
|
<U> U |
reduce(Function4<U,Double,Double,Int16Array,U> callbackfn,
U initialValue)
Calls the specified callback function for all the elements in an array.
|
double |
reduceRight(Function4<Double,Double,Double,Int16Array,Double> callbackfn)
Calls the specified callback function for all the elements in an array, in descending order.
|
double |
reduceRight(Function4<Double,Double,Double,Int16Array,Double> callbackfn,
double initialValue)
Calls the specified callback function for all the elements in an array, in descending order.
|
<U> U |
reduceRight(Function4<U,Double,Double,Int16Array,U> callbackfn,
U initialValue)
Calls the specified callback function for all the elements in an array, in descending order.
|
Int16Array |
reverse()
Reverses the elements in an Array.
|
void |
set(double index,
double value)
Sets a value or an array of values.
|
void |
set(Int16Array array)
Sets a value or an array of values.
|
void |
set(Int16Array array,
double offset)
Sets a value or an array of values.
|
Int16Array |
slice()
Returns a section of an array.
|
Int16Array |
slice(double start)
Returns a section of an array.
|
Int16Array |
slice(double start,
double end)
Returns a section of an array.
|
Boolean |
some(TriFunction<Double,Double,Int16Array,Boolean> callbackfn)
Determines whether the specified callback function returns true for any element of an array.
|
Boolean |
some(TriFunction<Double,Double,Int16Array,Boolean> callbackfn,
Object thisArg)
Determines whether the specified callback function returns true for any element of an array.
|
Int16Array |
sort()
Sorts an array.
|
Int16Array |
sort(BiFunction<Double,Double,Double> compareFn)
Sorts an array.
|
Int16Array |
subarray(double begin)
Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
at begin, inclusive, up to end, exclusive.
|
Int16Array |
subarray(double begin,
double end)
Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
at begin, inclusive, up to end, exclusive.
|
IterableIterator<Double> |
values()
Returns an list of values in the array
|
$applyStatic, $applyStatic, $delete, $delete, $get, $get, $set, $set, $super, assign, create, create, defineProperties, defineProperty, defineProperty, freeze, getOwnPropertyDescriptor, getOwnPropertyNames, getPrototypeOf, hasOwnProperty, hasOwnProperty, hasOwnProperty, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, propertyIsEnumerable, propertyIsEnumerable, seal, toJSString, toLocaleString, toString, valueOf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public double BYTES_PER_ELEMENT
public ArrayBuffer buffer
public double byteLength
public double byteOffset
public double length
public static Int16Array prototype
public Int16Array(double length)
public Int16Array(Int16Array array)
public Int16Array(double[] array)
public Int16Array(ArrayBuffer buffer, double byteOffset, double length)
public Int16Array(ArrayBuffer buffer, double byteOffset)
public Int16Array(ArrayBuffer buffer)
protected Int16Array()
public Int16Array 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 IterableIterator<Tuple2<Double,Double>> entries()
public Boolean every(TriFunction<Double,Double,Int16Array,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 Int16Array 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 Int16Array filter(TriFunction<Double,Double,Int16Array,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 double find(TriFunction<Double,Double,Array<Double>,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<Double,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 void forEach(TriConsumer<Double,Double,Int16Array> 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 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 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 IterableIterator<Double> keys()
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 Int16Array map(TriFunction<Double,Double,Int16Array,Double> 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 double reduce(Function4<Double,Double,Double,Int16Array,Double> 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 <U> U reduce(Function4<U,Double,Double,Int16Array,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(Function4<Double,Double,Double,Int16Array,Double> 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 <U> U reduceRight(Function4<U,Double,Double,Int16Array,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 Int16Array reverse()
public void set(double index, double value)
index
- The index of the location to set.value
- The value to set.public void set(Int16Array 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 Int16Array 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 Boolean some(TriFunction<Double,Double,Int16Array,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 Int16Array sort(BiFunction<Double,Double,Double> 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 Int16Array subarray(double begin, double end)
begin
- The index of the beginning of the array.end
- The index of the end of the array.public IterableIterator<Double> values()
public Double $get(double index)
public static Int16Array of(double... items)
items
- A set of elements to include in the new array object.public static Int16Array from(ArrayLike<Double> arrayLike, BiFunction<Double,Double,Double> 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 Int16Array 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(TriFunction<Double,Double,Int16Array,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 Int16Array 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 Int16Array 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 Int16Array filter(TriFunction<Double,Double,Int16Array,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(TriFunction<Double,Double,Array<Double>,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<Double,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(TriConsumer<Double,Double,Int16Array> 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)
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()
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)
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 Int16Array map(TriFunction<Double,Double,Int16Array,Double> 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(Function4<Double,Double,Double,Int16Array,Double> 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 double reduceRight(Function4<Double,Double,Double,Int16Array,Double> 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 void set(Int16Array 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 Int16Array slice(double start)
start
- The beginning of the specified portion of the array.end
- The end of the specified portion of the array.public Int16Array slice()
start
- The beginning of the specified portion of the array.end
- The end of the specified portion of the array.public Boolean some(TriFunction<Double,Double,Int16Array,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 Int16Array 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 Int16Array subarray(double begin)
begin
- The index of the beginning of the array.end
- The index of the end of the array.public static Int16Array from(ArrayLike<Double> arrayLike, BiFunction<Double,Double,Double> 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.public static Int16Array from(ArrayLike<Double> 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 Int16Array from(Iterable<Double> arrayLike, BiFunction<Double,Double,Double> 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 Int16Array from(Iterable<Double> arrayLike, BiFunction<Double,Double,Double> 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.public static Int16Array from(Iterable<Double> 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 Int16Array from(Double[] arrayLike, BiFunction<Double,Double,Double> 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 Int16Array from(Double[] arrayLike, BiFunction<Double,Double,Double> 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.public static Int16Array from(Double[] 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.