List<T>

Overview

List structure class.

Location

  • Reference:
    • Elements.dll  .NET, .NET Standard 2.0
    • elements.jar  Cooper
    • Elements.fx  Island, ToffeeV2
    • libElements.fx  Toffee
  • Namespace: RemObjects.Elements.RTL
  • Mapped to:
    • System.Collections.Generic.List  .NET, .NET Standard 2.0
    • java.util.ArrayList  Cooper
    • RemObjects.Elements.System.List  Island
    • Foundation.NSMutableArray  Toffee, ToffeeV2
  • Ancestry: ImmutableList<T> | List<T>

Implements

 

constructor

Creates a new list class.

 

constructor

 

List<T>()

 

init()

 

List<T>()

 

Sub New()

constructor (array of T)

Creates a new list class.

 

constructor(params anArray: array of T)

 

List<T>(params T[] anArray)

 

init(_ anArray: T...)

 

List<T>(T[]... anArray)

 

Sub New(ParamArray anArray As T())

Parameters:

  • anArray:

constructor (ImmutableList<T>)

Creates a new list class.

 

constructor(Items: ImmutableList<T>)

 

List<T>(ImmutableList<T> Items)

 

init(_ Items: ImmutableList<T>)

 

List<T>(ImmutableList<T> Items)

 

Sub New(Items As ImmutableList<T>)

Parameters:

  • Items:

constructor (IEnumerable<T>)

Creates a new list class.

 

constructor(Items: IEnumerable<T>)

 

List<T>(IEnumerable<T> Items)

 

// Toffee
init(_ Items: INSFastEnumeration<T>)
// ToffeeV2
init(_ Items: IEnumerable<T>)

 

List<T>(Iterable<T> Items)

 

Sub New(Items As IEnumerable<T>)

Parameters:

  • Items:

constructor withCapacity(Int32)

Creates a new isntance with a given capacity.

 

constructor withCapacity(aCapacity: Int32)

 

List<T> withCapacity(Int32 aCapacity)

 

init(withCapacity aCapacity: Int32)

 

List<T> withCapacity(Integer aCapacity)

 

Sub New withCapacity(aCapacity As Int32)

Parameters:

  • aCapacity:

constructor withRepeatedValue(T, Int32)

Creates a new instance with the value aValue repeated aCount times.

 

constructor withRepeatedValue(aValue: T; aCount: Int32)

 

List<T> withRepeatedValue(T aValue, Int32 aCount)

 

init(withRepeatedValue aValue: T, _ aCount: Int32)

 

List<T> withRepeatedValue(T aValue, Integer aCount)

 

Sub New withRepeatedValue(aValue As T, aCount As Int32)

Parameters:

  • aValue:
  • aCount:

Add (array of T)  virtual Cooper, Toffee

Add an array of items to the list.

 

func Add(_ Items: T...)

 

void Add(T[]... Items)

Parameters:

  • Items:

Add (ImmutableList<T>)  virtual Cooper, Toffee

Add a sequence of items to the list.

 

func Add(_ Items: ImmutableList<T>)

 

void Add(ImmutableList<T> Items)

Parameters:

  • Items:

Add (Iterable<T>)  virtual Cooper, Toffee

Add a sequence of items to the list.

 

func Add(_ Items: INSFastEnumeration<T>)

 

void Add(Iterable<T> Items)

Parameters:

  • Items:

Add (T): T

Add an item to the list.

 

method Add(aItem: T): T

 

T Add(T aItem)

 

func Add(_ aItem: T) -> T

 

T Add(T aItem)

 

Function Add(aItem As T) As T

Parameters:

  • aItem:

Add (nullable array of T) .NET, .NET Standard 2.0, Island, ToffeeV2

Add a sequence of items to the list.

 

method Add(params Items: nullable array of T)

 

void Add(params T[]? Items)

 

func Add(_ Items: T...?...)

 

Sub Add(ParamArray Items As T()?)

Parameters:

  • Items:

Add (nullable ImmutableList<T>) .NET, .NET Standard 2.0, Island, ToffeeV2

Add a sequence of items to the list.

 

method Add(Items: nullable ImmutableList<T>)

 

void Add(ImmutableList<T>? Items)

 

func Add(_ Items: ImmutableList<T>?)

 

Sub Add(Items As ImmutableList<T>?)

Parameters:

  • Items:

Add (nullable IEnumerable<T>) .NET, .NET Standard 2.0, Island, ToffeeV2

Add a sequence of items to the list.

 

method Add(Items: nullable IEnumerable<T>)

 

void Add(IEnumerable<T>? Items)

 

func Add(_ Items: IEnumerable<T>?)

 

Sub Add(Items As IEnumerable<T>?)

Parameters:

  • Items:

Add (nullable List<T>) ToffeeV2

Add a sequence of items to the list.

 

func Add(_ Items: List<T>?)

