ImmutableList<T>

Overview

Base list class that works as a list, but doesn't allow changes beyond the initial creation.

Location

  • Reference: Island.fx
  • Namespace: RemObjects.Elements.System
  • Platforms: Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows

Descendants

Implements

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

ImmutableList<T>()

 

init()

 

ImmutableList<T>()

 

Sub New()

Capacity

Returns the capacity of this list.

 

property Capacity: Int32 read;

 

Int32 Capacity { get; }

 

var Capacity: Int32 { get{} }

 

Int32 Capacity { __get; }

 

ReadOnly Property Capacity() As Int32

Contains

Returns true if this value is contained in this list.

 

method Contains(anItem: T): Boolean

 

Boolean Contains(T anItem)

 

func Contains(_ anItem: T) -> Boolean

 

Boolean Contains(T anItem)

 

Function Contains(anItem As T) As Boolean

Parameters:

  • anItem:

CopyTo (array of T)

Copy the list data to an array.

 

method CopyTo(array: array of T)

 

void CopyTo(T[] array)

 

func CopyTo(_ array: T...)

 

void CopyTo(T[] array)

 

Sub CopyTo(array As T())

Parameters:

  • array:

CopyTo (array of T, Int32)

Copy the list data to an array.

 

method CopyTo(array: array of T; arrayIndex: Int32)

 

void CopyTo(T[] array, Int32 arrayIndex)

 

func CopyTo(_ array: T..., _ arrayIndex: Int32)

 

void CopyTo(T[] array, Int32 arrayIndex)

 

Sub CopyTo(array As T(), arrayIndex As Int32)

Parameters:

  • array:
  • arrayIndex:

CopyTo (Int32, array of T, Int32, Int32)

Copy the list data to an array.

 

method CopyTo(index: Int32; array: array of T; arrayIndex: Int32; count: Int32)

 

void CopyTo(Int32 index, T[] array, Int32 arrayIndex, Int32 count)

 

func CopyTo(_ index: Int32, _ array: T..., _ arrayIndex: Int32, _ count: Int32)

 

void CopyTo(Int32 index, T[] array, Int32 arrayIndex, Int32 count)

 

Sub CopyTo(index As Int32, array As T(), arrayIndex As Int32, count As Int32)

Parameters:

  • index:
  • array:
  • arrayIndex:
  • count:

Count  virtual

returns the number of elements in this list.

 

property Count: Int32 read;

 

Int32 Count { get; }

 

var Count: Int32 { get{} }

 

Int32 Count { __get; }

 

ReadOnly Property Count() As Int32

Equals  virtual    (declared in Object)

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

 

Function Equals(obj As Object) As Boolean

Parameters:

  • obj: the reference to compare this with.

Exists

Returns true if a predicate succeeds on an item in this list.

 

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:

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

 

Sub Finalize()

Find

Returns value for the first time a predicate succeeds on an item in this list.

 

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

Returns all values for the values a predicate succeeds on this list.

 

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

 

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

 

func FindAll(_ Match: Predicate<T>) -> List<T>

 

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

 

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

Parameters:

  • Match:

FindIndex (Int32, Int32, Predicate<T>): Int32

Returns the index of an item in this list for a given 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

 

