List Class

Namespace: Stimulsoft.System.Collections.Generic

Inheritance

Inherits from: Array

Constructors

Constructor Description
constructor(T[] | number items)  

constructor(items: T[] | number)

Parameters

  • items (T[] | number)

Properties

Property Type Description
countItems number  

Methods

Method Returns Description  
add void    
add2 static List    
addRange void    
aggregate T Applies an accumulator function over a sequence.  
aggregate2 T    
all boolean    
any boolean Determines whether any element of a sequence satisfies a condition.  
average number Computes the average of a sequence of System.Int64 values that are obtained by invoking a transform function on each element of the input sequence.  
bitwiseAnd static List    
bitwiseOr static List    
bitwiseXOr static List    
cast List Converts the elements of an List to the specified type.  
clear void    
concat List Concatenates two sequences.  
contains boolean Determines whether an element is in the List.  
copyTo void    
count2 number    
create static List    
defaultIfEmpty List    
distinct List Returns distinct elements from a sequence by using the default equality comparer to compare values.  
div static List    
except List    
exists boolean    
findIndex2 number    
findLastIndex2 number    
first T    
firstOrDefault T    
firstOrDefaultAsDateTime DateTime    
firstOrDefaultAsNullableDateTime DateTime null  
firstOrDefaultAsNullableNumber number null  
firstOrDefaultAsNumber number    
getArrayItem List<any[]>    
getByIndex T    
getKeys string[]    
getNamespace static string    
getRange List    
getValueOrFirstOrDefault static any    
groupBy List<Grouping<K, T» Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer.  
groupBy2 List<Grouping<K, T» Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer.  
insert void    
last T    
lastOrDefault T    
logicalAnd static List    
logicalOr static List    
max S Invokes a transform function on each element of a sequence and returns the maximum value.  
min S Invokes a transform function on each element of a sequence and returns the minimum value.  
mult static List    
orderBy List Sorts the elements of a sequence in ascending order according to a key or by using a specified comparer.  
orderByDescending List    
peek T    
remove void    
removeAt void    
removeByIndex List    
removeRange void    
repeat static List    
select List    
selectAsync Promise<List>    
selectMany List    
selectMany2 List    
sequenceEqual boolean    
setByIndex void    
skip List    
sort2 void    
sub static List    
sum number Computes the sum of the sequence of System.Decimal values that are obtained by invoking a transform function on each element of the input sequence.  
take List    
toDictionary Dictionary<K, V>    
toList List    
toLookup Hashtable Creates a Lookup from an List according to a specified key selector function.  
toString2 static string    
tryCastToBool List<boolean null>  
tryCastToDateTime List<DateTime>    
tryCastToNullableDateTime List<DateTime null>  
tryCastToNullableNumber List<number null>  
tryCastToNullableTimeSpan List<TimeSpan null>  
tryCastToNumber List<number null>  
tryCastToString List    
tryCastToTimeSpan List<TimeSpan>    
tryCastValueOrFirstDefaultToNullableNumber List<number null>  
union List    
where List    
whereArrayItemEqualsTo List<any[]>    
whereArrayItemStringEqualsTo List<any[]>    
whereAsync Promise<List>    
whereEqualsTo List<any[]>    
whereFirstOrDefaultArrayItemStringEqualsTo any[]    
zip List    

Method Details

add

add(item: T): void

Parameters

  • item (T)

add2 static

add2(a: any, b: any): List

Parameters

  • a (any)
  • b (any)

Returns List


addRange

addRange(items: List \| T[]): void

Parameters

  • items (List \| T[])

aggregate

aggregate(func: (av: T, e: T)): T

Applies an accumulator function over a sequence.

Parameters

  • func ((av: T) — An accumulator function to be invoked on each element.
  • e (T))

Returns T — The final accumulator value.


aggregate2

aggregate2(seed: T, func: (av: T, e: T)): T

Parameters

  • seed (T)
  • func ((av: T)
  • e (T))

Returns T


all

all(predicate: (value: T)): boolean

Parameters

  • predicate ((value: T))

Returns boolean


any

any(predicate: (value: T)): boolean

Determines whether any element of a sequence satisfies a condition.

Parameters

  • predicate ((value: T)) — A function to test each element for a condition.

Returns boolean — true if any elements in the source sequence pass the test in the specified predicate; otherwise, false.


average

average(selector: (value: T)): number

Computes the average of a sequence of System.Int64 values that are obtained by invoking a transform function on each element of the input sequence.

Parameters

  • selector ((value: T))

Returns number — The average of the sequence of values.


bitwiseAnd static

bitwiseAnd(a: any, b: any): List

Parameters

  • a (any)
  • b (any)

Returns List


bitwiseOr static

bitwiseOr(a: any, b: any): List

Parameters

  • a (any)
  • b (any)

Returns List


bitwiseXOr static

bitwiseXOr(a: any, b: any): List

Parameters

  • a (any)
  • b (any)

Returns List


cast

cast(): List

Converts the elements of an List to the specified type.

Returns List — An List that contains each element of the source sequence converted to the specified type.


clear

clear(): void


