Top Description Fields Constructors Methods
org.jvnet.hk2.internal

public Class IndexedListData

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Collection, .Collections, .ListIterator, java.util.concurrent.locks.ReentrantLock

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.
Author
jwells

Field Summary

Modifier and TypeField and Description
private final ReentrantLock
private volatile boolean
private final ArrayList<SystemDescriptor<?>>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
public Collection<SystemDescriptor<?>>
public boolean
public void
public int
size()

public void
unSort()

Called by a SystemDescriptor when its ranking has changed

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

lockback to summary
private final ReentrantLock lock
sortedback to summary
private volatile boolean sorted
unsortedListback to summary
private final ArrayList<SystemDescriptor<?>> unsortedList

Constructor Detail

IndexedListDataback to summary
public IndexedListData()

Method Detail

addDescriptorback to summary
public void addDescriptor(SystemDescriptor<?> descriptor)
clearback to summary
public void clear()
getSortedListback to summary
public Collection<SystemDescriptor<?>> getSortedList()
isEmptyback to summary
public boolean isEmpty()
removeDescriptorback to summary
public void removeDescriptor(SystemDescriptor<?> descriptor)
sizeback to summary
public int size()
unSortback to summary
public void unSort()

Called by a SystemDescriptor when its ranking has changed