Parameters:

  • Items:

Contains    (declared in ImmutableList<T>)

Returns true if this list contains aItem.

 

method Contains(aItem: T): Boolean

 

Boolean Contains(T aItem)

 

func Contains(_ aItem: T) -> Boolean

 

Boolean Contains(T aItem)

 

Function Contains(aItem As T) As Boolean

Parameters:

  • aItem:

Count    (declared in ImmutableList<T>)

Returns the item count in this list.

 

property Count: Int32 read;

 

Int32 Count { get; }

 

var Count: Int32 { get{} }

 

Integer Count { __get; }

 

ReadOnly Property Count() As Int32

Exists    (declared in ImmutableList<T>)

Returns true if this list contains an element matching the predicate.

 

method Exists(Match: Predicate<T>): Boolean

 

Boolean Exists(Predicate<T> Match)

 

func Exists(_ Match: Predicate<T>) -> Boolean

 

Boolean Exists(Predicate<T> Match)

 

Function Exists(Match As Predicate<T>) As Boolean

Parameters:

  • Match:

Find    (declared in ImmutableList<T>)

Returns the first match that matches the predicate.

 

method Find(Match: Predicate<T>): T

 

T Find(Predicate<T> Match)

 

func Find(_ Match: Predicate<T>) -> T

 

T Find(Predicate<T> Match)

 

Function Find(Match As Predicate<T>) As T

Parameters:

  • Match:

FindAll    (declared in ImmutableList<T>)

Returns all matches that matches the predicate.

 

method FindAll(Match: Predicate<T>): IEnumerable<T>

 

IEnumerable<T> FindAll(Predicate<T> Match)

 

// Toffee
func FindAll(_ Match: Predicate<T>) -> INSFastEnumeration<T>
// ToffeeV2
func FindAll(_ Match: Predicate<T>) -> IEnumerable<T>

 

Iterable<T> FindAll(Predicate<T> Match)

 

Function FindAll(Match As Predicate<T>) As IEnumerable<T>

Parameters:

  • Match:

FindIndex (Int32, Int32, Predicate<T>): Int32    (declared in ImmutableList<T>)

Find the index of first matching item matching the predicate.

 

method FindIndex(StartIndex: Int32; aCount: Int32; Match: Predicate<T>): Int32

 

Int32 FindIndex(Int32 StartIndex, Int32 aCount, Predicate<T> Match)

 

func FindIndex(_ StartIndex: Int32, _ aCount: Int32, _ Match: Predicate<T>) -> Int32

 

Integer FindIndex(Integer StartIndex, Integer aCount, Predicate<T> Match)

 

Function FindIndex(StartIndex As Int32, aCount As Int32, Match As Predicate<T>) As Int32

Parameters:

  • StartIndex:
  • aCount:
  • Match:

FindIndex (Int32, Predicate<T>): Int32    (declared in ImmutableList<T>)

Find the index of first matching item matching the predicate.

 

method FindIndex(StartIndex: Int32; Match: Predicate<T>): Int32

 

Int32 FindIndex(Int32 StartIndex, Predicate<T> Match)

 

func FindIndex(_ StartIndex: Int32, _ Match: Predicate<T>) -> Int32

 

Integer FindIndex(Integer StartIndex, Predicate<T> Match)

 

Function FindIndex(StartIndex As Int32, Match As Predicate<T>) As Int32

Parameters:

  • StartIndex:
  • Match:

FindIndex (Predicate<T>): Int32    (declared in ImmutableList<T>)

Find the index of first matching item matching the predicate.

 

method FindIndex(Match: Predicate<T>): Int32

 

Int32 FindIndex(Predicate<T> Match)

 

func FindIndex(_ Match: Predicate<T>) -> Int32

 

Integer FindIndex(Predicate<T> Match)

 

Function FindIndex(Match As Predicate<T>) As Int32

Parameters:

  • Match:

FirstObject    (declared in ImmutableList<T>)

Returns the first element (or fails)

 

property FirstObject: not nullable T read;

 

T! FirstObject { get; }

 

var FirstObject: T { get{} }

 

T FirstObject { __get; }

 

ReadOnly Property FirstObject() As T

ForEach    (declared in ImmutableList<T>)

Loops over al litems and triggers the action for each item.

 

method ForEach(Action: Action<T>)

 

void ForEach(Action<T> Action)

 

func ForEach(_ Action: Action<T>)

 

void ForEach(Action1<T> Action)

 

Sub ForEach(Action As Action (Of T))

Parameters:

  • Action:

GetSequence    (declared in ImmutableList<T>) ToffeeV2

Returns a sequence of all items in this list.

 

func GetSequence() -> IEnumerable<T>

IndexOf    (declared in ImmutableList<T>)

Returns the index of matching item, or -1.

 

method IndexOf(aItem: T): Int32

 

Int32 IndexOf(T aItem)

 

