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)

 

Function ContainsKey(Key As T) As Boolean

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)

 

Function ContainsValue(Value As U) As Boolean

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

 

ReadOnly Property Count() As Int32

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)

 

Sub ForEach(Action As Action (Of KeyValuePair<T,U>))

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

 

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

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

 

// .NET, .NET Standard 2.0
ReadOnly Property Item(Key As T) As U?
// Island
ReadOnly Property Item(Key As T) As GenericNullable<U>?

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

 

ReadOnly Property Keys() As ImmutableList<T>

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

 

Function MutableVersion() As Dictionary<T,U>

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

 

ReadOnly Property Values() As IEnumerable<U>

 

Count

Returns the nr of items in this dictionary.

 

property Count: Int32 read;

 

Int32 Count { get; }

 

var Count: Int32 { get{} }

 

Integer Count { __get; }

 

ReadOnly Property Count() As Int32

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

 

// .NET, .NET Standard 2.0
ReadOnly Property Item(Key As T) As U?
// Island
ReadOnly Property Item(Key As T) As GenericNullable<U>?

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

 

ReadOnly Property Keys() As ImmutableList<T>

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

 

ReadOnly Property Values() As IEnumerable<U>

 

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)

 

Function ContainsKey(Key As T) As Boolean

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)

 

Function ContainsValue(Value As U) As Boolean

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)

 

Sub ForEach(Action As Action (Of KeyValuePair<T,U>))

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

 

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

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

 

Function MutableVersion() As Dictionary<T,U>

Descendants