Code example for SparseArray

Methods: getkeyAtsizevalueAt

0
		this.mNotEmptyCondition.signal();
	} 
 
	private T extract() { 
		final SparseArray<IList<T>> queues = this.mQueues; 
		final int queueCount = queues.size();
		for (int i = 0; i < queueCount; i++) {
			final IList<T> queue = this.mQueues.valueAt(i);
			if (queue.size() > 0) {
				final int priority = this.mQueues.keyAt(i);
				return this.extract(priority);
			} 
		} 
		return null; 
	} 
 
	private T extract(final int pPriority) { // TODO Causes another (potentially unnecessary) lookup for the queue and the condition
		final Condition notFullCondition = this.mNotFullConditions.get(pPriority);
 
		final IList<T> queue = this.mQueues.get(pPriority);
		final T item = queue.remove(0);
		this.mSize--;
 
		notFullCondition.signal();
 
Stop searching for code, let great code find you!  Add Codota to your java IDE