Int32 FindIndex(Int32 StartIndex, Int32 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

Returns the index of an item in this list for a given predicate.

 

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

 

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

 

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

 

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

 

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

Parameters:

  • StartIndex:
  • Match:

FindIndex (Predicate<T>): Int32

Returns the index of an item in this list for a given predicate.

 

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

 

Int32 FindIndex(Predicate<T> Match)

 

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

 

Int32 FindIndex(Predicate<T> Match)

 

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

Parameters:

  • Match:

ForEach

Loops all items in this list, calling the action with the given value.

 

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:

GetEnumerator

Iterator for this object.

 

method GetEnumerator: IEnumerator<T>

 

IEnumerator<T> GetEnumerator()

 

func GetEnumerator() -> IEnumerator<T>

 

IEnumerator<T> GetEnumerator()

 

Function GetEnumerator() As IEnumerator<T>

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

IndexOf

Returns the index of an object.

 

method IndexOf(anItem: T): Int32

 

Int32 IndexOf(T anItem)

 

func IndexOf(_ anItem: T) -> Int32

 

Int32 IndexOf(T anItem)

 

Function IndexOf(anItem As T) As Int32

Parameters:

  • anItem:

Item  virtual

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[Int32 i] { __get; __set; }

 

Property Item(i As Int32) As T

LastIndexOf

Returns the last index of an object.

 

method LastIndexOf(anItem: T): Int32

 

Int32 LastIndexOf(T anItem)

 

func LastIndexOf(_ anItem: T) -> Int32

 

Int32 LastIndexOf(T anItem)

 

Function LastIndexOf(anItem As T) As Int32

Parameters:

  • anItem:

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

ToArray

Convert this list to an array.

 

method ToArray: array of T

 

T[] ToArray()

 

func ToArray() -> T...

 

T[] ToArray()

 

Function ToArray() As T()

ToNSArray iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k

Convert this list to an NSArray.

 

method ToNSArray: NSArray<T>

 

NSArray<T> ToNSArray()

 

func ToNSArray() -> NSArray<T>

 

NSArray<T> ToNSArray()

 

Function ToNSArray() As NSArray<T>

ToNSMutableArray iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k

Convert this list to an NSMutableArray.

 

method ToNSMutableArray: NSMutableArray<T>

 

NSMutableArray<T> ToNSMutableArray()

 

func ToNSMutableArray() -> NSMutableArray<T>

 

NSMutableArray<T> ToNSMutableArray()

 

Function ToNSMutableArray() As NSMutableArray<T>

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

TrueForAll

Returns true if the predicate returns true on all values 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:

 

Capacity

Returns the capacity of this list.

 

property Capacity: Int32 read;

 

Int32 Capacity { get; }

 

var Capacity: Int32 { get{} }

 

Int32 Capacity { __get; }

 

ReadOnly Property Capacity() As Int32

Count  virtual

returns the number of elements in this list.

 

property Count: Int32 read;

 

Int32 Count { get; }

 

var Count: Int32 { get{} }

 

Int32 Count { __get; }

 

ReadOnly Property Count() As Int32

Item  virtual

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[Int32 i] { __get; __set; }

 

Property Item(i As Int32) As T

 

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

ImmutableList<T>()

 

init()

 

ImmutableList<T>()

 

Sub New()

Contains

Returns true if this value is contained in this list.

 

method Contains(anItem: T): Boolean

 

Boolean Contains(T anItem)

 

func Contains(_ anItem: T) -> Boolean

 

Boolean Contains(T anItem)

 

Function Contains(anItem As T) As Boolean

Parameters:

  • anItem:

CopyTo (array of T)

Copy the list data to an array.

 

method CopyTo(array: array of T)

 

void CopyTo(T[] array)

 

func CopyTo(_ array: T...)

 

void CopyTo(T[] array)

 

Sub CopyTo(array As T())

Parameters:

  • array:

CopyTo (array of T, Int32)

Copy the list data to an array.

 

method CopyTo(array: array of T; arrayIndex: Int32)

 

void CopyTo(T[] array, Int32 arrayIndex)

 

func CopyTo(_ array: T..., _ arrayIndex: Int32)

 

void CopyTo(T[] array, Int32 arrayIndex)

 

Sub CopyTo(array As T(), arrayIndex As Int32)

Parameters:

  • array:
  • arrayIndex:

CopyTo (Int32, array of T, Int32, Int32)

Copy the list data to an array.

 

method CopyTo(index: Int32; array: array of T; arrayIndex: Int32; count: Int32)

 

void CopyTo(Int32 index, T[] array, Int32 arrayIndex, Int32 count)

 

func CopyTo(_ index: Int32, _ array: T..., _ arrayIndex: Int32, _ count: Int32)

 

void CopyTo(Int32 index, T[] array, Int32 arrayIndex, Int32 count)

 

Sub CopyTo(index As Int32, array As T(), arrayIndex As Int32, count As Int32)

Parameters:

  • index:
  • array:
  • arrayIndex:
  • count:

Equals  virtual    (declared in Object)

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

 

Function Equals(obj As Object) As Boolean

Parameters:

  • obj: the reference to compare this with.

Exists

Returns true if a predicate succeeds on an item in this list.

 

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:

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

 

Sub Finalize()

Find

Returns value for the first time a predicate succeeds on an item in this list.

 

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

Returns all values for the values a predicate succeeds on this list.

 

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

 

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

 

func FindAll(_ Match: Predicate<T>) -> List<T>

 

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

 

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

Parameters:

  • Match:

FindIndex (Int32, Int32, Predicate<T>): Int32

Returns the index of an item in this list for a given 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

 

Int32 FindIndex(Int32 StartIndex, Int32 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

Returns the index of an item in this list for a given predicate.

 

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

 

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

 

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

 

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

 

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

Parameters:

  • StartIndex:
  • Match:

FindIndex (Predicate<T>): Int32

Returns the index of an item in this list for a given predicate.

 

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

 

Int32 FindIndex(Predicate<T> Match)

 

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

 

Int32 FindIndex(Predicate<T> Match)

 

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

Parameters:

  • Match:

ForEach

Loops all items in this list, calling the action with the given value.

 

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:

GetEnumerator

Iterator for this object.

 

method GetEnumerator: IEnumerator<T>

 

IEnumerator<T> GetEnumerator()

 

func GetEnumerator() -> IEnumerator<T>

 

IEnumerator<T> GetEnumerator()

 

Function GetEnumerator() As IEnumerator<T>

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

IndexOf

Returns the index of an object.

 

method IndexOf(anItem: T): Int32

 

Int32 IndexOf(T anItem)

 

func IndexOf(_ anItem: T) -> Int32

 

Int32 IndexOf(T anItem)

 

Function IndexOf(anItem As T) As Int32

Parameters:

  • anItem:

LastIndexOf

Returns the last index of an object.

 

method LastIndexOf(anItem: T): Int32

 

Int32 LastIndexOf(T anItem)

 

func LastIndexOf(_ anItem: T) -> Int32

 

Int32 LastIndexOf(T anItem)

 

Function LastIndexOf(anItem As T) As Int32

Parameters:

  • anItem:

ToArray

Convert this list to an array.

 

method ToArray: array of T

 

T[] ToArray()

 

func ToArray() -> T...

 

T[] ToArray()

 

Function ToArray() As T()

ToNSArray iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k

Convert this list to an NSArray.

 

method ToNSArray: NSArray<T>

 

NSArray<T> ToNSArray()

 

func ToNSArray() -> NSArray<T>

 

NSArray<T> ToNSArray()

 

Function ToNSArray() As NSArray<T>

ToNSMutableArray iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k

Convert this list to an NSMutableArray.

 

method ToNSMutableArray: NSMutableArray<T>

 

NSMutableArray<T> ToNSMutableArray()

 

func ToNSMutableArray() -> NSMutableArray<T>

 

NSMutableArray<T> ToNSMutableArray()

 

Function ToNSMutableArray() As NSMutableArray<T>

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

TrueForAll

Returns true if the predicate returns true on all values 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:

Descendants