Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.run.xml
Class SimpleElement.ElementList

java.lang.Object
  extended by java.util.AbstractCollection
      extended by java.util.AbstractList
          extended by java.util.ArrayList
              extended by com.tangosol.run.xml.SimpleElement.ElementList

All Implemented Interfaces:
ExternalizableLite, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess
Enclosing class:
SimpleElement

protected class SimpleElement.ElementList
extends java.util.ArrayList
implements ExternalizableLite

An implementation of List that only supports XmlElements as the content of the List.


Field Summary

 

Fields inherited from class java.util.AbstractList
modCount

 

Constructor Summary
protected SimpleElement.ElementList()
           

 

Method Summary
 void add(int index, java.lang.Object element)
          Inserts the specified element at the specified position in this list.
 boolean add(java.lang.Object o)
          Appends the specified element to the end of this list.
 boolean addAll(java.util.Collection c)
          Overrides the ArrayList implementation to force this throw the single object add() method.
 boolean addAll(int index, java.util.Collection c)
          Overrides the ArrayList implementation to force this throw the single object add() method.
protected  XmlElement checkElement(XmlElement element)
          Validates the passed XmlElement, copying the element into a new valid element if necessary.
 void clear()
          Removes all of the elements from this list.
 void readExternal(java.io.DataInput in)
          Restore the contents of this object by loading the object's state from the passed DataInput object.
 java.lang.Object remove(int index)
          Removes the element at the specified position in this list.
 java.lang.Object set(int index, java.lang.Object element)
          Replaces the element at the specified position in this list with the specified element.
 void writeExternal(java.io.DataOutput out)
          Save the contents of this object by storing the object's state into the passed DataOutput object.

 

Methods inherited from class java.util.ArrayList
clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, size, toArray, toArray, trimToSize

 

Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList

 

Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString

 

Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList

 

Constructor Detail

SimpleElement.ElementList

protected SimpleElement.ElementList()

Method Detail

set

public java.lang.Object set(int index,
                            java.lang.Object element)
Replaces the element at the specified position in this list with the specified element.
Specified by:
set in interface java.util.List
Overrides:
set in class java.util.ArrayList
Parameters:
index - index of element to replace.
element - element to be stored at the specified position.
Returns:
the element previously at the specified position.
Throws:
java.lang.IndexOutOfBoundsException - if index out of range (index < 0 || index >= size()).

add

public boolean add(java.lang.Object o)
Appends the specified element to the end of this list.
Specified by:
add in interface java.util.Collection
Specified by:
add in interface java.util.List
Overrides:
add in class java.util.ArrayList
Parameters:
o - element to be appended to this list.
Returns:
true (as per the general contract of Collection.add).

add

public void add(int index,
                java.lang.Object element)
Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
Specified by:
add in interface java.util.List
Overrides:
add in class java.util.ArrayList
Parameters:
index - index at which the specified element is to be inserted.
element - element to be inserted.
Throws:
java.lang.IndexOutOfBoundsException - if index is out of range (index < 0 || index > size()).

remove

public java.lang.Object remove(int index)
Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices).
Specified by:
remove in interface java.util.List
Overrides:
remove in class java.util.ArrayList
Parameters:
index - the index of the element to removed.
Returns:
the element that was removed from the list.
Throws:
java.lang.IndexOutOfBoundsException - if index out of range (index < 0 || index >= size()).

clear

public void clear()
Removes all of the elements from this list. The list will be empty after this call returns.
Specified by:
clear in interface java.util.Collection
Specified by:
clear in interface java.util.List
Overrides:
clear in class java.util.ArrayList

addAll

public boolean addAll(java.util.Collection c)
Overrides the ArrayList implementation to force this throw the single object add() method.
Specified by:
addAll in interface java.util.Collection
Specified by:
addAll in interface java.util.List
Overrides:
addAll in class java.util.ArrayList

addAll

public boolean addAll(int index,
                      java.util.Collection c)
Overrides the ArrayList implementation to force this throw the single object add() method.
Specified by:
addAll in interface java.util.List
Overrides:
addAll in class java.util.ArrayList

checkElement

protected XmlElement checkElement(XmlElement element)
Validates the passed XmlElement, copying the element into a new valid element if necessary.

readExternal

public void readExternal(java.io.DataInput in)
                  throws java.io.IOException
Description copied from interface: ExternalizableLite
Restore the contents of this object by loading the object's state from the passed DataInput object.
Specified by:
readExternal in interface ExternalizableLite
Parameters:
in - the DataInput stream to read data from in order to restore the state of this object
Throws:
java.io.IOException - if an I/O exception occurs
java.io.NotActiveException - if the object is not in its initial state, and therefore cannot be deserialized into

writeExternal

public void writeExternal(java.io.DataOutput out)
                   throws java.io.IOException
Description copied from interface: ExternalizableLite
Save the contents of this object by storing the object's state into the passed DataOutput object.
Specified by:
writeExternal in interface ExternalizableLite
Parameters:
out - the DataOutput stream to write the state of this object to
Throws:
java.io.IOException - if an I/O exception occurs

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.