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

Capacity

Returns the capacity of this list.

 

property Capacity: Int32 read;

 

Int32 Capacity { get; }

 

var Capacity: Int32 { get{} }

 

Int32 Capacity { __get; }

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)

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)

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)

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)

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

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)

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)

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

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)

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)

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)

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)

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)

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)

Parameters:

  • Action:

GetEnumerator

Iterator for this object.

 

method GetEnumerator: IEnumerator<T>

 

IEnumerator<T> GetEnumerator()

 

func GetEnumerator() -> IEnumerator<T>

 

IEnumerator<T> GetEnumerator()

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

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

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)

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

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)

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)

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

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

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

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

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)

Parameters:

  • Match:

 

Capacity

Returns the capacity of this list.

 

property Capacity: Int32 read;

 

Int32 Capacity { get; }

 

var Capacity: Int32 { get{} }

 

Int32 Capacity { __get; }

Count  virtual

returns the number of elements in this list.

 

property Count: Int32 read;

 

Int32 Count { get; }

 

var Count: Int32 { get{} }

 

Int32 Count { __get; }

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

 

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)

Parameters:

  • a: left value
  • b: right value

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

ImmutableList<T>()

 

init()

 

ImmutableList<T>()

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)

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)

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)

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)

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)

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)

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

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)

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)

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)

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)

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)

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)

Parameters:

  • Action:

GetEnumerator

Iterator for this object.

 

method GetEnumerator: IEnumerator<T>

 

IEnumerator<T> GetEnumerator()

 

func GetEnumerator() -> IEnumerator<T>

 

IEnumerator<T> GetEnumerator()

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

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

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)

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)

Parameters:

  • anItem:

ToArray

Convert this list to an array.

 

method ToArray: array of T

 

T[] ToArray()

 

func ToArray() -> T...

 

T[] ToArray()

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

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

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

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)

Parameters:

  • Match:

Descendants