ignite-545: compilation fix

Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b2d73aa0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b2d73aa0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b2d73aa0

Branch: refs/heads/ignite-545
Commit: b2d73aa0828a9d39e90e8f9924b53b642fa72002
Parents: a6c086f
Author: Denis Magda <dma...@gridgain.com>
Authored: Tue Apr 28 14:41:44 2015 +0300
Committer: Denis Magda <dma...@gridgain.com>
Committed: Tue Apr 28 14:41:44 2015 +0300

----------------------------------------------------------------------
 .../java/org/jsr166/ConcurrentLinkedDeque8.java | 51 ++++++++++++++++++++
 1 file changed, 51 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b2d73aa0/modules/core/src/main/java/org/jsr166/ConcurrentLinkedDeque8.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/jsr166/ConcurrentLinkedDeque8.java 
b/modules/core/src/main/java/org/jsr166/ConcurrentLinkedDeque8.java
index 9bfc81f..9c8c2db 100644
--- a/modules/core/src/main/java/org/jsr166/ConcurrentLinkedDeque8.java
+++ b/modules/core/src/main/java/org/jsr166/ConcurrentLinkedDeque8.java
@@ -1046,6 +1046,16 @@ public class ConcurrentLinkedDeque8<E>
     }
 
     /**
+     * Same as {@link #addLast(Object)}, but returns new node.
+     *
+     * @param e Element to add.
+     * @return New node.
+     */
+    public Node<E> addLastx(E e) {
+        return linkLastx(e);
+    }
+
+    /**
      * Inserts the specified element at the front of this deque.
      * As the deque is unbounded, this method will never return {@code false}.
      *
@@ -1058,6 +1068,16 @@ public class ConcurrentLinkedDeque8<E>
     }
 
     /**
+     * Same as {@link #offerFirst(Object)}, but returns new {@link Node}.
+     *
+     * @param e Element to add.
+     * @return New node.
+     */
+    public Node<E> offerFirstx(E e) {
+        return linkFirstx(e);
+    }
+
+    /**
      * Inserts the specified element at the end of this deque.
      * As the deque is unbounded, this method will never return {@code false}.
      *
@@ -1090,6 +1110,23 @@ public class ConcurrentLinkedDeque8<E>
         return null;
     }
 
+    /**
+     * Retrieves, but does not remove, the first node of this deque,
+     * or returns {@code null} if this deque is empty.
+     *
+     * @return The header node of this deque, or <tt>null</tt> if this deque 
is empty
+     */
+    public Node<E> peekFirstx() {
+        for (Node<E> p = first(); p != null; p = succ(p)) {
+            E item = p.item;
+
+            if (item != null)
+                return p;
+        }
+
+        return null;
+    }
+
     public E peekLast() {
         for (Node<E> p = last(); p != null; p = pred(p)) {
             E item = p.item;
@@ -1192,6 +1229,20 @@ public class ConcurrentLinkedDeque8<E>
     public E pop()            { return removeFirst(); }
 
     /**
+     * Retrieves, but does not remove, the header node of the queue 
represented by
+     * this deque (in other words, the first node of this deque), or
+     * returns {@code null} if this deque is empty.
+     * <p>
+     * This method is equivalent to {@link #peekFirst()}.
+     *
+     * @return The header node of the queue represented by this deque, or
+     *      {@code null} if this deque is empty
+     */
+    public Node<E> peekx() {
+        return peekFirstx();
+    }
+
+    /**
      * Removes the first element {@code e} such that
      * {@code o.equals(e)}, if such an element exists in this deque.
      * If the deque does not contain the element, it is unchanged.

Reply via email to