Class NullImplementation.NullDictionary
A dictionary that contains nothing and does nothing.
Inherited Members
Namespace: Tangosol.Util
Assembly: Coherence.dll
Syntax
public class NullImplementation.NullDictionary : NullImplementation.NullCollection, IPortableObject, IDictionary, ICollection, IEnumerable
Fields
Instance
Since the dictionary contains no information, only one ever has to exist.
Declaration
public static readonly IDictionary Instance
Field Value
Type | Description |
---|---|
IDictionary |
Properties
IsFixedSize
Gets a value indicating whether the dictionary object has a fixed size.
Declaration
public bool IsFixedSize { get; }
Property Value
Type | Description |
---|---|
bool | true if the dictionary object has a fixed size; otherwise, false. |
IsReadOnly
Gets a value indicating whether the dictionary object is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
bool | true if the dictionary object is read-only; otherwise, false. |
this[object]
Gets or sets the element with the specified key.
Declaration
public object this[object key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
object | key | The key of the element to get or set. |
Property Value
Type | Description |
---|---|
object | The element with the specified key. |
Keys
Gets an ICollection object containing the keys of the dictionary.
Declaration
public ICollection Keys { get; }
Property Value
Type | Description |
---|---|
ICollection | An ICollection object containing the keys of the dictionary. |
Values
Gets an ICollection object containing the values in the dictionary.
Declaration
public ICollection Values { get; }
Property Value
Type | Description |
---|---|
ICollection | An ICollection object containing the values in the dictionary. |
Methods
Add(object, object)
Adds an element with the provided key and value to the dictionary.
Declaration
public void Add(object key, object value)
Parameters
Type | Name | Description |
---|---|---|
object | key | The object to use as the key of the element to add. |
object | value | The object to use as the value of the element to add. |
Clear()
Removes all elements from the dictionary.
Declaration
public void Clear()
Contains(object)
Determines whether the dictionary object contains an element with the specified key.
Declaration
public bool Contains(object key)
Parameters
Type | Name | Description |
---|---|---|
object | key | The key to locate in the dictionary. |
Returns
Type | Description |
---|---|
bool | true if the dictionary contains an element with the key; otherwise, false. |
Equals(object)
Compares this object with another object for equality.
Declaration
public override bool Equals(object o)
Parameters
Type | Name | Description |
---|---|---|
object | o | An object reference or |
Returns
Type | Description |
---|---|
bool | true if the passed object reference is of the same class and has the same state as this object. |
Overrides
GetHashCode()
Returns a hash code value for this object.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code value for this object. |
Overrides
Remove(object)
Removes the element with the specified key from the dictionary.
Declaration
public void Remove(object key)
Parameters
Type | Name | Description |
---|---|---|
object | key | The key of the element to remove. |