public class Int8Array 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 Int8Array |
prototype
Returns a string representation of an array.
|
Modifier | Constructor and Description |
---|---|
|
Int8Array(ArrayBuffer buffer) |
|
Int8Array(ArrayBuffer buffer,
double byteOffset) |
|
Int8Array(ArrayBuffer buffer,
double byteOffset,
double length) |
|
Int8Array(ArrayLike<Number> array) |
|
Int8Array(double length) |
protected |
Int8Array(Objs.Constructor<?> c,
Object js) |
Modifier and Type | Method and Description |
---|---|
static Int8Array |
$as(Object obj) |
double |
$get(double index) |
ArrayBuffer |
buffer() |
Number |
byteLength() |
Number |
byteOffset() |
Number |
BYTES_PER_ELEMENT() |
Int8Array |
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
|
Int8Array |
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 Int8Array,? extends Boolean> callbackfn)
Determines whether all the members of an array satisfy the specified test.
|
Boolean |
every(Function.A3<? super Number,? super Number,? super Int8Array,? extends Boolean> callbackfn,
Object thisArg)
Determines whether all the members of an array satisfy the specified test.
|
Int8Array |
fill(double value)
Returns the this object after filling the section identified by start and end with value
|
Int8Array |
fill(double value,
double start)
Returns the this object after filling the section identified by start and end with value
|
Int8Array |
fill(double value,
double start,
double end)
Returns the this object after filling the section identified by start and end with value
|
Int8Array |
filter(Function.A3<? super Number,? super Number,? super Int8Array,? extends Boolean> callbackfn)
Returns the elements of an array that meet the condition specified in a callback function.
|
Int8Array |
filter(Function.A3<? super Number,? super Number,? super Int8Array,? 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 Int8Array,? extends Void> callbackfn)
Performs the specified action for each element in an array.
|
void |
forEach(Function.A3<? super Number,? super Number,? super Int8Array,? extends Void> callbackfn,
Object thisArg)
Performs the specified action for each element in an array.
|
static Int8Array |
from(ArrayLike<Number> arrayLike)
Creates an array from an array-like or iterable object.
|
static Int8Array |
from(ArrayLike<Number> arrayLike,
Function.A2<? super Number,? super Number,? extends Number> mapfn)
Creates an array from an array-like or iterable object.
|
static Int8Array |
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() |
Int8Array |
map(Function.A3<? super Number,? super Number,? super Int8Array,? extends Number> callbackfn)
Calls a defined callback function on each element of an array, and returns an array that
contains the results.
|
Int8Array |
map(Function.A3<? super Number,? super Number,? super Int8Array,? 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 Int8Array |
of(double... items)
Returns a new array from a set of elements.
|
double |
reduce(Function.A4<? super Number,? super Number,? super Number,? super Int8Array,? 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 Int8Array,? 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 Int8Array,? 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 Int8Array,? 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 Int8Array,? 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 Int8Array,? extends U> callbackfn,
U initialValue)
Calls the specified callback function for all the elements in an array, in descending order.
|
Int8Array |
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.
|
Int8Array |
slice()
Returns a section of an array.
|
Int8Array |
slice(double start)
Returns a section of an array.
|
Int8Array |
slice(double start,
double end)
Returns a section of an array.
|
Boolean |
some(Function.A3<? super Number,? super Number,? super Int8Array,? 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 Int8Array,? extends Boolean> callbackfn,
Object thisArg)
Determines whether the specified callback function returns true for any element of an array.
|
Int8Array |
sort()
Sorts an array.
|
Int8Array |
sort(Function.A2<? super Number,? super Number,? extends Number> compareFn)
Sorts an array.
|
Int8Array |
subarray(double begin)
Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
at begin, inclusive, up to end, exclusive.
|
Int8Array |
subarray(double begin,
double end)
Gets a new Int8Array 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 Int8Array prototype
protected Int8Array(Objs.Constructor<?> c, Object js)
public Int8Array(double length)
public Int8Array(ArrayBuffer buffer, double byteOffset, double length)
public Int8Array(ArrayBuffer buffer)
public Int8Array(ArrayBuffer buffer, double byteOffset)
public Number BYTES_PER_ELEMENT()
public ArrayBuffer buffer()
public Number byteLength()
public Number byteOffset()
public Number length()
public double $get(double index)
public Int8Array 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 Int8Array 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 Int8Array,? 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 Int8Array,? 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 Int8Array 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 Int8Array 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 Int8Array 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 Int8Array filter(Function.A3<? super Number,? super Number,? super Int8Array,? 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 Int8Array filter(Function.A3<? super Number,? super Number,? super Int8Array,? 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 Int8Array,? 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 Int8Array,? 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 Int8Array map(Function.A3<? super Number,? super Number,? super Int8Array,? 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 Int8Array map(Function.A3<? super Number,? super Number,? super Int8Array,? 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 Int8Array,? 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 Int8Array,? 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 Int8Array,? 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 Int8Array,? 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 Int8Array,? 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 Int8Array,? 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 Int8Array 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 Int8Array 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 Int8Array slice()
start
- The beginning of the specified portion of the array.end
- The end of the specified portion of the array.public Int8Array 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 Int8Array,? 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 Int8Array,? 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 Int8Array 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 Int8Array 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 Int8Array subarray(double begin, double end)
begin
- The index of the beginning of the array.end
- The index of the end of the array.public Int8Array 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 Int8Array of(double... items)
items
- A set of elements to include in the new array object.public static Int8Array 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 Int8Array 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 Int8Array 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.