From 7bbfcc0b7e1a5bcdba11f3c18d3b6e164e029d1e Mon Sep 17 00:00:00 2001 From: jeepingben Date: Fri, 5 Sep 2014 08:34:34 -0400 Subject: [PATCH] Create LIFOBlockingDeque.java Add support for LIFO blocking queue (deque actually) --- .../src/net/osmand/util/LIFOBlockingDeque.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 OsmAnd-java/src/net/osmand/util/LIFOBlockingDeque.java diff --git a/OsmAnd-java/src/net/osmand/util/LIFOBlockingDeque.java b/OsmAnd-java/src/net/osmand/util/LIFOBlockingDeque.java new file mode 100644 index 0000000000..41f055e0d3 --- /dev/null +++ b/OsmAnd-java/src/net/osmand/util/LIFOBlockingDeque.java @@ -0,0 +1,18 @@ +package net.osmand.util; + +import java.util.concurrent.LinkedBlockingDeque; + +public class LIFOBlockingDeque extends LinkedBlockingDeque { + + private static final long serialVersionUID = 1L; + + @Override + public boolean offer(T t) { + return super.offerFirst(t); + } + + @Override + public T remove() { + return super.removeFirst(); + } +}