public class ConcurrentSortedIntList<E> extends org.mini2Dx.gdx.utils.SortedIntList<E> implements ConcurrentCollection
| Modifier and Type | Field and Description |
|---|---|
protected org.mini2Dx.lockprovider.ReadWriteLock |
lock |
| Constructor and Description |
|---|
ConcurrentSortedIntList()
Creates an ascending list
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears list
|
E |
get(int index)
Retrieves an element at a given index
|
org.mini2Dx.lockprovider.ReadWriteLock |
getLock()
Returns the collection's
ReadWriteLock |
E |
insert(int index,
E value)
Inserts an element into the list at the given index
|
boolean |
isEmpty()
Returns true if the list is empty.
|
java.util.Iterator<org.mini2Dx.gdx.utils.SortedIntList.Node<E>> |
iterator()
Returns an iterator to traverse the list.
|
boolean |
notEmpty()
Returns true if the list has one or more items.
|
int |
size() |
public ConcurrentSortedIntList()
public E insert(int index, E value)
insert in class org.mini2Dx.gdx.utils.SortedIntList<E>index - Index of the elementvalue - Element to insertpublic E get(int index)
get in class org.mini2Dx.gdx.utils.SortedIntList<E>index - Index of the element to retrievepublic void clear()
clear in class org.mini2Dx.gdx.utils.SortedIntList<E>public int size()
size in class org.mini2Dx.gdx.utils.SortedIntList<E>public boolean notEmpty()
notEmpty in class org.mini2Dx.gdx.utils.SortedIntList<E>public boolean isEmpty()
isEmpty in class org.mini2Dx.gdx.utils.SortedIntList<E>public java.util.Iterator<org.mini2Dx.gdx.utils.SortedIntList.Node<E>> iterator()
public org.mini2Dx.lockprovider.ReadWriteLock getLock()
ConcurrentCollectionReadWriteLockgetLock in interface ConcurrentCollectionReadWriteLock