Class NullImplementation.NullCollection
An immutable collection which contains nothing.
Inheritance
Inherited Members
Namespace: Tangosol.Util
Assembly: Coherence.dll
Syntax
public class NullImplementation.NullCollection : ICollection, IEnumerable, IPortableObject
Fields
EMPTY_ENUMERATOR
Since the collection contains no information, only one enumerator has to exist.
Declaration
protected static readonly IEnumerator EMPTY_ENUMERATOR
Field Value
Type | Description |
---|---|
IEnumerator |
Instance
Since the collection contains no information, only one ever has to exist.
Declaration
public static readonly ICollection Instance
Field Value
Type | Description |
---|---|
ICollection |
Properties
Count
Gets the number of elements contained in the collection.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int | The number of elements contained in the collection. |
IsSynchronized
Gets a value indicating whether access to the collection is synchronized (thread safe).
Declaration
public bool IsSynchronized { get; }
Property Value
Type | Description |
---|---|
bool | true if access to the collection is synchronized (thread safe); otherwise, false. |
SyncRoot
Gets an object that can be used to synchronize access to the collection.
Declaration
public object SyncRoot { get; }
Property Value
Type | Description |
---|---|
object | An object that can be used to synchronize access to the collection. |
Methods
CopyTo(Array, int)
Copies the elements of the collection to an Array, starting at a particular array index.
Declaration
public void CopyTo(Array array, int index)
Parameters
Type | Name | Description |
---|---|---|
Array | array | The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. |
int | index | The zero-based index in array at which copying begins. |
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
GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
public IEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator | An IEnumerator object that can be used to iterate through the collection. |
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
ReadExternal(IPofReader)
Restore the contents of a user type instance by reading its state using the specified IPofReader object.
Declaration
public void ReadExternal(IPofReader reader)
Parameters
Type | Name | Description |
---|---|---|
IPofReader | reader | The IPofReader from which to read the object's state. |
Exceptions
Type | Condition |
---|---|
IOException | If an I/O error occurs. |
WriteExternal(IPofWriter)
Save the contents of a POF user type instance by writing its state using the specified IPofWriter object.
Declaration
public void WriteExternal(IPofWriter writer)
Parameters
Type | Name | Description |
---|---|---|
IPofWriter | writer | The IPofWriter to which to write the object's state. |
Exceptions
Type | Condition |
---|---|
IOException | If an I/O error occurs. |