Sharpility
|
Abstraction 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. | |
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. | |
void | Clear () |
Removes all entries. | |
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 | 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. | |
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 () |
Protected Member Functions | |
abstract IDictionary< T, TV > | CreateDictionary< T, TV > (int capacity) |
Creates dictionary with given capacity. | |
abstract IDictionary< T, TV > | CreateDictionary< T, TV > () |
Creates dictionary. | |
abstract ICollection< T > | CreateList< T > (int capacity) |
Creates list matching CompositDictionary implementatio with given capacity. | |
abstract ICollection< T > | CreateList< T > () |
Creates list matching CompositDictionary implementation. | |
abstract ISet< T > | CreateSet< T > () |
Creates set. | |
Properties | |
int | Count [get, set] |
Returns all values count. | |
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 | 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. |
Abstraction of CompositeDictionary.
TPrimaryKey | Type of primary key |
TSecondaryKey | Type of secondary key |
TValue | Type of value |
void Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Clear | ( | ) | [inline] |
Removes all entries.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
bool Sharpility.Collections.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ContainsValue | ( | TValue | value | ) | [inline] |
Checks is dictionary contains value.
value | Checked value |
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
abstract IDictionary<T, TV> Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.CreateDictionary< T, TV > | ( | int | capacity | ) | [protected, pure virtual] |
Creates dictionary with given capacity.
T | Type of key |
TV | Type of value |
capacity | Dictionary capacity |
Implemented in Sharpility.Collections.HashCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
abstract IDictionary<T, TV> Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.CreateDictionary< T, TV > | ( | ) | [protected, pure virtual] |
Creates dictionary.
T | Type of key |
TV | Type of value |
Implemented in Sharpility.Collections.HashCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
abstract ICollection<T> Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.CreateList< T > | ( | int | capacity | ) | [protected, pure virtual] |
Creates list matching CompositDictionary implementatio with given capacity.
T | Type of list item |
capacity | List capacity |
Implemented in Sharpility.Collections.HashCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
abstract ICollection<T> Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.CreateList< T > | ( | ) | [protected, pure virtual] |
Creates list matching CompositDictionary implementation.
T | Type of list item |
Implemented in Sharpility.Collections.HashCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
abstract ISet<T> Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.CreateSet< T > | ( | ) | [protected, pure virtual] |
Creates set.
T | Type of set |
Implemented in Sharpility.Collections.HashCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
TValue Sharpility.Collections.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ToDictionary | ( | ) | [inline] |
Converts CompositeDictionary to regular dictionary.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
int Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Count [get, set] |
Returns all values count.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
ICollection<KeyValuePair<TPrimaryKey, KeyValuePair<TSecondaryKey, TValue> > > Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Entries [get] |
Returns all entries.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
bool Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.IsEmpty [get] |
Checks if dictionary is empty.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
ISet<CompositeKey<TPrimaryKey, TSecondaryKey> > Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Keys [get] |
Returns set of composite keys.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
ISet<TPrimaryKey> Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.PrimaryKeys [get] |
Retunrs set of primary keys.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
int Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.PrimaryKeysCount [get] |
Returns number of primary keys.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
ISet<TSecondaryKey> Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.SecondaryKeys [get] |
Retunrs set of secondary keys.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.
TValue Sharpility.Collections.AbstractCompositeDictionary< 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.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Values [get] |
Returns all values.
Implements Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.