Dictionary<T,U>

Overview

Dictionary class that maps a given key to a value.

Location

 

constructor

Creates a new instance with a given capacity.

 

constructor withCapacity(aCapacity: Int32)

 

Dictionary<T,U> withCapacity(Int32 aCapacity)

 

init(capacity aCapacity: Int32)

 

Dictionary<T,U> withCapacity(Integer aCapacity)

 

Sub New withCapacity(aCapacity As Int32)

Parameters:

  • aCapacity:

Add (nullable ImmutableDictionary<T, U>)

Add a range of items to this dictionary.

 

method Add(aDictionary: nullable ImmutableDictionary<T, U>)

 

void Add(ImmutableDictionary<T, U>? aDictionary)

 

// Toffee
func Add(_ aDictionary: ImmutableDictionary<T, U>)
// ToffeeV2
func Add(_ aDictionary: ImmutableDictionary<T, U>?)

 

void Add(ImmutableDictionary<T, U> aDictionary)

 

Sub Add(aDictionary As ImmutableDictionary<T, U>?)

Parameters:

  • aDictionary:

Add (not nullable T, nullable U)

Add a value to this dictionary.

 

method Add(Key: not nullable T; Value: nullable U)

 

void Add(T! Key, U? Value)

 

func Add(_ Key: T, _ Value: U?)

 

void Add(T Key, U Value)

 

Sub Add(Key As T, Value As U?)

Parameters:

  • Key:
  • Value:

ContainsKey    (declared in ImmutableDictionary<T,U>)

Returns true if this key is contained in the dictionary.

 