func IndexOf(_ aItem: T) -> Int32

 

Integer IndexOf(T aItem)

 

Function IndexOf(aItem As T) As Int32

Parameters:

  • aItem:

Insert

Insert an item in the list at position aIndex.

 

method Insert(Index: Int32; aItem: T)

 

void Insert(Int32 Index, T aItem)

 

func Insert(_ Index: Int32, _ aItem: T)

 

void Insert(Integer Index, T aItem)

 

Sub Insert(Index As Int32, aItem As T)

Parameters:

  • Index:
  • aItem:

InsertRange (Int32, array of T)

Insert a range of elements at aIndex.

 

method InsertRange(Index: Int32; Items: array of T)

 

void InsertRange(Int32 Index, T[] Items)

 

func InsertRange(_ Index: Int32, _ Items: T...)

 

void InsertRange(Integer Index, T[] Items)

 

Sub InsertRange(Index As Int32, Items As T())

Parameters:

  • Index:
  • Items:

InsertRange (Int32, List<T>)

Insert a range of elements at aIndex.

 

method InsertRange(Index: Int32; Items: List<T>)

 

void InsertRange(Int32 Index, List<T> Items)

 

func InsertRange(_ Index: Int32, _ Items: List<T>)

 

void InsertRange(Integer Index, List<T> Items)

 

Sub InsertRange(Index As Int32, Items As List<T>)

Parameters:

  • Index:
  • Items:

Item

Access an item by index.

 

property Item[i: Int32]: T read write;

 

T Item[Int32 i] { get; set; }

 

subscript Item(_ i: Int32) -> T { get{} set{} }

 

T Item[Integer i] { __get; __set; }

 

Property Item(i As Int32) As T

JoinedString (String): not nullable String  virtual    (declared in ImmutableList<T>) Cooper, Toffee

Join the items in this list together with separator as separator.

 

func JoinedString(_ aSeparator: String) -> String

 

String JoinedString(String aSeparator)

Parameters:

  • aSeparator:

JoinedString (nullable String): not nullable String    (declared in ImmutableList<T>) .NET, .NET Standard 2.0, Island, ToffeeV2

Join the items in this list together with separator as separator.

 

method JoinedString(aSeparator: nullable String): not nullable String

 

String! JoinedString(String? aSeparator)

 

func JoinedString(_ aSeparator: String?) -> String

 

Function JoinedString(aSeparator As String?) As String

Parameters:

  • aSeparator:

LastIndexOf    (declared in ImmutableList<T>)

Returns the index of matching item, or -1, in reverse lookup order.

 

method LastIndexOf(aItem: T): Int32

 

Int32 LastIndexOf(T aItem)

 

func LastIndexOf(_ aItem: T) -> Int32

 

Integer LastIndexOf(T aItem)

 

Function LastIndexOf(aItem As T) As Int32

Parameters:

  • aItem:

LastObject    (declared in ImmutableList<T>)

Returns the last object in the list, or fails.

 

property LastObject: not nullable T read;

 

T! LastObject { get; }

 

var LastObject: T { get{} }

 

T LastObject { __get; }

 

ReadOnly Property LastObject() As T

MutableVersion    (declared in ImmutableList<T>)

creates a copy of the list as mutable list.

 

method MutableVersion: not nullable List<T>

 

List<T>! MutableVersion()

 

func MutableVersion() -> List<T>

 

List<T> MutableVersion()

 

Function MutableVersion() As List<T>

Remove (IEnumerable<T>)

Remove a range of items.

 

method Remove(aItems: IEnumerable<T>)

 

void Remove(IEnumerable<T> aItems)

 

// Toffee
func Remove(_ aItems: INSFastEnumeration<T>)
// ToffeeV2
func Remove(_ aItems: IEnumerable<T>)

 

void Remove(Iterable<T> aItems)

 

Sub Remove(aItems As IEnumerable<T>)

Parameters:

  • aItems:

Remove (List<T>)

Remove a range of items.

 

method Remove(aItems: List<T>)

 

void Remove(List<T> aItems)

 

func Remove(_ aItems: List<T>)

 

void Remove(List<T> aItems)

 

Sub Remove(aItems As List<T>)

Parameters:

  • aItems:

Remove (T): Boolean

Remove an item.

 

method Remove(aItem: T): Boolean

 

Boolean Remove(T aItem)

 

func Remove(_ aItem: T) -> Boolean

 

Boolean Remove(T aItem)

 

Function Remove(aItem As T) As Boolean

Parameters:

  • aItem:

RemoveAll

Remove all items.

 

method RemoveAll

 

void RemoveAll()

 

func RemoveAll()

 

void RemoveAll()

 

Sub RemoveAll()

RemoveAt

Remove an item at the given index.

 

method RemoveAt(aIndex: Int32)

 

void RemoveAt(Int32 aIndex)

 

