Class SimpleElement.SimpleElementList
An implementation of IList that only supports IXmlElements as the content of the list.
Inherited Members
Namespace: Tangosol.Run.Xml
Assembly: Coherence.dll
Syntax
protected class SimpleElement.SimpleElementList : ArrayList, IList, ICollection, IEnumerable, ICloneable
Constructors
SimpleElementList(SimpleElement)
Construct an empty SimpleElementList with specified parent SimpleElement.
Declaration
public SimpleElementList(SimpleElement parent)
Parameters
Type | Name | Description |
---|---|---|
SimpleElement | parent | Parent SimpleElement. |
Properties
this[int]
Gets or sets the element at the specified index.
Declaration
public override object this[int index] { set; }
Parameters
Type | Name | Description |
---|---|---|
int | index | The zero-based index of the element to get or set. |
Property Value
Type | Description |
---|---|
object | The element at the specified index. |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Index is less than zero or greater than Count. |
InvalidOperationException | Parent SimpleElement is not mutable. |
Parent
Parent SimpleElement.
Declaration
public virtual SimpleElement Parent { get; }
Property Value
Type | Description |
---|---|
SimpleElement |
Methods
Add(object)
Adds an object to the end of the ArrayList.
Declaration
public override int Add(object value)
Parameters
Type | Name | Description |
---|---|---|
object | value | The object to be added to the end of the ArrayList. The value
can be |
Returns
Type | Description |
---|---|
int | The index at which the value has been added. |
Overrides
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Parent SimpleElement is not mutable. |
AddRange(ICollection)
Adds the elements of an ICollection to the end of the ArrayList.
Declaration
public override void AddRange(ICollection c)
Parameters
Type | Name | Description |
---|---|---|
ICollection | c | The ICollection whose elements should be added to the
end of the ArrayList. The collection itself cannot be
|
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Collection is |
InvalidOperationException | Parent SimpleElement is not mutable. |
CheckElement(IXmlElement)
Validates the passed IXmlElement, copying the element into a new valid element if necessary.
Declaration
protected virtual IXmlElement CheckElement(IXmlElement element)
Parameters
Type | Name | Description |
---|---|---|
IXmlElement | element | The element to validate. |
Returns
Type | Description |
---|---|
IXmlElement | The new valid element. |
CheckMutable()
Validates that the parent element is mutable, otherwise throws an InvalidOperationException.
Declaration
protected virtual void CheckMutable()
Exceptions
Type | Condition |
---|---|
InvalidOperationException |
Clear()
Removes all elements from the ArrayList.
Declaration
public override void Clear()
Overrides
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Parent SimpleElement is not mutable. |
Equals(object)
Compare this list with another for equality.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The list to compare to. |
Returns
Type | Description |
---|---|
bool | true if the lists are equal, false otherwise. |
Overrides
GetHashCode()
Provide a hash value for this SimpleElementList.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for this SimpleElementList. |
Overrides
Insert(int, object)
Inserts an element into the ArrayList at the specified index.
Declaration
public override void Insert(int index, object value)
Parameters
Type | Name | Description |
---|---|---|
int | index | The zero-based index at which value should be inserted. |
object | value | The object to insert. The value can be |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Index is less than zero or greater than Count. |
InvalidOperationException | Parent SimpleElement is not mutable. |
InsertRange(int, ICollection)
Inserts the elements of a collection into the ArrayList at the specified index.
Declaration
public override void InsertRange(int index, ICollection c)
Parameters
Type | Name | Description |
---|---|---|
int | index | The zero-based index at which the new elements should be inserted. |
ICollection | c | The ICollection whose elements should be inserted
into the ArrayList. The collection itself cannot be
|
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Collection is |
ArgumentOutOfRangeException | Index is less than zero or greater than Count. |
InvalidOperationException | Parent SimpleElement is not mutable. |
Remove(object)
Removes the first occurrence of a specific object from the ArrayList.
Declaration
public override void Remove(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to remove from the ArrayList. The value can be
|
Overrides
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Parent SimpleElement is not mutable. |
RemoveAt(int)
Removes the element at the specified index of the ArrayList.
Declaration
public override void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The zero-based index of the element to remove. |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Index is less than zero or greater than Count. |
InvalidOperationException | Parent SimpleElement is not mutable. |
RemoveRange(int, int)
Removes a range of elements from the ArrayList.
Declaration
public override void RemoveRange(int index, int count)
Parameters
Type | Name | Description |
---|---|---|
int | index | The zero-based starting index of the range of elements to remove. |
int | count | The number of elements to remove. |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Index is less than zero or greater than Count. |
ArgumentException | Index and count do not denote a valid range of elements in the ArrayList. |
InvalidOperationException | Parent SimpleElement is not mutable. |
Reverse()
Reverses the order of the elements in the entire ArrayList.
Declaration
public override void Reverse()
Overrides
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Parent SimpleElement is not mutable. |
Reverse(int, int)
Reverses the order of the elements in the specified range.
Declaration
public override void Reverse(int index, int count)
Parameters
Type | Name | Description |
---|---|---|
int | index | The zero-based starting index of the range to reverse. |
int | count | The number of elements in the range to reverse. |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Index is less than zero or count is less than zero. |
ArgumentException | Index and count do not denote a valid range of elements in the ArrayList. |
InvalidOperationException | Parent SimpleElement is not mutable. |
SetRange(int, ICollection)
Copies the elements of a collection over a range of elements in the ArrayList.
Declaration
public override void SetRange(int index, ICollection c)
Parameters
Type | Name | Description |
---|---|---|
int | index | The zero-based ArrayList index at which to start copying the elements of c. |
ICollection | c | The ICollection whose elements to copy to the
ArrayList. The collection itself cannot be |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Collection is |
ArgumentOutOfRangeException | Index is less than zero or greater than Count. |
InvalidOperationException | Parent SimpleElement is not mutable. |
Sort()
Sorts the elements in the entire ArrayList using the IComparable implementation of each element.
Declaration
public override void Sort()
Overrides
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Parent SimpleElement is not mutable. |
Sort(IComparer)
Sorts the elements in the entire ArrayList using the specified comparer.
Declaration
public override void Sort(IComparer comparer)
Parameters
Type | Name | Description |
---|---|---|
IComparer | comparer | The IComparer implementation to use when comparing
elements or |
Overrides
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Parent SimpleElement is not mutable. |
Sort(int, int, IComparer)
Sorts the elements in a range of elements in ArrayList using the specified comparer.
Declaration
public override void Sort(int index, int count, IComparer comparer)
Parameters
Type | Name | Description |
---|---|---|
int | index | The zero-based starting index of the range to sort. |
int | count | The length of the range to sort. |
IComparer | comparer | The IComparer implementation to use when comparing
elements or |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Index is less than zero or count is less than zero. |
ArgumentException | Index and count do not denote a valid range of elements in the ArrayList. |
InvalidOperationException | Parent SimpleElement is not mutable. |