Package org.jvnet.hk2.internal
Class IndexedListData
- java.lang.Object
-
- org.jvnet.hk2.internal.IndexedListData
-
public class IndexedListData extends java.lang.Object
This object contains a list of values. The list is not always sorted, but will always be returned sorted. All of the methods on here must be called with lock held.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
sorted
private java.util.ArrayList<SystemDescriptor<?>>
unsortedList
-
Constructor Summary
Constructors Constructor Description IndexedListData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDescriptor(SystemDescriptor<?> descriptor)
void
clear()
java.util.Collection<SystemDescriptor<?>>
getSortedList()
boolean
isEmpty()
void
removeDescriptor(SystemDescriptor<?> descriptor)
int
size()
void
unSort()
Called by a SystemDescriptor when its ranking has changed
-
-
-
Field Detail
-
unsortedList
private final java.util.ArrayList<SystemDescriptor<?>> unsortedList
-
sorted
private volatile boolean sorted
-
-
Method Detail
-
getSortedList
public java.util.Collection<SystemDescriptor<?>> getSortedList()
-
addDescriptor
public void addDescriptor(SystemDescriptor<?> descriptor)
-
removeDescriptor
public void removeDescriptor(SystemDescriptor<?> descriptor)
-
isEmpty
public boolean isEmpty()
-
unSort
public void unSort()
Called by a SystemDescriptor when its ranking has changed
-
clear
public void clear()
-
size
public int size()
-
-