Back to project page AUIL-for-volley.
The source code is released under:
Apache License
If you think the Android project AUIL-for-volley listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.nostra13.universalimageloader.core.deque; // w ww . j a va 2s . c o m /** * {@link LinkedBlockingDeque} using LIFO algorithm * * @author Sergey Tarasevich (nostra13[at]gmail[dot]com) * @since 1.6.3 */ public class LIFOLinkedBlockingDeque<T> extends LinkedBlockingDeque<T> { private static final long serialVersionUID = -4114786347960826192L; /** * Inserts the specified element at the front of this deque if it is possible to do so immediately without violating * capacity restrictions, returning <tt>true</tt> upon success and <tt>false</tt> if no space is currently * available. When using a capacity-restricted deque, this method is generally preferable to the {@link #addFirst * addFirst} method, which can fail to insert an element only by throwing an exception. * * @param e * the element to add * @throws ClassCastException * {@inheritDoc} * @throws NullPointerException * if the specified element is null * @throws IllegalArgumentException * {@inheritDoc} */ @Override public boolean offer(T e) { return super.offerFirst(e); } /** * Retrieves and removes the first element of this deque. This method differs from {@link #pollFirst pollFirst} only * in that it throws an exception if this deque is empty. * * @return the head of this deque * @throws java.util.NoSuchElementException * if this deque is empty */ @Override public T remove() { return super.removeFirst(); } }