concat

concat(second: List): [List](/Stimulsoft.Reports.Class.Reference.JS/Stimulsoft_System_Collections_Generic/List.html)

Concatenates two sequences.

Parameters

  • second (List) — The sequence to concatenate to the first sequence.

Returns List — An List that contains the concatenated elements of the two input sequences.


contains

contains(item: T): boolean

Determines whether an element is in the List.

Parameters

  • item (T) — The object to locate in the List. The value can be null for reference types.

Returns boolean — true if item is found in the List otherwise, false.


copyTo

copyTo(array: any[], index: any): void

Parameters

  • array (any[])
  • index (any)

count2

count2(selector: (value: T)): number

Parameters

  • selector ((value: T))

Returns number


create static

create(t: Stimulsoft.System.Type, values: any[]): List

Parameters

Returns List


defaultIfEmpty

defaultIfEmpty(): List

Returns List


distinct

distinct(): List

Returns distinct elements from a sequence by using the default equality comparer to compare values.

Returns List — An List that contains distinct elements from the source sequence.


div static

div(a: any, b: any): List

Parameters

  • a (any)
  • b (any)

Returns List


except

except(second: List): [List](/Stimulsoft.Reports.Class.Reference.JS/Stimulsoft_System_Collections_Generic/List.html)

Parameters

Returns List


exists

exists(predicate: (value: T)): boolean

Parameters

  • predicate ((value: T))

Returns boolean


findIndex2

findIndex2(match: (value: T)): number

Parameters

  • match ((value: T))

Returns number


findLastIndex2

findLastIndex2(match: (value: T)): number

Parameters

  • match ((value: T))

Returns number


first

first(selector: (value: T)): T

Parameters

  • selector ((value: T))

Returns T


firstOrDefault

firstOrDefault(predicate: (value: T)): T

Parameters

  • predicate ((value: T))

Returns T


firstOrDefaultAsDateTime

firstOrDefaultAsDateTime(): DateTime

Returns DateTime


firstOrDefaultAsNullableDateTime

firstOrDefaultAsNullableDateTime(): DateTime | null

Returns DateTime | null


firstOrDefaultAsNullableNumber

firstOrDefaultAsNullableNumber(): number | null

Returns number | null


firstOrDefaultAsNumber

firstOrDefaultAsNumber(): number

Returns number


getArrayItem

getArrayItem(itemIndex: number): List<any[]>

Parameters

  • itemIndex (number)

Returns List<any[]>


getByIndex

getByIndex(index: number, keys: string[]): T

Parameters

  • index (number)
  • keys (string[])

Returns T


getKeys

getKeys(): string[]

Returns string[]


getNamespace static

getNamespace(): string

Returns string


getRange

getRange(index: number, count: number): List

Parameters

  • index (number)
  • count (number)

Returns List


getValueOrFirstOrDefault static

getValueOrFirstOrDefault(value: any): any

Parameters

  • value (any)

Returns any


groupBy

groupBy(keySelector: (value: T)): List<Grouping<K, T»

Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer.

Parameters

  • keySelector ((value: T)) — A function to extract the key for each element.

Returns List<Grouping<K, T» — An IEnumerable<IGrouping<TKey, TSource» in C# or IEnumerable(Of IGrouping(Of TKey, TSource)) in Visual Basic where each System.Linq.IGrouping`2 object contains a collection of objects and a key.


groupBy2

groupBy2(keySelector: (value: T)): List<Grouping<K, T»

Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer.

Parameters

  • keySelector ((value: T)) — A function to extract the key for each element.

Returns List<Grouping<K, T» — An IEnumerable<IGrouping<TKey, TSource» in C# or IEnumerable(Of IGrouping(Of TKey, TSource)) in Visual Basic where each System.Linq.IGrouping`2 object contains a collection of objects and a key.


insert

insert(index: number, item: T): void

Parameters

  • index (number)
  • item (T)

last

last(): T

Returns T


lastOrDefault

lastOrDefault(): T

Returns T


logicalAnd static

logicalAnd(a: any, b: any): List

Parameters

  • a (any)
  • b (any)

Returns List


logicalOr static

logicalOr(a: any, b: any): List

Parameters

  • a (any)
  • b (any)

Returns List


max

max(selector: (value: T)): S

Invokes a transform function on each element of a sequence and returns the maximum value.

Parameters

  • selector ((value: T)) — A transform function to apply to each element.

Returns S — The maximum value in the sequence.


min

min(selector: (value: T)): S

Invokes a transform function on each element of a sequence and returns the minimum value.

Parameters

  • selector ((value: T))

Returns S — The minimum value in the sequence.


mult static

mult(a: any, b: any): List

Parameters

  • a (any)
  • b (any)

Returns List


orderBy

orderBy(keySelector: (value: T)): List

Sorts the elements of a sequence in ascending order according to a key or by using a specified comparer.

Parameters

  • keySelector ((value: T)) — A function to extract a key from an element.

