org.apache.felix.resolver.util

## Class CopyOnWriteSet<E>

- java.lang.Object
- - org.apache.felix.resolver.util.CopyOnWriteSet<E>

All Implemented Interfaces:
  Cloneable, Iterable<E>, Collection<E>, Set<E>

    public class CopyOnWriteSet<E>
    extends Object
    implements Set<E>, Cloneable

### Constructor Summary

Constructors
Constructor and Description
`CopyOnWriteSet()`
`CopyOnWriteSet(Collection<? extends E> col)`
`CopyOnWriteSet(CopyOnWriteSet<? extends E> col)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`boolean` `add(E e)`
`boolean` `addAll(Collection<? extends E> c)`
`void` `clear()`
`CopyOnWriteSet<E>` `clone()` Clone this object
`boolean` `contains(Object o)`
`boolean` `containsAll(Collection<?> c)`
`static <T> T[]` `copyOf(T[] original, int newLength)`
`static <T,U> T[]` `copyOf(U[] original, int newLength, Class<? extends T[]> newType)`
`boolean` `equals(Object o)`
`int` `hashCode()`
`boolean` `isEmpty()`
`Iterator<E>` `iterator()`
`boolean` `remove(Object o)`
`boolean` `removeAll(Collection<?> c)`
`boolean` `retainAll(Collection<?> c)`
`int` `size()`
`Object[]` `toArray()`
`<T> T[]` `toArray(T[] a)`

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.Set

`spliterator`

### Methods inherited from interface java.util.Collection

`parallelStream, removeIf, stream`

### Methods inherited from interface java.lang.Iterable

`forEach`

### Constructor Detail

#### CopyOnWriteSet

    public CopyOnWriteSet()

#### CopyOnWriteSet

    public CopyOnWriteSet(CopyOnWriteSet<? extends E> col)

#### CopyOnWriteSet

    public CopyOnWriteSet(Collection<? extends E> col)

### Method Detail

#### iterator

    public Iterator<E> iterator()

Specified by:
  `iterator` in interface `Iterable<E>`
Specified by:
  `iterator` in interface `Collection<E>`
Specified by:
  `iterator` in interface `Set<E>`

#### size

    public int size()

Specified by:
  `size` in interface `Collection<E>`
Specified by:
  `size` in interface `Set<E>`

#### add

    public boolean add(E e)

Specified by:
  `add` in interface `Collection<E>`
Specified by:
  `add` in interface `Set<E>`

#### toArray

    public Object[] toArray()

Specified by:
  `toArray` in interface `Collection<E>`
Specified by:
  `toArray` in interface `Set<E>`

#### toArray

    public <T> T[] toArray(T[] a)

Specified by:
  `toArray` in interface `Collection<E>`
Specified by:
  `toArray` in interface `Set<E>`

#### equals

    public boolean equals(Object o)

Specified by:
  `equals` in interface `Collection<E>`
Specified by:
  `equals` in interface `Set<E>`
Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Specified by:
  `hashCode` in interface `Collection<E>`
Specified by:
  `hashCode` in interface `Set<E>`
Overrides:
  `hashCode` in class `Object`

#### clone

    public CopyOnWriteSet<E> clone()

Clone this object

Overrides:
  `clone` in class `Object`
Returns:
  a cloned object.

#### isEmpty

    public boolean isEmpty()

Specified by:
  `isEmpty` in interface `Collection<E>`
Specified by:
  `isEmpty` in interface `Set<E>`

#### contains

    public boolean contains(Object o)

Specified by:
  `contains` in interface `Collection<E>`
Specified by:
  `contains` in interface `Set<E>`

#### remove

    public boolean remove(Object o)

Specified by:
  `remove` in interface `Collection<E>`
Specified by:
  `remove` in interface `Set<E>`

#### containsAll

    public boolean containsAll(Collection<?> c)

Specified by:
  `containsAll` in interface `Collection<E>`
Specified by:
  `containsAll` in interface `Set<E>`

#### addAll

    public boolean addAll(Collection<? extends E> c)

Specified by:
  `addAll` in interface `Collection<E>`
Specified by:
  `addAll` in interface `Set<E>`

#### retainAll

    public boolean retainAll(Collection<?> c)

Specified by:
  `retainAll` in interface `Collection<E>`
Specified by:
  `retainAll` in interface `Set<E>`

#### removeAll

    public boolean removeAll(Collection<?> c)

Specified by:
  `removeAll` in interface `Collection<E>`
Specified by:
  `removeAll` in interface `Set<E>`

#### clear

    public void clear()

Specified by:
  `clear` in interface `Collection<E>`
Specified by:
  `clear` in interface `Set<E>`

#### copyOf

    public static <T> T[] copyOf(T[] original,
                                 int newLength)

#### copyOf

    public static <T,U> T[] copyOf(U[] original,
                                   int newLength,
                                   Class<? extends T[]> newType)