func RemoveAt(_ aIndex: Int32)

 

void RemoveAt(Integer aIndex)

 

Sub RemoveAt(aIndex As Int32)

Parameters:

  • aIndex:

RemoveFirstObject

Remove the first item.

 

method RemoveFirstObject

 

void RemoveFirstObject()

 

func RemoveFirstObject()

 

void RemoveFirstObject()

 

Sub RemoveFirstObject()

RemoveLastObject

Remove the last item.

 

method RemoveLastObject

 

void RemoveLastObject()

 

func RemoveLastObject()

 

void RemoveLastObject()

 

Sub RemoveLastObject()

RemoveRange

Remove a range of items.

 

method RemoveRange(aIndex: Int32; aCount: Int32)

 

void RemoveRange(Int32 aIndex, Int32 aCount)

 

func RemoveRange(_ aIndex: Int32, _ aCount: Int32)

 

void RemoveRange(Integer aIndex, Integer aCount)

 

Sub RemoveRange(aIndex As Int32, aCount As Int32)

Parameters:

  • aIndex:
  • aCount:

ReplaceAt

Replace an item at a specific location.

 

method ReplaceAt(aIndex: Int32; aNewObject: T): T

 

T ReplaceAt(Int32 aIndex, T aNewObject)

 

func ReplaceAt(_ aIndex: Int32, _ aNewObject: T) -> T

 

T ReplaceAt(Integer aIndex, T aNewObject)

 

Function ReplaceAt(aIndex As Int32, aNewObject As T) As T

Parameters:

  • aIndex:
  • aNewObject:

ReplaceRange

Replace a range of items, essentially removes the range from aIndex to aIndex + aCount, then inserts aNewObjects.

 

method ReplaceRange(aIndex: Int32; aCount: Int32; aNewObjects: ImmutableList<T>): T

 

T ReplaceRange(Int32 aIndex, Int32 aCount, ImmutableList<T> aNewObjects)

 

func ReplaceRange(_ aIndex: Int32, _ aCount: Int32, _ aNewObjects: ImmutableList<T>) -> T

 

T ReplaceRange(Integer aIndex, Integer aCount, ImmutableList<T> aNewObjects)

 

Function ReplaceRange(aIndex As Int32, aCount As Int32, aNewObjects As ImmutableList<T>) As T

Parameters:

  • aIndex:
  • aCount:
  • aNewObjects:

Sort

Sort this list.

 

method Sort(Comparison: Comparison<T>)

 

void Sort(Comparison<T> Comparison)

 

func Sort(_ Comparison: Comparison<T>)

 

void Sort(Comparison<T> Comparison)

 

Sub Sort(Comparison As Comparison<T>)

Parameters:

  • Comparison:

SubList (Int32): List<T>

Create a new list that's a substring of this list.

 

method SubList(aStartIndex: Int32): List<T>

 

List<T> SubList(Int32 aStartIndex)

 

func SubList(_ aStartIndex: Int32) -> List<T>

 

List<T> SubList(Integer aStartIndex)

 

Function SubList(aStartIndex As Int32) As List<T>

Parameters:

  • aStartIndex:

SubList (Int32, Int32): List<T>

Create a new list that's a substring of this list.

 

method SubList(aStartIndex: Int32; aLength: Int32): List<T>

 

List<T> SubList(Int32 aStartIndex, Int32 aLength)

 

func SubList(_ aStartIndex: Int32, _ aLength: Int32) -> List<T>

 

List<T> SubList(Integer aStartIndex, Integer aLength)

 

Function SubList(aStartIndex As Int32, aLength As Int32) As List<T>

Parameters:

  • aStartIndex:
  • aLength:

ToArray    (declared in ImmutableList<T>)

Creates an array from the items in this list.

 

method ToArray: not nullable array of T

 

T[]! ToArray()

 

func ToArray() -> T...

 

T[] ToArray()

 

Function ToArray() As T()

ToList<U>

Create a copy of this list.

 

method ToList<U>: List<U>

 

List<U> ToList<U>()

 

func ToList<U>() -> List<U>

 

List<U> ToList<U>()

 

Function ToList<U>() As List<U>

ToSortedList    (declared in ImmutableList<T>)

Sorts this list ,and returns a copy.

 

method ToSortedList(Comparison: Comparison<T>): ImmutableList<T>

 

ImmutableList<T> ToSortedList(Comparison<T> Comparison)

 

func ToSortedList(_ Comparison: Comparison<T>) -> ImmutableList<T>

 

ImmutableList<T> ToSortedList(Comparison<T> Comparison)

 

Function ToSortedList(Comparison As Comparison<T>) As ImmutableList<T>

Parameters:

  • Comparison:

TrueForAll    (declared in ImmutableList<T>)

Returns true if the predicate is true for all items in this list.

 

method TrueForAll(Match: Predicate<T>): Boolean

 