Returns List — An System.Linq.IOrderedEnumerable`1 whose elements are sorted according to a key.


orderByDescending

orderByDescending(keySelector: (value: T)): List

Parameters

  • keySelector ((value: T))

Returns List


peek

peek(): T

Returns T


remove

remove(item: T): void

Parameters

  • item (T)

removeAt

removeAt(index: number): void

Parameters

  • index (number)

removeByIndex

removeByIndex(index: number): List

Parameters

  • index (number)

Returns List


removeRange

removeRange(index: number, count: number): void

Parameters

  • index (number)
  • count (number)

repeat static

repeat(element: T, count: number): List

Parameters

  • element (T)
  • count (number)

Returns List


select

select(selector: (value: T)): List

Parameters

  • selector ((value: T))

Returns List


selectAsync

selectAsync(selector: (value: T)): Promise<List>

Parameters

  • selector ((value: T))

Returns Promise<List>


selectMany

selectMany(selector: (value: T)): List

Parameters

  • selector ((value: T))

Returns List


selectMany2

selectMany2(collectionSelector: (value: T)): List

Parameters

  • collectionSelector ((value: T))

Returns List


sequenceEqual

sequenceEqual(second: List): boolean

Parameters

Returns boolean


setByIndex

setByIndex(index: number, item: T, keys: string[]): void

Parameters

  • index (number)
  • item (T)
  • keys (string[])

skip

skip(count: number): List

Parameters

  • count (number)

Returns List


sort2

sort2(): void


sub static

sub(a: any, b: any): List

Parameters

  • a (any)
  • b (any)

Returns List


sum

sum(selector: (value: T)): number

Computes the sum of the sequence of System.Decimal values that are obtained by invoking a transform function on each element of the input sequence.

Parameters

  • selector ((value: T)) — A transform function to apply to each element.

Returns number — The sum of the projected values.


take

take(count: number): List

Parameters

  • count (number)

Returns List


toDictionary

toDictionary(keySelector: (item: T)): Dictionary<K, V>

Parameters

  • keySelector ((item: T))

Returns Dictionary<K, V>


toList

toList(): List

Returns List


toLookup

toLookup(keySelector: (value: T)): Hashtable

Creates a Lookup from an List according to a specified key selector function.

Parameters

  • keySelector ((value: T)) — A function to extract a key from each element.

Returns Hashtable — A Lookup that contains keys and values.


toString2 static

toString2(value: any): string

Parameters

  • value (any)

Returns string


tryCastToBool

tryCastToBool(): List<boolean | null>

Returns List<boolean | null>


tryCastToDateTime

tryCastToDateTime(): List<DateTime>

Returns List<DateTime>


tryCastToNullableDateTime

tryCastToNullableDateTime(): List<DateTime | null>

Returns List<DateTime | null>


tryCastToNullableNumber

tryCastToNullableNumber(): List<number | null>

Returns List<number | null>


tryCastToNullableTimeSpan

tryCastToNullableTimeSpan(): List<TimeSpan | null>

Returns List<TimeSpan | null>


tryCastToNumber

tryCastToNumber(): List<number | null>

Returns List<number | null>


tryCastToString

tryCastToString(): List

Returns List


tryCastToTimeSpan

tryCastToTimeSpan(): List<TimeSpan>

Returns List<TimeSpan>


tryCastValueOrFirstDefaultToNullableNumber

tryCastValueOrFirstDefaultToNullableNumber(): List<number | null>

Returns List<number | null>


union

union(second: List \| Array): [List](/Stimulsoft.Reports.Class.Reference.JS/Stimulsoft_System_Collections_Generic/List.html)

Parameters

  • second (List \| Array)

Returns List


where

where(predicate: (value: T, index: number)): List

Parameters

  • predicate ((value: T)
  • index (number))

Returns List


whereArrayItemEqualsTo

whereArrayItemEqualsTo(itemIndex: number, value: any): List<any[]>

Parameters

  • itemIndex (number)
  • value (any)

Returns List<any[]>


whereArrayItemStringEqualsTo

whereArrayItemStringEqualsTo(itemIndex: number, value: string): List<any[]>

Parameters

  • itemIndex (number)
  • value (string)

Returns List<any[]>


whereAsync

whereAsync(predicate: (value: T, index: number)): Promise<List>

Parameters

  • predicate ((value: T)
  • index (number))

Returns Promise<List>


whereEqualsTo

whereEqualsTo(values1: any, values2: any): List<any[]>

Parameters

  • values1 (any)
  • values2 (any)

Returns List<any[]>


whereFirstOrDefaultArrayItemStringEqualsTo

whereFirstOrDefaultArrayItemStringEqualsTo(itemIndex: number, value: string): any[]

Parameters

  • itemIndex (number)
  • value (string)

Returns any[]


zip

zip(second: List, **resultSelector**: (first: T, **second**: S)): [List](/Stimulsoft.Reports.Class.Reference.JS/Stimulsoft_System_Collections_Generic/List.html)

Parameters

  • second (List)
  • resultSelector ((first: T)
  • second (S))

Returns List

Fields

Field Type Description
castFunction any  
group any  
group any  
innerResult any  
item any  
item any  
lookup any  
seed any  
seed any  
sortArray any  
sortArray any