method ContainsKey(Key: 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    (declared in ImmutableDictionary<T,U>)

Returns true if this value is contained in the dictionary.

 

method ContainsValue(Value: 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    (declared in ImmutableDictionary<T,U>)

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    (declared in ImmutableDictionary<T,U>)

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

 

method ForEach(Action: Action<RemObjects.Elements.RTL.KeyValuePair<T,U>>)

 

void ForEach(Action<RemObjects.Elements.RTL.KeyValuePair<T,U>> Action)

 

func ForEach(_ Action: Action<RemObjects.Elements.RTL.KeyValuePair<T,U>>)

 

void ForEach(Action<RemObjects.Elements.RTL.KeyValuePair<T,U>> Action)

 

Sub ForEach(Action As Action<RemObjects.Elements.RTL.KeyValuePair<T,U>>)

Parameters:

  • Action:

GetSequence    (declared in ImmutableDictionary<T,U>)

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

 

// .NET, .NET Core 6.0, .NET Standard 2.0
method GetSequence: IEnumerable<KeyValuePair<T, U>>
// Island
method GetSequence: IEnumerable<RemObjects.Elements.RTL.KeyValuePair<T,U>>

 

// .NET, .NET Core 6.0, .NET Standard 2.0
IEnumerable<KeyValuePair<T, U>> GetSequence()
// Island
IEnumerable<RemObjects.Elements.RTL.KeyValuePair<T,U>> GetSequence()

 

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

 

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

 

// .NET, .NET Core 6.0, .NET Standard 2.0
Function GetSequence() As IEnumerable<KeyValuePair<T, U>>
// Island
Function GetSequence() As IEnumerable<RemObjects.Elements.RTL.KeyValuePair<T,U>>

Item    (declared in ImmutableDictionary<T,U>)

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

 

property Item[Key: nullable T]: nullable U read;

 

U? Item[T? Key] { get; }

 

subscript Item(_ Key: T?) -> U? { get{} }

 

U Item[T Key] { __get; }

 

ReadOnly Property Item(Key As T?) As U?

Item

Gets/sets an item by key. Returns null if not in the dictionary.

 

property Item[aKey: nullable T]: nullable U read write;

 

U? Item[T? aKey] { get; set; }

 

subscript Item(_ aKey: T?) -> U? { get{} set{} }

 

U Item[T aKey] { __get; __set; }

 

Property Item(aKey As T?) As U?

Keys    (declared in ImmutableDictionary<T,U>)

Returns a keys interator.

 

property Keys: not nullable RemObjects.Elements.RTL.ImmutableList<T> read;

 

RemObjects.Elements.RTL.ImmutableList<T>! Keys { get; }

 

var Keys: RemObjects.Elements.RTL.ImmutableList<T> { get{} }

 

RemObjects.Elements.RTL.ImmutableList<T> Keys { __get; }

 

ReadOnly Property Keys() As RemObjects.Elements.RTL.ImmutableList<T>

MutableVersion    (declared in ImmutableDictionary<T,U>)

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>

Remove

Remove an item with a given key.

 

method Remove(Key: not nullable T): Boolean

 

Boolean Remove(T! Key)

 

func Remove(_ Key: T) -> Boolean

 

Boolean Remove(T Key)

 

Function Remove(Key As T) As Boolean

Parameters:

  • Key:

RemoveAll

Clears the dictionary.

 

method RemoveAll

 

void RemoveAll()

 

func RemoveAll()

 

void RemoveAll()

 

Sub RemoveAll()

Values    (declared in ImmutableDictionary<T,U>)

Iterator for all values in this dictionary.

 

property Values: not nullable IEnumerable<U> read;

 

IEnumerable<U>! Values { get; }

 

// .NET, .NET Core 6.0, .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    (declared in ImmutableDictionary<T,U>)

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    (declared in ImmutableDictionary<T,U>)

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

 

property Item[Key: nullable T]: nullable U read;

 

U? Item[T? Key] { get; }

 

subscript Item(_ Key: T?) -> U? { get{} }

 

U Item[T Key] { __get; }

 

ReadOnly Property Item(Key As T?) As U?

Item

Gets/sets an item by key. Returns null if not in the dictionary.

 

property Item[aKey: nullable T]: nullable U read write;

 

U? Item[T? aKey] { get; set; }

 

subscript Item(_ aKey: T?) -> U? { get{} set{} }

 

U Item[T aKey] { __get; __set; }

 

Property Item(aKey As T?) As U?

Keys    (declared in ImmutableDictionary<T,U>)

Returns a keys interator.

 

property Keys: not nullable RemObjects.Elements.RTL.ImmutableList<T> read;

 

RemObjects.Elements.RTL.ImmutableList<T>! Keys { get; }

 

var Keys: RemObjects.Elements.RTL.ImmutableList<T> { get{} }

 

RemObjects.Elements.RTL.ImmutableList<T> Keys { __get; }

 

ReadOnly Property Keys() As RemObjects.Elements.RTL.ImmutableList<T>

Values    (declared in ImmutableDictionary<T,U>)

Iterator for all values in this dictionary.

 

property Values: not nullable IEnumerable<U> read;

 

IEnumerable<U>! Values { get; }

 

// .NET, .NET Core 6.0, .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>

 

constructor

Creates a new instance with a given capacity.

 

constructor withCapacity(aCapacity: Int32)

 

Dictionary<T,U> withCapacity(Int32 aCapacity)

 

init(capacity aCapacity: Int32)

 

Dictionary<T,U> withCapacity(Integer aCapacity)

 

Sub New withCapacity(aCapacity As Int32)

Parameters:

  • aCapacity:

Add (nullable ImmutableDictionary<T, U>)

Add a range of items to this dictionary.

 

method Add(aDictionary: nullable ImmutableDictionary<T, U>)

 

void Add(ImmutableDictionary<T, U>? aDictionary)

 

// Toffee
func Add(_ aDictionary: ImmutableDictionary<T, U>)
// ToffeeV2
func Add(_ aDictionary: ImmutableDictionary<T, U>?)

 

void Add(ImmutableDictionary<T, U> aDictionary)

 

Sub Add(aDictionary As ImmutableDictionary<T, U>?)

Parameters:

  • aDictionary:

Add (not nullable T, nullable U)

Add a value to this dictionary.

 

method Add(Key: not nullable T; Value: nullable U)

 

void Add(T! Key, U? Value)

 

func Add(_ Key: T, _ Value: U?)

 

void Add(T Key, U Value)

 

Sub Add(Key As T, Value As U?)

Parameters:

  • Key:
  • Value:

ContainsKey    (declared in ImmutableDictionary<T,U>)

Returns true if this key is contained in the dictionary.

 

method ContainsKey(Key: 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    (declared in ImmutableDictionary<T,U>)

Returns true if this value is contained in the dictionary.

 

method ContainsValue(Value: 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    (declared in ImmutableDictionary<T,U>)

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

 

method ForEach(Action: Action<RemObjects.Elements.RTL.KeyValuePair<T,U>>)

 

void ForEach(Action<RemObjects.Elements.RTL.KeyValuePair<T,U>> Action)

 

func ForEach(_ Action: Action<RemObjects.Elements.RTL.KeyValuePair<T,U>>)

 

void ForEach(Action<RemObjects.Elements.RTL.KeyValuePair<T,U>> Action)

 

Sub ForEach(Action As Action<RemObjects.Elements.RTL.KeyValuePair<T,U>>)

Parameters:

  • Action:

GetSequence    (declared in ImmutableDictionary<T,U>)

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

 

// .NET, .NET Core 6.0, .NET Standard 2.0
method GetSequence: IEnumerable<KeyValuePair<T, U>>
// Island
method GetSequence: IEnumerable<RemObjects.Elements.RTL.KeyValuePair<T,U>>

 

// .NET, .NET Core 6.0, .NET Standard 2.0
IEnumerable<KeyValuePair<T, U>> GetSequence()
// Island
IEnumerable<RemObjects.Elements.RTL.KeyValuePair<T,U>> GetSequence()

 

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

 

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

 

// .NET, .NET Core 6.0, .NET Standard 2.0
Function GetSequence() As IEnumerable<KeyValuePair<T, U>>
// Island
Function GetSequence() As IEnumerable<RemObjects.Elements.RTL.KeyValuePair<T,U>>

MutableVersion    (declared in ImmutableDictionary<T,U>)

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>

Remove

Remove an item with a given key.

 

method Remove(Key: not nullable T): Boolean

 

Boolean Remove(T! Key)

 

func Remove(_ Key: T) -> Boolean

 

Boolean Remove(T Key)

 

Function Remove(Key As T) As Boolean

Parameters:

  • Key:

RemoveAll

Clears the dictionary.

 

method RemoveAll

 

void RemoveAll()

 

func RemoveAll()

 

void RemoveAll()

 

Sub RemoveAll()