Boolean TrueForAll(Predicate<T> Match)

 

func TrueForAll(_ Match: Predicate<T>) -> Boolean

 

Boolean TrueForAll(Predicate<T> Match)

 

Function TrueForAll(Match As Predicate<T>) As Boolean

Parameters:

  • Match:

 

Count    (declared in ImmutableList<T>)

Returns the item count in this list.

 

property Count: Int32 read;

 

Int32 Count { get; }

 

var Count: Int32 { get{} }

 

Integer Count { __get; }

 

ReadOnly Property Count() As Int32

FirstObject    (declared in ImmutableList<T>)

Returns the first element (or fails)

 

property FirstObject: not nullable T read;

 

T! FirstObject { get; }

 

var FirstObject: T { get{} }

 

T FirstObject { __get; }

 

ReadOnly Property FirstObject() As T

Item

Access an item by index.

 

property Item[i: Int32]: T read write;

 

T Item[Int32 i] { get; set; }

 

subscript Item(_ i: Int32) -> T { get{} set{} }

 

T Item[Integer i] { __get; __set; }

 

Property Item(i As Int32) As T

LastObject    (declared in ImmutableList<T>)

Returns the last object in the list, or fails.

 

property LastObject: not nullable T read;

 

T! LastObject { get; }

 

var LastObject: T { get{} }

 

T LastObject { __get; }

 

ReadOnly Property LastObject() As T

 

constructor

Creates a new list class.

 

constructor

 

List<T>()

 

init()

 

List<T>()

 

Sub New()

constructor (array of T)

Creates a new list class.

 

constructor(params anArray: array of T)

 

List<T>(params T[] anArray)

 

init(_ anArray: T...)

 

List<T>(T[]... anArray)

 

Sub New(ParamArray anArray As T())

Parameters:

  • anArray:

constructor (ImmutableList<T>)

Creates a new list class.

 

constructor(Items: ImmutableList<T>)

 

List<T>(ImmutableList<T> Items)

 

init(_ Items: ImmutableList<T>)

 

List<T>(ImmutableList<T> Items)

 

Sub New(Items As ImmutableList<T>)

Parameters:

  • Items:

constructor (IEnumerable<T>)

Creates a new list class.

 

constructor(Items: IEnumerable<T>)

 

List<T>(IEnumerable<T> Items)

 

// Toffee
init(_ Items: INSFastEnumeration<T>)
// ToffeeV2
init(_ Items: IEnumerable<T>)

 

List<T>(Iterable<T> Items)

 

Sub New(Items As IEnumerable<T>)

Parameters:

  • Items:

constructor withCapacity(Int32)

Creates a new isntance with a given capacity.

 

constructor withCapacity(aCapacity: Int32)

 

List<T> withCapacity(Int32 aCapacity)

 

init(withCapacity aCapacity: Int32)

 

List<T> withCapacity(Integer aCapacity)

 

Sub New withCapacity(aCapacity As Int32)

Parameters:

  • aCapacity:

constructor withRepeatedValue(T, Int32)

Creates a new instance with the value aValue repeated aCount times.

 

constructor withRepeatedValue(aValue: T; aCount: Int32)

 

List<T> withRepeatedValue(T aValue, Int32 aCount)

 

init(withRepeatedValue aValue: T, _ aCount: Int32)

 

List<T> withRepeatedValue(T aValue, Integer aCount)

 

Sub New withRepeatedValue(aValue As T, aCount As Int32)

Parameters:

  • aValue:
  • aCount:

Add (array of T)  virtual Cooper, Toffee

Add an array of items to the list.

 

func Add(_ Items: T...)

 

void Add(T[]... Items)

Parameters:

  • Items:

Add (ImmutableList<T>)  virtual Cooper, Toffee

Add a sequence of items to the list.

 

func Add(_ Items: ImmutableList<T>)

 

void Add(ImmutableList<T> Items)

Parameters:

  • Items:

Add (Iterable<T>)  virtual Cooper, Toffee

Add a sequence of items to the list.

 

func Add(_ Items: INSFastEnumeration<T>)

 

void Add(Iterable<T> Items)

Parameters:

  • Items:

Add (T): T

Add an item to the list.

 

method Add(aItem: T): T

 

T Add(T aItem)

 

func Add(_ aItem: T) -> T

 

T Add(T aItem)

 

Function Add(aItem As T) As T

Parameters:

  • aItem:

Add (nullable array of T) .NET, .NET Standard 2.0, Island, ToffeeV2

Add a sequence of items to the list.

 

method Add(params Items: nullable array of T)

 

void Add(params T[]? Items)

 

func Add(_ Items: T...?...)

 

Sub Add(ParamArray Items As T()?)

Parameters:

  • Items:

Add (nullable ImmutableList<T>) .NET, .NET Standard 2.0, Island, ToffeeV2

