Header menu logo fantomas

AgedLookup<'Token, 'Key, 'Value> Type

 Simple aging lookup table. When a member is accessed it's
 moved to the top of the list and when there are too many elements
 the least-recently-accessed element falls of the end.

  - areSimilar: Keep at most once association for two similar keys (as given by areSimilar)

Constructors

Constructor Description

AgedLookup(keepStrongly, areSimilar, ?requiredToKeep, ?keepMax)

Full Usage: AgedLookup(keepStrongly, areSimilar, ?requiredToKeep, ?keepMax)

Parameters:
    keepStrongly : int
    areSimilar : 'Key * 'Key -> bool
    ?requiredToKeep : 'Value -> bool
    ?keepMax : int

Returns: AgedLookup<'Token, 'Key, 'Value>
keepStrongly : int
areSimilar : 'Key * 'Key -> bool
?requiredToKeep : 'Value -> bool
?keepMax : int
Returns: AgedLookup<'Token, 'Key, 'Value>

Instance members

Instance member Description

this.Clear

Full Usage: this.Clear

Parameters:
    arg0 : 'Token

Remove all elements.

arg0 : 'Token

this.Put

Full Usage: this.Put

Parameters:
    arg0 : 'Token
    arg1 : 'Key
    arg2 : 'Value

Add an element to the collection. Make it the most recent.

arg0 : 'Token
arg1 : 'Key
arg2 : 'Value

this.Remove

Full Usage: this.Remove

Parameters:
    arg0 : 'Token
    key : 'Key

Remove the given value from the collection.

arg0 : 'Token
key : 'Key

this.Resize

Full Usage: this.Resize

Parameters:
    arg0 : 'Token
    newKeepStrongly : int
    ?newKeepMax : int

Resize

arg0 : 'Token
newKeepStrongly : int
?newKeepMax : int

this.TryGet

Full Usage: this.TryGet

Parameters:
    arg0 : 'Token
    key : 'Key

Returns: 'Value option

Lookup a value and make it the most recent. Return None if it wasn't there.

arg0 : 'Token
key : 'Key
Returns: 'Value option

this.TryGetKeyValue

Full Usage: this.TryGetKeyValue

Parameters:
    arg0 : 'Token
    key : 'Key

Returns: ('Key * 'Value) option

Lookup a value and make it the most recent. Returns the original key value because the areSame function may have unified two different keys.

arg0 : 'Token
key : 'Key
Returns: ('Key * 'Value) option

this.TryPeekKeyValue

Full Usage: this.TryPeekKeyValue

Parameters:
    arg0 : 'Token
    key : 'Key

Returns: ('Key * 'Value) option

Lookup the value without making it the most recent. Returns the original key value because the areSame function may have unified two different keys.

arg0 : 'Token
key : 'Key
Returns: ('Key * 'Value) option

Type something to start searching.