Sharpility
Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue > Interface Template Reference

Dictionary containing values mapped by two keys. More...

Inheritance diagram for Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >:
Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue > Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue > Sharpility.Collections.HashCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >

List of all members.

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.

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.

Detailed Description

template<TPrimaryKey, TSecondaryKey, TValue>
interface Sharpility::Collections::CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >

Dictionary containing values mapped by two keys.

Template Parameters:
TPrimaryKeyType of primary key
TSecondaryKeyType of secondary key
TValueType of dictionary value

Member Function Documentation

template<TPrimaryKey , TSecondaryKey , TValue >
bool Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ContainsEntry ( TPrimaryKey  primaryKey,
TSecondaryKey  secondaryKey,
TValue  value 
)

Checks is dictionary contains entry of primary-secondary-key, value.

Parameters:
primaryKeyPrimary key value
secondaryKeySecondary key value
valueChecked value
Returns:
true if given value is mapped by given primary and secondary key

Implemented in Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
bool Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ContainsEntry ( CompositeKey< TPrimaryKey, TSecondaryKey >  key,
TValue  value 
)

Checks is dictionary contains entry.

Parameters:
keyEntry key
valueChecked value
Returns:
true if given value is mapped by given key

Implemented in Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
bool Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ContainsKey ( TPrimaryKey  primaryKey,
TSecondaryKey  secondaryKey 
)

Checks is dictionary contains primary and secondary key.

Parameters:
primaryKeyPrimary key value
secondaryKeySecondary key value
Returns:
true if dictionary contains primary and secondary key

Implemented in Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
bool Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ContainsKey ( CompositeKey< TPrimaryKey, TSecondaryKey >  key)

Checks is dictionary contains composite key.

Parameters:
keyComposite key value
Returns:
true if dictionary contains primary and secondary key

Implemented in Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
bool Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ContainsPrimaryKeyValue ( TPrimaryKey  primaryKey,
TValue  value 
)

Checks is dictionary contains value mapped by primary key.

Parameters:
primaryKeyPrimary key value
valueChecked value
Returns:
true if dictionary contains value for given primary key

Implemented in Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
bool Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ContainsSecondaryKeyValue ( TSecondaryKey  secondaryKey,
TValue  value 
)

Checks is dictionary contains value mapped by secondary key.

Parameters:
secondaryKeySecondary key value
valueChecked value
Returns:
true if dictionary contains value for given secondary key

Implemented in Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
bool Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ContainsValue ( TValue  value)

Checks is dictionary contains value.

Parameters:
valueChecked value
Returns:
true if dictionary contains given value

Implemented in Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
TValue Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Get ( CompositeKey< TPrimaryKey, TSecondaryKey >  key)

Returns value for composite key.

Parameters:
keyComposite key of primary and secondary key
Returns:
Value

Implemented in Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
TValue Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Get ( TPrimaryKey  primaryKey,
TSecondaryKey  secondaryKey 
)

Returns value for primary and secondary key.

Parameters:
primaryKeyPrimary key value
secondaryKeySecondary key value
Returns:
Value

Implemented in Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
ICollection<KeyValuePair<TSecondaryKey, TValue> > Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.PrimaryKeyEntries ( TPrimaryKey  primaryKey)

Returns all entries for primary key.

Parameters:
primaryKeyPrimary key value
Returns:
Primary key entries

Implemented in Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
ICollection<TValue> Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.PrimaryKeyValues ( TPrimaryKey  primaryKey)
template<TPrimaryKey , TSecondaryKey , TValue >
void Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Put ( TPrimaryKey  primaryKey,
TSecondaryKey  secondaryKey,
TValue  value 
)

Puts value by primary and secondary key.

Parameters:
primaryKeyPrimary key value
secondaryKeySecondary key value
valueValue

Implemented in Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
void Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Put ( CompositeKey< TPrimaryKey, TSecondaryKey >  key,
TValue  value 
)

Puts value by composite key.

Parameters:
keyComposite key of primary and secondary key
valueValue

Implemented in Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
void Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.PutAll ( CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >  compositeDictionary)
template<TPrimaryKey , TSecondaryKey , TValue >
void Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.PutAll ( IDictionary< TPrimaryKey, IDictionary< TSecondaryKey, TValue >>  dictionary)
template<TPrimaryKey , TSecondaryKey , TValue >
bool Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Remove ( TPrimaryKey  primaryKey,
TSecondaryKey  secondaryKey 
)

Removes value by primary and secondary key.

Parameters:
primaryKeyPrimary key value
secondaryKeySecondary key value
Returns:
true if value was removed

Implemented in Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
bool Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Remove ( CompositeKey< TPrimaryKey, TSecondaryKey >  key)

Removes value by composite key.

Parameters:
keyComposite key of primary and secondary key
Returns:
true if value was removed

Implemented in Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
ICollection<TValue> Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.RemoveByPrimaryKey ( TPrimaryKey  primaryKey)

Removes all values by primary key.

Parameters:
primaryKeyPrimary key value
Returns:
Removed values

Implemented in Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
ICollection<TValue> Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.RemoveBySecondaryKey ( TSecondaryKey  secondaryKey)

Removes all values by secondary key.

Parameters:
secondaryKeySecondary key value
Returns:
Removed values

Implemented in Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
ICollection<KeyValuePair<TPrimaryKey, TValue> > Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.SecondaryKeyEntries ( TSecondaryKey  secondaryKey)

Returns all entries for secondary key.

Parameters:
secondaryKeySecondary key value
Returns:
Secondary key entries

Implemented in Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
ICollection<TValue> Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.SecondaryKeyValues ( TSecondaryKey  secondaryKey)
template<TPrimaryKey , TSecondaryKey , TValue >
IDictionary<TPrimaryKey, IDictionary<TSecondaryKey, TValue> > Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.ToDictionary ( )

Property Documentation

template<TPrimaryKey , TSecondaryKey , TValue >
ICollection<KeyValuePair<TPrimaryKey, KeyValuePair<TSecondaryKey, TValue> > > Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Entries [get]
template<TPrimaryKey , TSecondaryKey , TValue >
bool Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.IsEmpty [get]
template<TPrimaryKey , TSecondaryKey , TValue >
ISet<CompositeKey<TPrimaryKey, TSecondaryKey> > Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Keys [get]
template<TPrimaryKey , TSecondaryKey , TValue >
ISet<TPrimaryKey> Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.PrimaryKeys [get]
template<TPrimaryKey , TSecondaryKey , TValue >
ISet<TSecondaryKey> Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.SecondaryKeys [get]
template<TPrimaryKey , TSecondaryKey , TValue >
TValue Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.this[CompositeKey< TPrimaryKey, TSecondaryKey > key] [get]

Returns value for composite key.

Parameters:
keyComposite key of primary and secondary key
Returns:
Value

Implemented in Sharpility.Collections.ImmutableCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >, and Sharpility.Collections.AbstractCompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.

template<TPrimaryKey , TSecondaryKey , TValue >
ICollection<TValue> Sharpility.Collections.CompositeDictionary< TPrimaryKey, TSecondaryKey, TValue >.Values [get]

The documentation for this interface was generated from the following file:
 All Classes Namespaces Functions Enumerations Properties