E
- @StorableClass @StoreNotUseStandardSerialization public class PSynchronizedCollection<E> extends Object implements Collection<E>, Serializable
Modifier and Type | Field and Description |
---|---|
protected Collection<E> |
collection |
protected IInstanceFactory |
instanceFactory |
protected Object |
mutex |
Constructor and Description |
---|
PSynchronizedCollection(IInstanceFactory instanceFactory,
Collection<E> collection) |
PSynchronizedCollection(IInstanceFactory instanceFactory,
Collection<E> collection,
Object mutex) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E element) |
boolean |
addAll(Collection<? extends E> collection) |
void |
clear() |
boolean |
contains(Object object) |
boolean |
containsAll(Collection<?> collection) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
static PSynchronizedCollection |
newInstance(IInstanceFactory instanceFactory,
Collection collection) |
static PSynchronizedCollection |
newInstance(IInstanceFactory instanceFactory,
Collection collection,
Object mutex) |
boolean |
remove(Object object) |
boolean |
removeAll(Collection<?> collection) |
boolean |
retainAll(Collection<?> collecrion) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode
protected final Collection<E> collection
protected final Object mutex
protected final transient IInstanceFactory instanceFactory
public PSynchronizedCollection(IInstanceFactory instanceFactory, Collection<E> collection)
public PSynchronizedCollection(IInstanceFactory instanceFactory, Collection<E> collection, Object mutex)
public static PSynchronizedCollection newInstance(IInstanceFactory instanceFactory, Collection collection)
public static PSynchronizedCollection newInstance(IInstanceFactory instanceFactory, Collection collection, Object mutex)
public int size()
size
in interface Collection<E>
public boolean isEmpty()
isEmpty
in interface Collection<E>
public boolean contains(Object object)
contains
in interface Collection<E>
public Object[] toArray()
toArray
in interface Collection<E>
public <T> T[] toArray(T[] array)
toArray
in interface Collection<E>
public boolean add(E element)
add
in interface Collection<E>
public boolean remove(Object object)
remove
in interface Collection<E>
public boolean containsAll(Collection<?> collection)
containsAll
in interface Collection<E>
public boolean addAll(Collection<? extends E> collection)
addAll
in interface Collection<E>
public boolean removeAll(Collection<?> collection)
removeAll
in interface Collection<E>
public boolean retainAll(Collection<?> collecrion)
retainAll
in interface Collection<E>
public void clear()
clear
in interface Collection<E>
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.