Header menu logo FSharp.Data.Adaptive

ChangeableHashMap<'Key, 'Value> Type

Changeable adaptive map that allows mutation by user-code and implements amap.

Constructors

Constructor Description

ChangeableHashMap(elements)

Full Usage: ChangeableHashMap(elements)

Parameters:
    elements : ('Key * 'Value) seq

Returns: ChangeableHashMap<'Key, 'Value>

Creates a new cmap containing all the given elements.

elements : ('Key * 'Value) seq
Returns: ChangeableHashMap<'Key, 'Value>

ChangeableHashMap(elements)

Full Usage: ChangeableHashMap(elements)

Parameters:
    elements : ('Key * 'Value) seq

Returns: ChangeableHashMap<'Key, 'Value>

Creates a new cmap containing all the given elements.

elements : ('Key * 'Value) seq
Returns: ChangeableHashMap<'Key, 'Value>

ChangeableHashMap(initial)

Full Usage: ChangeableHashMap(initial)

Parameters:
Returns: ChangeableHashMap<'Key, 'Value>

Creates a new cmap containing all the given elements.

initial : HashMap<'Key, 'Value>
Returns: ChangeableHashMap<'Key, 'Value>

ChangeableHashMap()

Full Usage: ChangeableHashMap()

Returns: ChangeableHashMap<'Key, 'Value>

Creates a new empty cmap.

Returns: ChangeableHashMap<'Key, 'Value>

Instance members

Instance member Description

this.Add

Full Usage: this.Add

Parameters:
    key : 'Key
    value : 'Value

Returns: bool

Adds the given key/value pair to the map and returns true when the map changed. (overrides existing values)

key : 'Key
value : 'Value
Returns: bool

this.Clear

Full Usage: this.Clear

Clears the map.

this.ContainsKey

Full Usage: this.ContainsKey

Parameters:
    key : 'Key

Returns: bool

True if the map contains the given key.

key : 'Key
Returns: bool

this.Count

Full Usage: this.Count

Returns: int

The number of entries currently in the map.

Returns: int

this.GetEnumerator

Full Usage: this.GetEnumerator

Returns: HashMapEnumerator<'Key, 'Value, ('Key * 'Value)>
Returns: HashMapEnumerator<'Key, 'Value, ('Key * 'Value)>

this.GetReader

Full Usage: this.GetReader

Returns: IOpReader<HashMap<'Key, 'Value>, HashMapDelta<'Key, 'Value>>

Creates an adaptive reader for the map.

Returns: IOpReader<HashMap<'Key, 'Value>, HashMapDelta<'Key, 'Value>>

this.IsEmpty

Full Usage: this.IsEmpty

Returns: bool

Is the map currently empty?

Returns: bool

this[key]

Full Usage: this[key]

Returns: 'Key

Gets or sets the value associated to key.

Returns: 'Key

this.Perform

Full Usage: this.Perform

Parameters:

Performs the given Operations on the Map.

operations : HashMapDelta<'Key, 'Value>

this.Remove

Full Usage: this.Remove

Parameters:
    key : 'Key

Returns: bool

Removes the entry for the given key and returns whether the element was deleted.

key : 'Key
Returns: bool

this.TryGetValue

Full Usage: this.TryGetValue

Parameters:
    key : 'Key

Returns: 'Value option

Returns the (optional) value associated to key.

key : 'Key
Returns: 'Value option

this.UpdateTo

Full Usage: this.UpdateTo

Parameters:
Returns: bool

Sets the current state as HashMap.

target : HashMap<'Key, 'Value>
Returns: bool

this.UpdateTo

Full Usage: this.UpdateTo

Parameters:
    target : HashMap<'Key, 'T2>
    init : 'T2 -> 'Value
    update : 'Value -> 'T2 -> 'Value

Sets the current state as HashMap applying the init function to new elements and the update function to existing ones.

target : HashMap<'Key, 'T2>
init : 'T2 -> 'Value
update : 'Value -> 'T2 -> 'Value

this.Value

Full Usage: this.Value

Gets or sets the current state as HashMap.

Type something to start searching.