Package org.apache.felix.resolver.util
Class CopyOnWriteSet<E>
- java.lang.Object
-
- org.apache.felix.resolver.util.CopyOnWriteSet<E>
-
- All Implemented Interfaces:
java.lang.Cloneable,java.lang.Iterable<E>,java.util.Collection<E>,java.util.Set<E>
public class CopyOnWriteSet<E> extends java.lang.Object implements java.util.Set<E>, java.lang.Cloneable
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.Object[]data
-
Constructor Summary
Constructors Constructor Description CopyOnWriteSet()CopyOnWriteSet(java.util.Collection<? extends E> col)CopyOnWriteSet(CopyOnWriteSet<? extends E> col)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(E e)booleanaddAll(java.util.Collection<? extends E> c)voidclear()CopyOnWriteSet<E>clone()Clone this objectbooleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)static <T> T[]copyOf(T[] original, int newLength)static <T,U>
T[]copyOf(U[] original, int newLength, java.lang.Class<? extends T[]> newType)booleanequals(java.lang.Object o)inthashCode()private static intindexOf(java.lang.Object o, java.lang.Object[] d, int len)booleanisEmpty()java.util.Iterator<E>iterator()private voidremove(int index)booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)intsize()java.lang.Object[]toArray()<T> T[]toArray(T[] a)
-
-
-
Constructor Detail
-
CopyOnWriteSet
public CopyOnWriteSet()
-
CopyOnWriteSet
public CopyOnWriteSet(CopyOnWriteSet<? extends E> col)
-
CopyOnWriteSet
public CopyOnWriteSet(java.util.Collection<? extends E> col)
-
-
Method Detail
-
iterator
public java.util.Iterator<E> iterator()
-
size
public int size()
-
add
public boolean add(E e)
-
remove
private void remove(int index)
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
equals
public boolean equals(java.lang.Object o)
-
hashCode
public int hashCode()
-
clone
public CopyOnWriteSet<E> clone()
Clone this object- Overrides:
clonein classjava.lang.Object- Returns:
- a cloned object.
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(java.lang.Object o)
-
remove
public boolean remove(java.lang.Object o)
-
indexOf
private static int indexOf(java.lang.Object o, java.lang.Object[] d, int len)
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
addAll
public boolean addAll(java.util.Collection<? extends E> c)
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
clear
public void clear()
-
copyOf
public static <T> T[] copyOf(T[] original, int newLength)
-
copyOf
public static <T,U> T[] copyOf(U[] original, int newLength, java.lang.Class<? extends T[]> newType)
-
-