Show / Hide Table of Contents

Class SimpleElement.SimpleElementList

An implementation of IList that only supports IXmlElements as the content of the list.

Inheritance
object
ArrayList
SimpleElement.SimpleElementList
Implements
IList
ICollection
IEnumerable
ICloneable
Inherited Members
ArrayList.Adapter(IList)
ArrayList.BinarySearch(int, int, object, IComparer)
ArrayList.BinarySearch(object)
ArrayList.BinarySearch(object, IComparer)
ArrayList.Clone()
ArrayList.Contains(object)
ArrayList.CopyTo(Array)
ArrayList.CopyTo(Array, int)
ArrayList.CopyTo(int, Array, int, int)
ArrayList.FixedSize(ArrayList)
ArrayList.FixedSize(IList)
ArrayList.GetEnumerator()
ArrayList.GetEnumerator(int, int)
ArrayList.GetRange(int, int)
ArrayList.IndexOf(object)
ArrayList.IndexOf(object, int)
ArrayList.IndexOf(object, int, int)
ArrayList.LastIndexOf(object)
ArrayList.LastIndexOf(object, int)
ArrayList.LastIndexOf(object, int, int)
ArrayList.ReadOnly(ArrayList)
ArrayList.ReadOnly(IList)
ArrayList.Repeat(object, int)
ArrayList.Synchronized(ArrayList)
ArrayList.Synchronized(IList)
ArrayList.ToArray()
ArrayList.ToArray(Type)
ArrayList.TrimToSize()
ArrayList.Capacity
ArrayList.Count
ArrayList.IsFixedSize
ArrayList.IsReadOnly
ArrayList.IsSynchronized
ArrayList.SyncRoot
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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
ArrayList.this[int]
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 null.

Returns
Type Description
int

The index at which the value has been added.

Overrides
ArrayList.Add(object)
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 null, but it can contain elements that are null.

Overrides
ArrayList.AddRange(ICollection)
Exceptions
Type Condition
ArgumentNullException

Collection is null.

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
ArrayList.Clear()
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
object.Equals(object)

GetHashCode()

Provide a hash value for this SimpleElementList.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A hash code for this SimpleElementList.

Overrides
object.GetHashCode()

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 null.

Overrides
ArrayList.Insert(int, object)
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 null, but it can contain elements that are null.

Overrides
ArrayList.InsertRange(int, ICollection)
Exceptions
Type Condition
ArgumentNullException

Collection is null.

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 null.

Overrides
ArrayList.Remove(object)
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
ArrayList.RemoveAt(int)
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
ArrayList.RemoveRange(int, int)
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
ArrayList.Reverse()
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
ArrayList.Reverse(int, int)
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 null, but it can contain elements that are null.

Overrides
ArrayList.SetRange(int, ICollection)
Exceptions
Type Condition
ArgumentNullException

Collection is null.

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
ArrayList.Sort()
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 null to use the IComparable implementation of each element.

Overrides
ArrayList.Sort(IComparer)
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 null to use the IComparable implementation of each element.

Overrides
ArrayList.Sort(int, int, IComparer)
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.

Implements

IList
ICollection
IEnumerable
ICloneable
In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.