List
pentaho.type List
The base class of plural values.
A list is an ordered set of elements
of a common, base type
.
AMD Module
require(["pentaho/type/List"], function(List) { /* code goes here */ });
See also: pentaho.type.Element , pentaho.type.spec.IList , pentaho.type.spec.IListType
Extends
Constructor
Name | Description |
---|---|
new List(instSpec, keyArgs) | Creates a list instance. |
Members
Name | Description |
---|---|
$isBoundary : boolean | Gets a value that indicates if this list is a boundary list. |
$isReadOnly : boolean | Gets a value that indicates if this list is read-only. |
$key : string | Gets the key of the list value. |
count : number | Gets the number of elements in the list. |
Methods
Name | Description |
---|---|
_configure(config) Protected | Configures this list with a given distinct and non- |
_createChangeset() | |
_initClone() | |
add(fragment) | Adds one or more elements to the end of the list. |
at(index) : pentaho.type.Element | Gets the element at a specified index, or |
clear() | Removes all elements from the list. |
each(fun, ctx) | Calls a function for each element of the list. |
get(key) : pentaho.type.Element | Gets the element having a specified key value, if any, or |
has(key) : boolean | Gets a value that indicates if an element with a given key is present in the list. |
includes(elem) : boolean | Gets a value that indicates if a given element is present in the list. |
indexOf(elem) : number | Gets the index of a given element in the list. |
insert(fragment, index) | Inserts one or more elements, starting at the given index. |
move(elemSpec, indexNew) | Moves an element to a new position. |
remove(fragment) | Removes one or more elements from the list. |
removeAt(start, count) | Removes one or more elements from the list, given the start index and the number of elements to remove. |
set(fragment, keyArgs) | Adds, removes, moves and/or updates elements to the element list. |
sort(comparer) | Sorts the elements of the list using the given comparer function. |
toArray(map, ctx) : Array | Creates an array with the elements of the list or values derived from each element. |
toSpecInContext() | |
validate() : Array.<pentaho.type.ValidationError> | Determines if the given list value is valid. |
Constructor Details
new List(instSpec, keyArgs) | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a list instance. When a derived class overrides the constructor and creates additional instance properties, the Source: javascript/web/pentaho/type/List.js, line 82
See also: pentaho.type.Element , pentaho.type.spec.IList , pentaho.type.spec.IListType |
Members Details
$isBoundary: boolean |
---|
Gets a value that indicates if this list is a boundary list. A boundary list isolates the list holder from the list's elements. The validity of a boundary list is not affected by the validity of its elements. Changes within the elements of boundary list do not bubble to it. |
$isReadOnly: boolean |
---|
Gets a value that indicates if this list is read-only. |
$key: string |
---|
Gets the key of the list value. The default list implementation, returns the value of the list instance's |
count: number |
---|
Gets the number of elements in the list. |
Methods Details
_configure(config) Protected | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Configures this list with a given distinct and non- This method can only be called when there is an ambient transaction. The argument An additional configuration input format is supported, the key map configuration format, in which With all of the other configuration formats, a list of element specifications is obtained and passed to the Source: javascript/web/pentaho/type/List.js, line 564
See also: pentaho.type.Value#configure , pentaho.type.List#set , pentaho.type.Complex#_configure , pentaho.type.Element#configureOrCreate |
_createChangeset() |
---|
_initClone() |
---|
add(fragment) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Adds one or more elements to the end of the list. The element or elements specified in argument Source: javascript/web/pentaho/type/List.js, line 348
|
at(index) : pentaho.type.Element | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets the element at a specified index, or Source: javascript/web/pentaho/type/List.js, line 252
|
clear() | ||||
---|---|---|---|---|
Removes all elements from the list. Source: javascript/web/pentaho/type/List.js, line 443
|
each(fun, ctx) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Calls a function for each element of the list. Source: javascript/web/pentaho/type/List.js, line 471
|
get(key) : pentaho.type.Element | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets the element having a specified key value, if any, or Source: javascript/web/pentaho/type/List.js, line 299
|
has(key) : boolean | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets a value that indicates if an element with a given key is present in the list. Source: javascript/web/pentaho/type/List.js, line 264
|
includes(elem) : boolean | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets a value that indicates if a given element is present in the list. Source: javascript/web/pentaho/type/List.js, line 277
|
indexOf(elem) : number | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets the index of a given element in the list. Source: javascript/web/pentaho/type/List.js, line 288
|
insert(fragment, index) | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Inserts one or more elements, starting at the given index. If When the index is greater than or equal to the length of the list, the element or elements are appended to the list. Source: javascript/web/pentaho/type/List.js, line 366
|
move(elemSpec, indexNew) | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Moves an element to a new position. Source: javascript/web/pentaho/type/List.js, line 395
|
remove(fragment) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Removes one or more elements from the list. Specified elements that are not present in the list are ignored. Source: javascript/web/pentaho/type/List.js, line 380
|
removeAt(start, count) | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Removes one or more elements from the list, given the start index and the number of elements to remove. If Source: javascript/web/pentaho/type/List.js, line 417
|
set(fragment, keyArgs) | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Adds, removes, moves and/or updates elements to the element list. The element or elements specified in argument Source: javascript/web/pentaho/type/List.js, line 327
|
sort(comparer) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Sorts the elements of the list using the given comparer function. Source: javascript/web/pentaho/type/List.js, line 431
|
toArray(map, ctx) : Array | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Creates an array with the elements of the list or values derived from each element. Source: javascript/web/pentaho/type/List.js, line 458
|
toSpecInContext() |
---|
validate() : Array.<pentaho.type.ValidationError> | ||||
---|---|---|---|---|
Determines if the given list value is valid. The default implementation validates each element against the list's You can use the error utilities in Source: javascript/web/pentaho/type/List.js, line 658
|