org.eclipse.net4j.util.collection
Class ConcurrentArray<E>

java.lang.Object
  extended by 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

Nested Class Summary
static class ConcurrentArray.DuplicateCounter<E>
           
static class ConcurrentArray.Unique<E>
           
 
Field Summary
protected  E[] elements
           
 
Constructor Summary
ConcurrentArray()
           
 
Method Summary
 void add(E element)
           
protected  void firstElementAdded()
           
 E[] get()
          Returns the elements, never null.
 boolean isEmpty()
           
protected  void lastElementRemoved()
           
protected abstract  E[] newArray(int length)
           
 boolean remove(E element)
           
protected  boolean validate(E element)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

elements

protected E[] elements
Constructor Detail

ConcurrentArray

public ConcurrentArray()
Method Detail

isEmpty

public boolean isEmpty()

get

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


add

public void add(E element)

remove

public boolean remove(E element)

validate

protected boolean validate(E element)

firstElementAdded

protected void firstElementAdded()

lastElementRemoved

protected void lastElementRemoved()

newArray

protected abstract E[] newArray(int length)


Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.