Class ConcurrentArray<E>

java.lang.Object
org.eclipse.net4j.util.collection.ConcurrentArray<E>
Direct Known Subclasses:
ConcurrentArray.DuplicateCounter, ConcurrentArray.Unique, FastList

public abstract class ConcurrentArray<E> extends Object
Since:
3.2
Author:
Eike Stepper
  • Field Details

    • elements

      protected volatile E[] elements
  • Constructor Details

    • ConcurrentArray

      public ConcurrentArray()
  • Method Details

    • isEmpty

      public boolean isEmpty()
    • get

      public E[] get()
      Returns the elements, never null.
    • contains

      public boolean contains(E element)
      Since:
      3.13
    • addUnique

      public boolean addUnique(E element)
      Since:
      3.13
    • add

      public void add(E element)
    • remove

      public boolean remove(E element)
    • validate

      protected boolean validate(E element)
    • equals

      protected boolean equals(E e1, E e2)
      Since:
      3.13
    • elementAdded

      protected void elementAdded(E element)
      Synchronized through add(Object).
      Since:
      3.13
    • elementRemoved

      protected void elementRemoved(E element)
      Synchronized through remove(Object).
      Since:
      3.13
    • firstElementAdded

      protected void firstElementAdded()
      Synchronized through add(Object).
    • lastElementRemoved

      protected void lastElementRemoved()
      Synchronized through remove(Object).
    • newArray

      protected abstract E[] newArray(int length)
      Synchronized through add(Object) or remove(Object).