Add a sequence of items to the list.

 

method Add(Items: nullable ImmutableList<T>)

 

void Add(ImmutableList<T>? Items)

 

func Add(_ Items: ImmutableList<T>?)

 

Sub Add(Items As ImmutableList<T>?)

Parameters:

  • Items:

Add (nullable IEnumerable<T>) .NET, .NET Standard 2.0, Island, ToffeeV2

Add a sequence of items to the list.

 

method Add(Items: nullable IEnumerable<T>)

 

void Add(IEnumerable<T>? Items)

 

func Add(_ Items: IEnumerable<T>?)

 

Sub Add(Items As IEnumerable<T>?)

Parameters:

  • Items:

Add (nullable List<T>) ToffeeV2

Add a sequence of items to the list.

 

func Add(_ Items: List<T>?)

Parameters:

  • Items:

Contains    (declared in ImmutableList<T>)

Returns true if this list contains aItem.

 

method Contains(aItem: T): Boolean

 

Boolean Contains(T aItem)

 

func Contains(_ aItem: T) -> Boolean

 

Boolean Contains(T aItem)

 

Function Contains(aItem As T) As Boolean

Parameters:

  • aItem:

Exists    (declared in ImmutableList<T>)

Returns true if this list contains an element matching the predicate.

 

method Exists(Match: Predicate<T>): Boolean

 

Boolean Exists(Predicate<T> Match)

 

func Exists(_ Match: Predicate<T>) -> Boolean

 

Boolean Exists(Predicate<T> Match)

 

Function Exists(Match As Predicate<T>) As Boolean

Parameters:

  • Match:

Find    (declared in ImmutableList<T>)

Returns the first match that matches the predicate.

 

method Find(Match: Predicate<T>): T

 

T Find(Predicate<T> Match)

 

func Find(_ Match: Predicate<T>) -> T

 

T Find(Predicate<T> Match)

 

Function Find(Match As Predicate<T>) As T

Parameters:

  • Match:

FindAll    (declared in ImmutableList<T>)

Returns all matches that matches the predicate.

 

method FindAll(Match: Predicate<T>): IEnumerable<T>

 

IEnumerable<T> FindAll(Predicate<T> Match)

 

// Toffee
func FindAll(_ Match: Predicate<T>) -> INSFastEnumeration<T>
// ToffeeV2
func FindAll(_ Match: Predicate<T>) -> IEnumerable<T>

 

Iterable<T> FindAll(Predicate<T> Match)

 

Function FindAll(Match As Predicate<T>) As IEnumerable<T>

Parameters:

  • Match:

FindIndex (Int32, Int32, Predicate<T>): Int32    (declared in ImmutableList<T>)

Find the index of first matching item matching the predicate.

 

method FindIndex(StartIndex: Int32; aCount: Int32; Match: Predicate<T>): Int32

 

Int32 FindIndex(Int32 StartIndex, Int32 aCount, Predicate<T> Match)

 

func FindIndex(_ StartIndex: Int32, _ aCount: Int32, _ Match: Predicate<T>) -> Int32

 

Integer FindIndex(Integer StartIndex, Integer aCount, Predicate<T> Match)

 

Function FindIndex(StartIndex As Int32, aCount As Int32, Match As Predicate<T>) As Int32

Parameters:

  • StartIndex:
  • aCount:
  • Match:

FindIndex (Int32, Predicate<T>): Int32    (declared in ImmutableList<T>)

Find the index of first matching item matching the predicate.

 

method FindIndex(StartIndex: Int32; Match: Predicate<T>): Int32

 

Int32 FindIndex(Int32 StartIndex, Predicate<T> Match)

 

func FindIndex(_ StartIndex: Int32, _ Match: Predicate<T>) -> Int32

 

Integer FindIndex(Integer StartIndex, Predicate<T> Match)

 

Function FindIndex(StartIndex As Int32, Match As Predicate<T>) As Int32

Parameters:

  • StartIndex:
  • Match:

FindIndex (Predicate<T>): Int32    (declared in ImmutableList<T>)

Find the index of first matching item matching the predicate.

 

method FindIndex(Match: Predicate<T>): Int32

 

Int32 FindIndex(Predicate<T> Match)

 

func FindIndex(_ Match: Predicate<T>) -> Int32

 

Integer FindIndex(Predicate<T> Match)

 

Function FindIndex(Match As Predicate<T>) As Int32

Parameters:

  • Match:

ForEach    (declared in ImmutableList<T>)

Loops over al litems and triggers the action for each item.

 

method ForEach(Action: Action<T>)

 

void ForEach(Action<T> Action)

 

func ForEach(_ Action: Action<T>)

 

void ForEach(Action1<T> Action)

 

Sub ForEach(Action As Action (Of T))

Parameters:

  • Action:

GetSequence    (declared in ImmutableList<T>) ToffeeV2

