Class MapOfSets<TKey, TValue>
Helper class for keeping Lists of Objects associated with keys. WARNING: this CLASS IS NOT THREAD SAFE
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Inheritance
Inherited Members
Namespace: Lucene.Net.Util
Assembly: Lucene.Net.dll
Syntax
public class MapOfSets<TKey, TValue>
Type Parameters
Name | Description |
---|---|
TKey | |
TValue |
Constructors
| Improve this Doc View SourceMapOfSets(IDictionary<TKey, ISet<TValue>>)
Declaration
public MapOfSets(IDictionary<TKey, ISet<TValue>> m)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<TKey, System.Collections.Generic.ISet<TValue>> | m | The backing store for this object. |
Properties
| Improve this Doc View SourceMap
Declaration
public virtual IDictionary<TKey, ISet<TValue>> Map { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<TKey, System.Collections.Generic.ISet<TValue>> | Direct access to the map backing this object. |
Methods
| Improve this Doc View SourcePut(TKey, TValue)
Adds val
to the System.Collections.Generic.ISet<T> associated with key in the System.Collections.Generic.IDictionary<TKey, TValue>.
If key
is not
already in the map, a new System.Collections.Generic.ISet<T> will first be created.
Declaration
public virtual int Put(TKey key, TValue val)
Parameters
Type | Name | Description |
---|---|---|
TKey | key | |
TValue | val |
Returns
Type | Description |
---|---|
System.Int32 | The size of the System.Collections.Generic.ISet<T> associated with key once val is added to it. |
PutAll(TKey, IEnumerable<TValue>)
Adds multiple vals
to the System.Collections.Generic.ISet<T> associated with key in the System.Collections.Generic.IDictionary<TKey, TValue>.
If key
is not
already in the map, a new System.Collections.Generic.ISet<T> will first be created.
Declaration
public virtual int PutAll(TKey key, IEnumerable<TValue> vals)
Parameters
Type | Name | Description |
---|---|---|
TKey | key | |
System.Collections.Generic.IEnumerable<TValue> | vals |
Returns
Type | Description |
---|---|
System.Int32 | The size of the System.Collections.Generic.ISet<T> associated with key once val is added to it. |