org.jboss.webbeans.util.collections
Interface ConcurrentCollection<E>

All Superinterfaces:
java.util.Collection<E>, java.lang.Iterable<E>
All Known Implementing Classes:
ConcurrentList

public interface ConcurrentCollection<E>
extends java.util.Collection<E>

Adds concurrent add operations to the collection interface. Signatures and javadoc taken from CopyOnWriteArrayList.

Author:
Pete Muir

Method Summary
 int addAllAbsent(java.util.Collection<? extends E> c)
          Appends all of the elements in the specified collection that are not already contained in this list, to the end of this list, in the order that they are returned by the specified collection's iterator.
 boolean addIfAbsent(E e)
          Append the element if not present.
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

addAllAbsent

int addAllAbsent(java.util.Collection<? extends E> c)
Appends all of the elements in the specified collection that are not already contained in this list, to the end of this list, in the order that they are returned by the specified collection's iterator.

Parameters:
c - collection containing elements to be added to this list
Returns:
the number of elements added
Throws:
java.lang.NullPointerException - if the specified collection is null

addIfAbsent

boolean addIfAbsent(E e)
Append the element if not present.

Parameters:
e - element to be added to this list, if absent
Returns:
true if the element was added


Copyright © 2011. All Rights Reserved.