ImmutableDictionary<T,U>

Overview

Dictionary class that maps a given key to a value. Readonly version.

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.Dictionary<T,U>  .NET, .NET Standard 2.0
    • java.util.HashMap<T,U>  Cooper
    • RemObjects.Elements.System.ImmutableDictionary<T,U>  Island
    • Foundation.NSDictionary<T,U>  Toffee, ToffeeV2

Descendants

Implements

 

ContainsKey

Returns true if this key is contained in the dictionary.

 

method ContainsKey(Key: not nullable T): Boolean

 

Boolean ContainsKey(T! Key)

 

func ContainsKey(_ Key: T) -> Boolean

 

Boolean ContainsKey(T! Key)

Parameters:

  • Key:

ContainsValue

Returns true if this value is contained in the dictionary.

 

method ContainsValue(Value: not nullable U): Boolean

 

Boolean ContainsValue(U! Value)

 

func ContainsValue(_ Value: U) -> Boolean

 

Boolean ContainsValue(U! Value)

Parameters:

  • Value:

Count

Returns the nr of items in this dictionary.

 

property Count: Int32 read;

 

Int32 Count { get; }

 

var Count: Int32 { get{} }

 

Integer Count { __get; }

ForEach

Iterate all items in this list and trigger the callback for it.

 

method ForEach(Action: Action<KeyValuePair<T, U>>)

 

void ForEach(Action<KeyValuePair<T, U>> Action)

 

func ForEach(_ Action: Action<KeyValuePair<T, U>>)

 

void ForEach(Action1<KeyValuePair<T, U>> Action)

Parameters:

  • Action:

GetSequence

Returns an iterator for this dictionary, while iterating changes in the dictionary will cause an exception in the iterator.

 

method GetSequence: IEnumerable<KeyValuePair<T,U>>

 

IEnumerable<KeyValuePair<T,U>> GetSequence()

 

// Toffee
func GetSequence() -> INSFastEnumeration<KeyValuePair<T,U>>
// ToffeeV2
func GetSequence() -> IEnumerable<KeyValuePair<T,U>>

 

Iterable<KeyValuePair<T,U>> GetSequence()

Item

Get an item by it's key, or null if it's not present.

 

// .NET, .NET Standard 2.0
property Item[Key: not nullable T]: nullable U read;
// Island
property Item[Key: not nullable T]: nullable GenericNullable<U> read;

 

// .NET, .NET Standard 2.0
U? Item[T! Key] { get; }
// Island
GenericNullable<U>? Item[T! Key] { get; }

 

// .NET, .NET Standard 2.0, Toffee, ToffeeV2
subscript Item(_ Key: T) -> U? { get{} }
// Island
subscript Item(_ Key: T) -> GenericNullable<U>? { get{} }

 

U? Item[T! Key] { __get; }

Keys

Returns a keys interator.

 

property Keys: not nullable ImmutableList<T> read;

 

ImmutableList<T>! Keys { get; }

 

var Keys: ImmutableList<T> { get{} }

 

ImmutableList<T>! Keys { __get; }

MutableVersion

creates a copy and returns this as a mutable version.

 

method MutableVersion: not nullable Dictionary<T,U>

 

Dictionary<T,U>! MutableVersion()

 

func MutableVersion() -> Dictionary<T,U>

 

Dictionary<T,U>! MutableVersion()

Values

Iterator for all values in this dictionary.

 

property Values: not nullable IEnumerable<U> read;

 

IEnumerable<U>! Values { get; }

 

// .NET, .NET Standard 2.0, Island, ToffeeV2
var Values: IEnumerable<U> { get{} }
// Toffee
var Values: INSFastEnumeration<U> { get{} }

 

Iterable<U>! Values { __get; }

 

Count

Returns the nr of items in this dictionary.

 

property Count: Int32 read;

 

Int32 Count { get; }

 

var Count: Int32 { get{} }

 

Integer Count { __get; }

Item

Get an item by it's key, or null if it's not present.

 

// .NET, .NET Standard 2.0
property Item[Key: not nullable T]: nullable U read;
// Island
property Item[Key: not nullable T]: nullable GenericNullable<U> read;

 

// .NET, .NET Standard 2.0
U? Item[T! Key] { get; }
// Island
GenericNullable<U>? Item[T! Key] { get; }

 

// .NET, .NET Standard 2.0, Toffee, ToffeeV2
subscript Item(_ Key: T) -> U? { get{} }
// Island
subscript Item(_ Key: T) -> GenericNullable<U>? { get{} }

 

U? Item[T! Key] { __get; }

Keys

Returns a keys interator.

 

property Keys: not nullable ImmutableList<T> read;

 

ImmutableList<T>! Keys { get; }

 

var Keys: ImmutableList<T> { get{} }

 

ImmutableList<T>! Keys { __get; }

Values

Iterator for all values in this dictionary.

 

property Values: not nullable IEnumerable<U> read;

 

IEnumerable<U>! Values { get; }

 

// .NET, .NET Standard 2.0, Island, ToffeeV2
var Values: IEnumerable<U> { get{} }
// Toffee
var Values: INSFastEnumeration<U> { get{} }

 

Iterable<U>! Values { __get; }

 

ContainsKey

Returns true if this key is contained in the dictionary.

 

method ContainsKey(Key: not nullable T): Boolean

 

Boolean ContainsKey(T! Key)

 

func ContainsKey(_ Key: T) -> Boolean

 

Boolean ContainsKey(T! Key)

Parameters:

  • Key:

ContainsValue

Returns true if this value is contained in the dictionary.

 

method ContainsValue(Value: not nullable U): Boolean

 

Boolean ContainsValue(U! Value)

 

func ContainsValue(_ Value: U) -> Boolean

 

Boolean ContainsValue(U! Value)

Parameters:

  • Value:

ForEach

Iterate all items in this list and trigger the callback for it.

 

method ForEach(Action: Action<KeyValuePair<T, U>>)

 

void ForEach(Action<KeyValuePair<T, U>> Action)

 

func ForEach(_ Action: Action<KeyValuePair<T, U>>)

 

void ForEach(Action1<KeyValuePair<T, U>> Action)

Parameters:

  • Action:

GetSequence

Returns an iterator for this dictionary, while iterating changes in the dictionary will cause an exception in the iterator.

 

method GetSequence: IEnumerable<KeyValuePair<T,U>>

 

IEnumerable<KeyValuePair<T,U>> GetSequence()

 

// Toffee
func GetSequence() -> INSFastEnumeration<KeyValuePair<T,U>>
// ToffeeV2
func GetSequence() -> IEnumerable<KeyValuePair<T,U>>

 

Iterable<KeyValuePair<T,U>> GetSequence()

MutableVersion

creates a copy and returns this as a mutable version.

 

method MutableVersion: not nullable Dictionary<T,U>

 

Dictionary<T,U>! MutableVersion()

 

func MutableVersion() -> Dictionary<T,U>

 

Dictionary<T,U>! MutableVersion()

Descendants