Cross-language implementation of dynamic object array what can hold values of any type. The stored values can be converted to different types using variety of accessor methods.
let value1 = new AnyValueArray([1, "123.456", "2018-01-01"]);
value1.getAsBoolean(0); // Result: true
value1.getAsInteger(1); // Result: 123
value1.getAsFloat(1); // Result: 123.456
value1.getAsDateTime(2); // Result: new Date(2018,0,1)
Creates a new instance of the array and assigns its value.
Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
Appends new elements to this array.
a list of elements to be added.
Clears this array by removing all its elements.
Creates a binary clone of this object.
a clone of this object.
Checks if this array contains a value. The check uses direct comparison between elements and the specified value.
a value to be checked
true if this array contains the value or false otherwise.
Checks if this array contains a value. The check before comparison converts elements and the value to type specified by type code.
a type code that defines a type to convert values before comparison
a value to be checked
true if this array contains the value or false otherwise.
Gets an array element specified by its index.
an index of the element to get.
the value of the array element.
Converts array element into an AnyValueArray or returns empty AnyValueArray if conversion is not possible.
an index of element to get.
AnyValueArray value of the element or empty AnyValueArray if conversion is not supported.
Converts array element into an AnyValueArray or returns default value if conversion is not possible.
an index of element to get.
the default value
AnyValueArray value of the element or default value if conversion is not supported.
Converts array element into a boolean or returns false if conversion is not possible.
an index of element to get.
boolean value ot the element or false if conversion is not supported.
Converts array element into a boolean or returns default value if conversion is not possible.
an index of element to get.
the default value
boolean value ot the element or default value if conversion is not supported.
Converts array element into a Date or returns the current date if conversion is not possible.
an index of element to get.
Date value ot the element or the current date if conversion is not supported.
Converts array element into a Date or returns default value if conversion is not possible.
an index of element to get.
the default value
Date value ot the element or default value if conversion is not supported.
Converts array element into a double or returns 0 if conversion is not possible.
an index of element to get.
double value ot the element or 0 if conversion is not supported.
Converts array element into a double or returns default value if conversion is not possible.
an index of element to get.
the default value
double value ot the element or default value if conversion is not supported.
Converts array element into a float or returns 0 if conversion is not possible.
an index of element to get.
float value ot the element or 0 if conversion is not supported.
Converts array element into a float or returns default value if conversion is not possible.
an index of element to get.
the default value
float value ot the element or default value if conversion is not supported.
Converts array element into an integer or returns 0 if conversion is not possible.
an index of element to get.
integer value ot the element or 0 if conversion is not supported.
Converts array element into an integer or returns default value if conversion is not possible.
an index of element to get.
the default value
integer value ot the element or default value if conversion is not supported.
Converts array element into a long or returns 0 if conversion is not possible.
an index of element to get.
long value ot the element or 0 if conversion is not supported.
Converts array element into a long or returns default value if conversion is not possible.
an index of element to get.
the default value
long value ot the element or default value if conversion is not supported.
Converts array element into an AnyValueMap or returns empty AnyValueMap if conversion is not possible.
an index of element to get.
AnyValueMap value of the element or empty AnyValueMap if conversion is not supported.
Converts array element into an AnyValueMap or returns default value if conversion is not possible.
an index of element to get.
the default value
AnyValueMap value of the element or default value if conversion is not supported.
Converts array element into an AnyValueArray or returns null if conversion is not possible.
an index of element to get.
AnyValueArray value of the element or null if conversion is not supported.
Converts array element into a boolean or returns null if conversion is not possible.
an index of element to get.
boolean value of the element or null if conversion is not supported.
Converts array element into a Date or returns null if conversion is not possible.
an index of element to get.
Date value of the element or null if conversion is not supported.
Converts array element into a double or returns null if conversion is not possible.
an index of element to get.
double value of the element or null if conversion is not supported.
Converts array element into a float or returns null if conversion is not possible.
an index of element to get.
float value of the element or null if conversion is not supported.
Converts array element into an integer or returns null if conversion is not possible.
an index of element to get.
integer value of the element or null if conversion is not supported.
Converts array element into a long or returns null if conversion is not possible.
an index of element to get.
long value of the element or null if conversion is not supported.
Converts array element into an AnyValueMap or returns null if conversion is not possible.
an index of element to get.
AnyValueMap value of the element or null if conversion is not supported.
Converts array element into a string or returns null if conversion is not possible.
an index of element to get.
string value of the element or null if conversion is not supported.
Converts array element into a value defined by specied typecode. If conversion is not possible it returns null.
the TypeCode that defined the type of the result
an index of element to get.
element value defined by the typecode or null if conversion is not supported.
Gets the value stored in array element without any conversions. When element index is not defined it returns the entire array value.
(optional) an index of the element to get
the element value or value of the array when index is not defined.
Converts array element into a string or returns "" if conversion is not possible.
an index of element to get.
string value ot the element or "" if conversion is not supported.
Converts array element into a string or returns default value if conversion is not possible.
an index of element to get.
the default value
string value ot the element or default value if conversion is not supported.
Converts array element into a value defined by specied typecode. If conversion is not possible it returns default value for the specified type.
the TypeCode that defined the type of the result
an index of element to get.
element value defined by the typecode or default if conversion is not supported.
Converts array element into a value defined by specied typecode. If conversion is not possible it returns default value.
the TypeCode that defined the type of the result
an index of element to get.
the default value
element value defined by the typecode or default value if conversion is not supported.
Converts array element into an AnyValue or returns an empty AnyValue if conversion is not possible.
an index of element to get.
AnyValue value of the element or empty AnyValue if conversion is not supported.
Puts a new value into array element specified by its index.
an index of the element to put.
a new value for array element.
Removes an array element specified by its index
an index of the element to remove.
Sets a new value to array element specified by its index. When the index is not defined, it resets the entire array value. This method has double purpose because method overrides are not supported in JavaScript.
(optional) an index of the element to set
a new element or array value.
Gets a string representation of the object. The result is a comma-separated list of string representations of individual elements as "value1,value2,value3"
a string representation of the object.
Combines two or more arrays.
Additional items to add to the end of array1.
Combines two or more arrays.
Additional items to add to the end of array1.
Determines whether all the members of an array satisfy the specified test.
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.
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
Returns the elements of an array that meet the condition specified in a callback function.
A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
Returns the elements of an array that meet the condition specified in a callback function.
A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
Performs the specified action for each element in an array.
A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
Splits specified string into elements using a separator and assigns the elements to a newly created AnyValueArray.
a string value to be split and assigned to AnyValueArray
a separator to split the string
(optional) true to remove duplicated elements
a newly created AnyValueArray.
Converts specified value into AnyValueArray.
value to be converted
a newly created AnyValueArray.
Creates a new AnyValueArray from a list of values
a list of values to initialize the created AnyValueArray
a newly created AnyValueArray.
Returns the index of the first occurrence of a value in an array.
The value to locate in the array.
The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
Adds all the elements of an array separated by the specified separator string.
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.
Returns the index of the last occurrence of a specified value in an array.
The value to locate in the array.
The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
Calls a defined callback function on each element of an array, and returns an array that contains the results.
A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
Removes the last element from an array and returns it.
Appends new elements to an array, and returns the new length of the array.
New elements of the Array.
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
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.
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
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.
Reverses the elements in an Array.
Removes the first element from an array and returns it.
Returns a section of an array.
The beginning of the specified portion of the array.
The end of the specified portion of the array.
Determines whether the specified callback function returns true for any element of an array.
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.
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
Sorts an array.
The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.
Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
The zero-based location in the array from which to start removing elements.
The number of elements to remove.
Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
The zero-based location in the array from which to start removing elements.
The number of elements to remove.
Elements to insert into the array in place of the deleted elements.
Returns a string representation of an array. The elements are converted to string using thier toLocalString methods.
Returns a string representation of an array.
Inserts new elements at the start of an array.
Elements to insert at the start of the Array.
Generated using TypeDoc
Cross-language implementation of dynamic object array what can hold values of any type. The stored values can be converted to different types using variety of accessor methods.
Example
let value1 = new AnyValueArray([1, "123.456", "2018-01-01"]); value1.getAsBoolean(0); // Result: true value1.getAsInteger(1); // Result: 123 value1.getAsFloat(1); // Result: 123.456 value1.getAsDateTime(2); // Result: new Date(2018,0,1)
StringConverter
TypeConverter
BooleanConverter
IntegerConverter
LongConverter
DoubleConverter
FloatConverter
DateTimeConverter
ICloneable