Returns a sequence of all items in this list.

 

func GetSequence() -> IEnumerable<T>

IndexOf    (declared in ImmutableList<T>)

Returns the index of matching item, or -1.

 

method IndexOf(aItem: T): Int32

 

Int32 IndexOf(T aItem)

 

func IndexOf(_ aItem: T) -> Int32

 

Integer IndexOf(T aItem)

 

Function IndexOf(aItem As T) As Int32

Parameters:

  • aItem:

Insert

Insert an item in the list at position aIndex.

 

method Insert(Index: Int32; aItem: T)

 

void Insert(Int32 Index, T aItem)

 

func Insert(_ Index: Int32, _ aItem: T)

 

void Insert(Integer Index, T aItem)

 

Sub Insert(Index As Int32, aItem As T)

Parameters:

  • Index:
  • aItem:

InsertRange (Int32, array of T)

Insert a range of elements at aIndex.

 

method InsertRange(Index: Int32; Items: array of T)

 

void InsertRange(Int32 Index, T[] Items)

 

func InsertRange(_ Index: Int32, _ Items: T...)

 

void InsertRange(Integer Index, T[] Items)

 

Sub InsertRange(Index As Int32, Items As T())

Parameters:

  • Index:
  • Items:

InsertRange (Int32, List<T>)

Insert a range of elements at aIndex.

 

method InsertRange(Index: Int32; Items: List<T>)

 

void InsertRange(Int32 Index, List<T> Items)

 

func InsertRange(_ Index: Int32, _ Items: List<T>)

 

void InsertRange(Integer Index, List<T> Items)

 

Sub InsertRange(Index As Int32, Items As List<T>)

Parameters:

  • Index:
  • Items:

JoinedString (String): not nullable String  virtual    (declared in ImmutableList<T>) Cooper, Toffee

Join the items in this list together with separator as separator.

 

func JoinedString(_ aSeparator: String) -> String

 

String JoinedString(String aSeparator)

Parameters:

  • aSeparator:

JoinedString (nullable String): not nullable String    (declared in ImmutableList<T>) .NET, .NET Standard 2.0, Island, ToffeeV2

Join the items in this list together with separator as separator.

 

method JoinedString(aSeparator: nullable String): not nullable String

 

String! JoinedString(String? aSeparator)

 

func JoinedString(_ aSeparator: String?) -> String

 

Function JoinedString(aSeparator As String?) As String

Parameters:

  • aSeparator:

LastIndexOf    (declared in ImmutableList<T>)

Returns the index of matching item, or -1, in reverse lookup order.

 

method LastIndexOf(aItem: T): Int32

 

Int32 LastIndexOf(T aItem)

 

func LastIndexOf(_ aItem: T) -> Int32

 

Integer LastIndexOf(T aItem)

 

Function LastIndexOf(aItem As T) As Int32

Parameters:

  • aItem:

MutableVersion    (declared in ImmutableList<T>)

creates a copy of the list as mutable list.

 

method MutableVersion: not nullable List<T>

 

List<T>! MutableVersion()

 

func MutableVersion() -> List<T>

 

List<T> MutableVersion()

 

Function MutableVersion() As List<T>

Remove (IEnumerable<T>)

Remove a range of items.

 

method Remove(aItems: IEnumerable<T>)

 

void Remove(IEnumerable<T> aItems)

 

// Toffee
func Remove(_ aItems: INSFastEnumeration<T>)
// ToffeeV2
func Remove(_ aItems: IEnumerable<T>)

 

void Remove(Iterable<T> aItems)

 

Sub Remove(aItems As IEnumerable<T>)

Parameters:

  • aItems:

Remove (List<T>)

Remove a range of items.

 

method Remove(aItems: List<T>)

 

void Remove(List<T> aItems)

 

func Remove(_ aItems: List<T>)

 

void Remove(List<T> aItems)

 

Sub Remove(aItems As List<T>)

Parameters:

  • aItems:

Remove (T): Boolean

Remove an item.

 

method Remove(aItem: T): Boolean

 

Boolean Remove(T aItem)

 

func Remove(_ aItem: T) -> Boolean

 

Boolean Remove(T aItem)

 

Function Remove(aItem As T) As Boolean

Parameters:

  • aItem:

RemoveAll

Remove all items.

 

method RemoveAll

 

void RemoveAll()

 

func RemoveAll()

 

void RemoveAll()

 

Sub RemoveAll()

RemoveAt

Remove an item at the given index.

 

method RemoveAt(aIndex: Int32)

 

void RemoveAt(Int32 aIndex)

 

func RemoveAt(_ aIndex: Int32)

 

void RemoveAt(Integer aIndex)

 

Sub RemoveAt(aIndex As Int32)

Parameters:

  • aIndex:

RemoveFirstObject

Remove the first item.

 

method RemoveFirstObject

 

void RemoveFirstObject()

 

