Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

oracle.javatools.util
Class CopyOnWriteList

java.lang.Object
  extended by oracle.javatools.util.CopyOnWriteList

Deprecated. Use CopyOnWriteArrayList

public class CopyOnWriteList
extends java.lang.Object

A simple implementation of a copy-on-write list. Null elements are not allowed. The copy-on-write behavior ensures that adding or removing items while iterating through the list does not affect the iteration in progress. A common usage of CopyOnWriteList is to keep a list of event listeners.


Constructor Summary
CopyOnWriteList()
          Deprecated.  
CopyOnWriteList(java.lang.Class itemType)
          Deprecated.  
 
Method Summary
 boolean add(int index, java.lang.Object item)
          Deprecated. Adds an item to the list at the specified index.
 boolean add(java.lang.Object item)
          Deprecated. Adds an item to the list at the specified index.
 boolean addIfAbsent(java.lang.Object item)
          Deprecated. Adds an item to the list.
 void clear()
          Deprecated.  
 boolean contains(java.lang.Object item)
          Deprecated. Gets whether this list contains an item.
protected  boolean equals(java.lang.Object o1, java.lang.Object o2)
          Deprecated.  
 java.lang.Object[] getItems()
          Deprecated. Gets the items.
 boolean isEmpty()
          Deprecated. Gets whether this list is empty.
 java.util.Iterator iterator()
          Deprecated. Gets an iterator over the items.
 java.lang.Object remove(int index)
          Deprecated. Removes an item from the list at the specified index.
 boolean remove(java.lang.Object item)
          Deprecated. Removes a item from the list.
 int size()
          Deprecated. Gets the total number of items in this list.
 java.lang.String toString()
          Deprecated. Gets a string describing this item list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CopyOnWriteList

public CopyOnWriteList()
Deprecated. 

CopyOnWriteList

public CopyOnWriteList(java.lang.Class itemType)
Deprecated. 
Method Detail

add

public boolean add(java.lang.Object item)
Deprecated. 
Adds an item to the list at the specified index.

Returns:
true iff the item was added.

add

public boolean add(int index,
                   java.lang.Object item)
Deprecated. 
Adds an item to the list at the specified index.

Returns:
true iff the item was added.

addIfAbsent

public boolean addIfAbsent(java.lang.Object item)
Deprecated. 
Adds an item to the list. If the item is already present, this method does nothing.

Returns:
true iff the item was added.

clear

public void clear()
Deprecated. 

remove

public boolean remove(java.lang.Object item)
Deprecated. 
Removes a item from the list. If the item is not present, this method does nothing.

Returns:
true iff the item was removed.

remove

public java.lang.Object remove(int index)
Deprecated. 
Removes an item from the list at the specified index.

Returns:
the item removed.

size

public int size()
Deprecated. 
Gets the total number of items in this list.

Do not rely on the count remaining unchanged between a call to this method and a call to getItems.


contains

public boolean contains(java.lang.Object item)
Deprecated. 
Gets whether this list contains an item.


isEmpty

public boolean isEmpty()
Deprecated. 
Gets whether this list is empty.


iterator

public java.util.Iterator iterator()
Deprecated. 
Gets an iterator over the items. The iterator never yields null items, and is unaffected by changes to the list after its creation.


getItems

public java.lang.Object[] getItems()
Deprecated. 
Gets the items. Never gets null or null elements.

To minimize overhead, this method returns a reference to the internal representation. DO NOT modify the returned value.


toString

public java.lang.String toString()
Deprecated. 
Gets a string describing this item list.

Overrides:
toString in class java.lang.Object

equals

protected boolean equals(java.lang.Object o1,
                         java.lang.Object o2)
Deprecated. 

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

Copyright © 1997, 2011, Oracle. All rights reserved.