Default implementation of the IBijectiveMap interface.
class
|
BijectiveMap
|
with
|
<TLeft>
|
||
<TRight>
|
|||||
implements
|
IBijectiveMap<TLeft, TRight>
|
The number of key/value pairs in the map.
public
virtual
property
|
Count
{
get
}
|
||
type
|
int32
|
||
value
|
|
The number of map entries. | |
implements
|
IBijectiveMapConst.Count
|
Returns a read-only set of all key/value pairs in this dictionary.
public
virtual
property
|
Entries
{
get
}
|
||
type
|
IBagConst<MapEntry<TLeft, TRight>>
|
||
value
|
|
The set of key/value pairs. | |
implements
|
IBijectiveMapConst.Entries
|
Returns a read-only set of all keys in this dictionary.
public
virtual
property
|
KeysLeft
{
get
}
|
||
type
|
IBagConst<TLeft>
|
||
value
|
|
The set of keys. | |
implements
|
IBijectiveMapConst.KeysLeft
|
Returns a read-only collection of all values in this dictionary.
public
virtual
property
|
KeysRight
{
get
}
|
||
type
|
IBagConst<TRight>
|
||
value
|
|
The collection of values. | |
implements
|
IBijectiveMapConst.KeysRight
|
Creates a new instance of BijectiveMap.
public
constructor
|
BijectiveMap
(IMap<TLeft, TRight> left,
IMap<TRight, TLeft> right)
|
||
params
|
left
|
[not-null]
|
The left-side dictionary to use. |
right
|
[not-null]
|
The right-side dictionary to use. |
Removes all key/value pairs from the map.
public
virtual
method
|
Clear
()
|
||
implements
|
IBijectiveMap.Clear
|
Returns if this map contains an entry for the given key.
public
virtual
method
|
ContainsLeft
(TLeft left)
|
||
type
|
bool
|
||
params
|
left
|
The key. | |
returns
|
true
if
the
map
contains
an
entry
for
the
key,
false
if
it
does
not.
|
||
implements
|
IBijectiveMapConst.ContainsLeft
|
Returns if this map contains an entry for the given key.
public
virtual
method
|
ContainsRight
(TRight right)
|
||
type
|
bool
|
||
params
|
right
|
The key. | |
returns
|
true
if
the
map
contains
an
entry
for
the
key,
false
if
it
does
not.
|
||
implements
|
IBijectiveMapConst.ContainsRight
|
Returns the value that is currently mapped to the given key.
public
virtual
method
|
GetLeft
(TLeft left,
TRight defaultValue)
|
||
type
|
TRight
|
||
params
|
left
|
The key. | |
defaultValue
|
The default value to return in case the map does not contain an entry for left. | ||
returns
|
The entry value. | ||
implements
|
IBijectiveMapConst.GetLeft
|
Returns the value that is currently mapped to the given key.
public
virtual
method
|
GetRight
(TRight right,
TLeft defaultValue)
|
||
type
|
TLeft
|
||
params
|
right
|
The key. | |
defaultValue
|
The default value to return in case the map does not contain an entry for right. | ||
returns
|
The entry value. | ||
implements
|
IBijectiveMapConst.GetRight
|
Maps the given value to the specified key.
public
virtual
method
|
Put
(TLeft left,
TRight right)
|
||
params
|
left
|
The left key (i.e. right value). | |
right
|
The left value (i.e. right key). | ||
returns
|
The previously mapped value. | ||
implements
|
IBijectiveMap.Put
|
Removes the mapping for the given key.
public
virtual
method
|
RemoveLeft
(TLeft left)
|
||
type
|
TRight
|
||
params
|
left
|
The key. | |
returns
|
The mapped value. | ||
implements
|
IBijectiveMap.RemoveLeft
|
Removes the mapping for the given key.
public
virtual
method
|
RemoveRight
(TRight right)
|
||
type
|
TLeft
|
||
params
|
right
|
The key. | |
returns
|
The mapped value. | ||
implements
|
IBijectiveMap.RemoveRight
|