Class ImmutableMultiList
Implementation of the IList interface in a read-only fashion based on a collection of arrays.
Inherited Members
Namespace: Tangosol.Util
Assembly: Coherence.dll
Syntax
public class ImmutableMultiList : IList, ICollection, IEnumerable
Constructors
ImmutableMultiList(object[][])
Construct a List containing the elements of the specified array of Object arrays.
Declaration
public ImmutableMultiList(object[][] aao)
Parameters
| Type | Name | Description |
|---|---|---|
| object[][] | aao | the array of arrays backing the MultiList |
Properties
Count
Gets the number of elements contained in the ICollection.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int | The number of elements contained in the ICollection. |
IsFixedSize
Gets a value indicating whether the IList has a fixed size.
Declaration
public bool IsFixedSize { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsReadOnly
Gets a value indicating whether the IList is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
Declaration
public bool IsSynchronized { get; }
Property Value
| Type | Description |
|---|---|
| bool | true if access to the ICollection is synchronized (thread safe); otherwise, false. |
this[int]
Gets or sets the element at the specified index.
Declaration
public object this[int i] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | i |
Property Value
| Type | Description |
|---|---|
| object | The element at the specified index. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException |
|
| NotSupportedException | The property is set and the IList is read-only. |
SyncRoot
Gets an object that can be used to synchronize access to the ICollection.
Declaration
public object SyncRoot { get; }
Property Value
| Type | Description |
|---|---|
| object | An object that can be used to synchronize access to the ICollection. |
Methods
Add(object)
Adds an item to the IList.
Declaration
public int Add(object value)
Parameters
| Type | Name | Description |
|---|---|---|
| object | value | The object to add to the IList. |
Returns
| Type | Description |
|---|---|
| int | The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection. |
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | The IList is read-only. -or- The IList has a fixed size. |
CalculateTotalLength(object[][])
Calculate the total number of element in the array of arrays.
Declaration
public static int CalculateTotalLength(object[][] aao)
Parameters
| Type | Name | Description |
|---|---|---|
| object[][] | aao | An array of arrays. |
Returns
| Type | Description |
|---|---|
| int | The total number of elements. |
Clear()
Removes all items from the IList.
Declaration
public void Clear()
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | The IList is read-only. |
Contains(object)
Determines whether the IList contains a specific value.
Declaration
public bool Contains(object value)
Parameters
| Type | Name | Description |
|---|---|---|
| object | value | The object to locate in the IList. |
Returns
| Type | Description |
|---|---|
| bool |
CopyTo(Array, int)
Copies the elements of the ICollection 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 ICollection. The Array must have zero-based indexing. |
| int | index | The zero-based index in |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentOutOfRangeException |
|
| ArgumentException |
-or- The number of elements in the source ICollection is greater than the available space from -or- The type of the source ICollection cannot be cast automatically to the type of the destination |
Equals(ICollection)
Determines whether the specified ICollection is equal to the current ICollection.
Declaration
public virtual bool Equals(ICollection that)
Parameters
| Type | Name | Description |
|---|---|---|
| ICollection | that | ICollection to compare to. |
Returns
| Type | Description |
|---|---|
| bool | true if the specified collection have the same size and contains elements |
Equals(IList)
Determines whether the specified IList is equal to the current IList.
Declaration
public virtual bool Equals(IList that)
Parameters
| Type | Name | Description |
|---|---|---|
| IList | that | IList to compare to. |
Returns
| Type | Description |
|---|---|
| bool | true if and only if the specified list contains the same elements in the same order as the current one. |
Equals(object)
Compare this IList implementation with some other Object and determine if the caller would believe this Object to be equal to the other Object.
Declaration
public override bool Equals(object that)
Parameters
| Type | Name | Description |
|---|---|---|
| object | that | Some other Object that is likely to be an ICollection or some more specific type (with its related overloaded definition of what it thinks that equals() means) |
Returns
| Type | Description |
|---|---|
| bool | true if and only if this Object believes that it can make a defensible case that this Object is equal to the passed Object. |
Overrides
Flatten(object[][], int, Array, int)
Create a single dimensional array containing all elements of the specified array of arrays.
Declaration
public static Array Flatten(object[][] aaoFrom, int cTotal, Array aoTo, int iTo)
Parameters
| Type | Name | Description |
|---|---|---|
| object[][] | aaoFrom | An array of arrays to copy from. |
| int | cTotal | The total length of the flattened array; pass -1 for it to be calculated. |
| Array | aoTo | An array to copy the elements into (optional). |
| int | iTo | The position into aoTo at which to start copying. |
Returns
| Type | Description |
|---|---|
| Array | An array containing all the elements of the array of arrays. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If the total length parameter was not sufficient to hold the flattened array. |
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()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for the current object. |
Overrides
IndexOf(object)
Determines the index of a specific item in the IList.
Declaration
public int IndexOf(object value)
Parameters
| Type | Name | Description |
|---|---|---|
| object | value | The object to locate in the IList. |
Returns
| Type | Description |
|---|---|
| int | The index of |
Insert(int, object)
Inserts an item to the IList at the specified index.
Declaration
public void Insert(int index, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based index at which |
| object | value | The object to insert into the IList. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException |
|
| NotSupportedException | The IList is read-only. -or- The IList has a fixed size. |
| NullReferenceException |
|
Remove(object)
Removes the first occurrence of a specific object from the IList.
Declaration
public void Remove(object value)
Parameters
| Type | Name | Description |
|---|---|---|
| object | value | The object to remove from the IList. |
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | The IList is read-only. -or- The IList has a fixed size. |
RemoveAt(int)
Removes the IList item at the specified index.
Declaration
public void RemoveAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based index of the item to remove. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException |
|
| NotSupportedException | The IList is read-only. -or- The IList has a fixed size. |