Sharpility
|
Immutable implementation of CompositeDictionary. More...
Classes | |
class | ImmutableCompositeDictionaryBuilder |
Builder of CompositeDictionary. More... | |
Public Member Functions | |
void | Put (TPrimaryKey primaryKey, TSecondaryKey secondaryKey, TValue value) |
Puts value by primary and secondary key. | |
void | Put (CompositeKey< TPrimaryKey, TSecondaryKey > key, TValue value) |
Puts value by composite key. | |
void | PutAll (CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue > compositeDictionary) |
Puts all values from composite dictionary. | |
void | PutAll (IDictionary< TPrimaryKey, IDictionary< TSecondaryKey, TValue >> dictionary) |
Puts all values from dictionary. | |
void | Clear () |
Removes all entries. | |
bool | Remove (TPrimaryKey primaryKey, TSecondaryKey secondaryKey) |
Removes value by primary and secondary key. | |
bool | Remove (CompositeKey< TPrimaryKey, TSecondaryKey > key) |
Removes value by composite key. | |
ICollection< TValue > | RemoveByPrimaryKey (TPrimaryKey primaryKey) |
Removes all values by primary key. | |
ICollection< TValue > | RemoveBySecondaryKey (TSecondaryKey secondaryKey) |
Removes all values by secondary key. | |
TValue | Get (CompositeKey< TPrimaryKey, TSecondaryKey > key) |
Returns value for composite key. | |
TValue | Get (TPrimaryKey primaryKey, TSecondaryKey secondaryKey) |
Returns value for primary and secondary key. | |
ICollection< TValue > | PrimaryKeyValues (TPrimaryKey primaryKey) |
Returns all values for primary key. | |
ICollection< TValue > | SecondaryKeyValues (TSecondaryKey secondaryKey) |
Returns all values for secondary key. | |
ICollection< KeyValuePair < TSecondaryKey, TValue > > | PrimaryKeyEntries (TPrimaryKey primaryKey) |
Returns all entries for primary key. | |
ICollection< KeyValuePair < TPrimaryKey, TValue > > | SecondaryKeyEntries (TSecondaryKey secondaryKey) |
Returns all entries for secondary key. | |
bool | ContainsKey (TPrimaryKey primaryKey, TSecondaryKey secondaryKey) |
Checks is dictionary contains primary and secondary key. | |
bool | ContainsKey (CompositeKey< TPrimaryKey, TSecondaryKey > key) |
Checks is dictionary contains composite key. | |
bool | ContainsValue (TValue value) |
Checks is dictionary contains value. | |
bool | ContainsPrimaryKeyValue (TPrimaryKey primaryKey, TValue value) |
Checks is dictionary contains value mapped by primary key. | |
bool | ContainsSecondaryKeyValue (TSecondaryKey secondaryKey, TValue value) |
Checks is dictionary contains value mapped by secondary key. | |
bool | ContainsEntry (TPrimaryKey primaryKey, TSecondaryKey secondaryKey, TValue value) |
Checks is dictionary contains entry of primary-secondary-key, value. | |
bool | ContainsEntry (CompositeKey< TPrimaryKey, TSecondaryKey > key, TValue value) |
Checks is dictionary contains entry. | |
IDictionary< TPrimaryKey, IDictionary< TSecondaryKey, TValue > > | ToDictionary () |
Converts CompositeDictionary to regular dictionary. | |
override bool | Equals (object obj) |
override int | GetHashCode () |
override string | ToString () |
Static Public Member Functions | |
static ImmutableCompositeDictionaryBuilder < TPrimaryKey, TSecondaryKey, TValue > | Builder () |
Builder of ImmutableCompositeDictionary. | |
Properties | |
TValue | this[CompositeKey< TPrimaryKey, TSecondaryKey > key] [get] |
Returns value for composite key. | |
ICollection< TValue > | Values [get] |
Returns all values. | |
ISet< CompositeKey < TPrimaryKey, TSecondaryKey > > | Keys [get] |
Returns set of composite keys. | |
ISet< TPrimaryKey > | PrimaryKeys [get] |
Retunrs set of primary keys. | |
ISet< TSecondaryKey > | SecondaryKeys [get] |
Retunrs set of secondary keys. | |
int | Count [get] |
Returns all values count. | |
int | PrimaryKeysCount [get] |
Returns number of primary keys. | |
bool | IsEmpty [get] |
Checks if dictionary is empty. | |
ICollection< KeyValuePair < TPrimaryKey, KeyValuePair < TSecondaryKey, TValue > > > | Entries [get] |
Returns all entries. |
Immutable implementation of CompositeDictionary.
TPrimaryKey | Type of primary key |
TSecondaryKey | Type of secondary key |
TValue | Type of value |
static ImmutableCompositeDictionaryBuilder<TPrimaryKey, TSecondaryKey, TValue> Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Builder | ( | ) | [inline, static] |
Builder of ImmutableCompositeDictionary.
void Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Clear | ( | ) | [inline] |
Removes all entries.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
bool Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ContainsEntry | ( | TPrimaryKey | primaryKey, |
TSecondaryKey | secondaryKey, | ||
TValue | value | ||
) | [inline] |
Checks is dictionary contains entry of primary-secondary-key, value.
primaryKey | Primary key value |
secondaryKey | Secondary key value |
value | Checked value |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
bool Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ContainsEntry | ( | CompositeKey< TPrimaryKey, TSecondaryKey > | key, |
TValue | value | ||
) | [inline] |
Checks is dictionary contains entry.
key | Entry key |
value | Checked value |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
bool Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ContainsKey | ( | TPrimaryKey | primaryKey, |
TSecondaryKey | secondaryKey | ||
) | [inline] |
Checks is dictionary contains primary and secondary key.
primaryKey | Primary key value |
secondaryKey | Secondary key value |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
bool Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ContainsKey | ( | CompositeKey< TPrimaryKey, TSecondaryKey > | key | ) | [inline] |
Checks is dictionary contains composite key.
key | Composite key value |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
bool Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ContainsPrimaryKeyValue | ( | TPrimaryKey | primaryKey, |
TValue | value | ||
) | [inline] |
Checks is dictionary contains value mapped by primary key.
primaryKey | Primary key value |
value | Checked value |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
bool Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ContainsSecondaryKeyValue | ( | TSecondaryKey | secondaryKey, |
TValue | value | ||
) | [inline] |
Checks is dictionary contains value mapped by secondary key.
secondaryKey | Secondary key value |
value | Checked value |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
bool Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ContainsValue | ( | TValue | value | ) | [inline] |
Checks is dictionary contains value.
value | Checked value |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
TValue Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Get | ( | CompositeKey< TPrimaryKey, TSecondaryKey > | key | ) | [inline] |
Returns value for composite key.
key | Composite key of primary and secondary key |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
TValue Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Get | ( | TPrimaryKey | primaryKey, |
TSecondaryKey | secondaryKey | ||
) | [inline] |
Returns value for primary and secondary key.
primaryKey | Primary key value |
secondaryKey | Secondary key value |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
ICollection<KeyValuePair<TSecondaryKey, TValue> > Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.PrimaryKeyEntries | ( | TPrimaryKey | primaryKey | ) | [inline] |
Returns all entries for primary key.
primaryKey | Primary key value |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
ICollection<TValue> Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.PrimaryKeyValues | ( | TPrimaryKey | primaryKey | ) | [inline] |
Returns all values for primary key.
primaryKey | Primary key |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
void Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Put | ( | TPrimaryKey | primaryKey, |
TSecondaryKey | secondaryKey, | ||
TValue | value | ||
) | [inline] |
Puts value by primary and secondary key.
primaryKey | Primary key value |
secondaryKey | Secondary key value |
value | Value |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
void Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Put | ( | CompositeKey< TPrimaryKey, TSecondaryKey > | key, |
TValue | value | ||
) | [inline] |
Puts value by composite key.
key | Composite key of primary and secondary key |
value | Value |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
void Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.PutAll | ( | CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue > | compositeDictionary | ) | [inline] |
Puts all values from composite dictionary.
compositeDictionary | CompositeDictionary |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
void Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.PutAll | ( | IDictionary< TPrimaryKey, IDictionary< TSecondaryKey, TValue >> | dictionary | ) | [inline] |
Puts all values from dictionary.
dictionary | Dictionary |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
bool Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Remove | ( | TPrimaryKey | primaryKey, |
TSecondaryKey | secondaryKey | ||
) | [inline] |
Removes value by primary and secondary key.
primaryKey | Primary key value |
secondaryKey | Secondary key value |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
bool Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Remove | ( | CompositeKey< TPrimaryKey, TSecondaryKey > | key | ) | [inline] |
Removes value by composite key.
key | Composite key of primary and secondary key |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
ICollection<TValue> Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.RemoveByPrimaryKey | ( | TPrimaryKey | primaryKey | ) | [inline] |
Removes all values by primary key.
primaryKey | Primary key value |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
ICollection<TValue> Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.RemoveBySecondaryKey | ( | TSecondaryKey | secondaryKey | ) | [inline] |
Removes all values by secondary key.
secondaryKey | Secondary key value |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
ICollection<KeyValuePair<TPrimaryKey, TValue> > Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.SecondaryKeyEntries | ( | TSecondaryKey | secondaryKey | ) | [inline] |
Returns all entries for secondary key.
secondaryKey | Secondary key value |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
ICollection<TValue> Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.SecondaryKeyValues | ( | TSecondaryKey | secondaryKey | ) | [inline] |
Returns all values for secondary key.
secondaryKey | Secondary key |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
IDictionary<TPrimaryKey, IDictionary<TSecondaryKey, TValue> > Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ToDictionary | ( | ) | [inline] |
Converts CompositeDictionary to regular dictionary.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
int Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Count [get] |
Returns all values count.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
ICollection<KeyValuePair<TPrimaryKey, KeyValuePair<TSecondaryKey, TValue> > > Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Entries [get] |
Returns all entries.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
bool Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.IsEmpty [get] |
Checks if dictionary is empty.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
ISet<CompositeKey<TPrimaryKey, TSecondaryKey> > Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Keys [get] |
Returns set of composite keys.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
ISet<TPrimaryKey> Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.PrimaryKeys [get] |
Retunrs set of primary keys.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
int Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.PrimaryKeysCount [get] |
Returns number of primary keys.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
ISet<TSecondaryKey> Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.SecondaryKeys [get] |
Retunrs set of secondary keys.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
TValue Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.this[CompositeKey< TPrimaryKey, TSecondaryKey > key] [get] |
Returns value for composite key.
key | Composite key of primary and secondary key |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
ICollection<TValue> Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Values [get] |
Returns all values.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.