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>()

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)

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)

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)

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)

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)

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)

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...?...)

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>?)

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>?)

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)

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; }

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)

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)

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)

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)

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)

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)

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; }

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)

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)

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)

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)

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)

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; }

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

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)

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; }

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()

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)

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)

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)

Parameters:

  • aItem:

RemoveAll

Remove all items.

 

method RemoveAll

 

void RemoveAll()

 

func RemoveAll()

 

void 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)

Parameters:

  • aIndex:

RemoveFirstObject

Remove the first item.

 

method RemoveFirstObject

 

void RemoveFirstObject()

 

func RemoveFirstObject()

 

void RemoveFirstObject()

RemoveLastObject

Remove the last item.

 

method RemoveLastObject

 

void RemoveLastObject()

 

func RemoveLastObject()

 

void 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)

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)

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)

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)

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)

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)

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()

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>()

ToSortedList  virtual    (declared in ImmutableList<T>) .NET, .NET Standard 2.0, Toffee

Sorts this list ,and returns a copy.

 

method ToSortedList: ImmutableList<T>

 

ImmutableList<T> ToSortedList()

 

func ToSortedList() -> ImmutableList<T>

ToSortedList (Comparison<T>): ImmutableList<T>    (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)

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)

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; }

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; }

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; }

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; }

 

constructor

Creates a new list class.

 

constructor

 

List<T>()

 

init()

 

List<T>()

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)

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)

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)

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)

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)

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)

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...?...)

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>?)

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>?)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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

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)

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()

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)

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)

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)

Parameters:

  • aItem:

RemoveAll

Remove all items.

 

method RemoveAll

 

void RemoveAll()

 

func RemoveAll()

 

void 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)

Parameters:

  • aIndex:

RemoveFirstObject

Remove the first item.

 

method RemoveFirstObject

 

void RemoveFirstObject()

 

func RemoveFirstObject()

 

void RemoveFirstObject()

RemoveLastObject

Remove the last item.

 

method RemoveLastObject

 

void RemoveLastObject()

 

func RemoveLastObject()

 

void 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)

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)

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)

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)

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)

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)

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()

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>()

ToSortedList  virtual    (declared in ImmutableList<T>) .NET, .NET Standard 2.0, Toffee

Sorts this list ,and returns a copy.

 

method ToSortedList: ImmutableList<T>

 

ImmutableList<T> ToSortedList()

 

func ToSortedList() -> ImmutableList<T>

ToSortedList (Comparison<T>): ImmutableList<T>    (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)

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)

Parameters:

  • Match: