public abstract class ConcurrentArray<E> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ConcurrentArray.DuplicateCounter<E> |
static class |
ConcurrentArray.Unique<E> |
Constructor and Description |
---|
ConcurrentArray() |
Modifier and Type | Method and Description |
---|---|
void |
add(E element) |
void |
clear() |
protected void |
firstElementAdded()
Synchronized through
add(Object) . |
E[] |
get()
Returns the elements, never
null . |
boolean |
isEmpty() |
protected void |
lastElementRemoved()
Synchronized through
remove(Object) . |
protected abstract E[] |
newArray(int length)
Synchronized through
add(Object) or remove(Object) . |
boolean |
remove(E element) |
protected boolean |
validate(E element)
Synchronized through
add(Object) . |
protected E[] elements
public boolean isEmpty()
public E[] get()
null
.public void add(E element)
public boolean remove(E element)
public void clear()
protected boolean validate(E element)
add(Object)
.protected void firstElementAdded()
add(Object)
.protected void lastElementRemoved()
remove(Object)
.protected abstract E[] newArray(int length)
add(Object)
or remove(Object)
.Copyright (c) 2014 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v20.html