func RemoveFirstObject()

 

void RemoveFirstObject()

 

Sub RemoveFirstObject()

RemoveLastObject

Remove the last item.

 

method RemoveLastObject

 

void RemoveLastObject()

 

func RemoveLastObject()

 

void RemoveLastObject()

 

Sub RemoveLastObject()

RemoveRange

Remove a range of items.

 

method RemoveRange(aIndex: Int32; aCount: Int32)

 

void RemoveRange(Int32 aIndex, Int32 aCount)

 

func RemoveRange(_ aIndex: Int32, _ aCount: Int32)

 

void RemoveRange(Integer aIndex, Integer aCount)

 

Sub RemoveRange(aIndex As Int32, aCount As Int32)

Parameters:

  • aIndex:
  • aCount:

ReplaceAt

Replace an item at a specific location.

 

method ReplaceAt(aIndex: Int32; aNewObject: T): T

 

T ReplaceAt(Int32 aIndex, T aNewObject)

 

func ReplaceAt(_ aIndex: Int32, _ aNewObject: T) -> T

 

T ReplaceAt(Integer aIndex, T aNewObject)

 

Function ReplaceAt(aIndex As Int32, aNewObject As T) As T

Parameters:

  • aIndex:
  • aNewObject:

ReplaceRange

Replace a range of items, essentially removes the range from aIndex to aIndex + aCount, then inserts aNewObjects.

 

method ReplaceRange(aIndex: Int32; aCount: Int32; aNewObjects: ImmutableList<T>): T

 

T ReplaceRange(Int32 aIndex, Int32 aCount, ImmutableList<T> aNewObjects)

 

func ReplaceRange(_ aIndex: Int32, _ aCount: Int32, _ aNewObjects: ImmutableList<T>) -> T

 

T ReplaceRange(Integer aIndex, Integer aCount, ImmutableList<T> aNewObjects)

 

Function ReplaceRange(aIndex As Int32, aCount As Int32, aNewObjects As ImmutableList<T>) As T

Parameters:

  • aIndex:
  • aCount:
  • aNewObjects:

Sort

Sort this list.

 

method Sort(Comparison: Comparison<T>)

 

void Sort(Comparison<T> Comparison)

 

func Sort(_ Comparison: Comparison<T>)

 

void Sort(Comparison<T> Comparison)

 

Sub Sort(Comparison As Comparison<T>)

Parameters:

  • Comparison:

SubList (Int32): List<T>

Create a new list that's a substring of this list.

 

method SubList(aStartIndex: Int32): List<T>

 

List<T> SubList(Int32 aStartIndex)

 

func SubList(_ aStartIndex: Int32) -> List<T>

 

List<T> SubList(Integer aStartIndex)

 

Function SubList(aStartIndex As Int32) As List<T>

Parameters:

  • aStartIndex:

SubList (Int32, Int32): List<T>

Create a new list that's a substring of this list.

 

method SubList(aStartIndex: Int32; aLength: Int32): List<T>

 

List<T> SubList(Int32 aStartIndex, Int32 aLength)

 

func SubList(_ aStartIndex: Int32, _ aLength: Int32) -> List<T>

 

List<T> SubList(Integer aStartIndex, Integer aLength)

 

Function SubList(aStartIndex As Int32, aLength As Int32) As List<T>

Parameters:

  • aStartIndex:
  • aLength:

ToArray    (declared in ImmutableList<T>)

Creates an array from the items in this list.

 

method ToArray: not nullable array of T

 

T[]! ToArray()

 

func ToArray() -> T...

 

T[] ToArray()

 

Function ToArray() As T()

ToList<U>

Create a copy of this list.

 

method ToList<U>: List<U>

 

List<U> ToList<U>()

 

func ToList<U>() -> List<U>

 

List<U> ToList<U>()

 

Function ToList<U>() As List<U>

ToSortedList    (declared in ImmutableList<T>)

Sorts this list ,and returns a copy.

 

method ToSortedList(Comparison: Comparison<T>): ImmutableList<T>

 

ImmutableList<T> ToSortedList(Comparison<T> Comparison)

 

func ToSortedList(_ Comparison: Comparison<T>) -> ImmutableList<T>

 

ImmutableList<T> ToSortedList(Comparison<T> Comparison)

 

Function ToSortedList(Comparison As Comparison<T>) As ImmutableList<T>

Parameters:

  • Comparison:

TrueForAll    (declared in ImmutableList<T>)

Returns true if the predicate is true for all items in this list.

 

method TrueForAll(Match: Predicate<T>): Boolean

 

Boolean TrueForAll(Predicate<T> Match)

 

func TrueForAll(_ Match: Predicate<T>) -> Boolean

 

Boolean TrueForAll(Predicate<T> Match)

 

Function TrueForAll(Match As Predicate<T>) As Boolean

Parameters:

  • Match: