Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A2CA11003E for ; Tue, 28 Apr 2015 12:54:44 +0000 (UTC) Received: (qmail 62431 invoked by uid 500); 28 Apr 2015 12:54:44 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 62402 invoked by uid 500); 28 Apr 2015 12:54:44 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 62393 invoked by uid 99); 28 Apr 2015 12:54:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2015 12:54:44 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [54.191.145.13] (HELO mx1-us-west.apache.org) (54.191.145.13) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2015 12:54:39 +0000 Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id 91FC3254FB for ; Tue, 28 Apr 2015 12:54:19 +0000 (UTC) Received: (qmail 62030 invoked by uid 99); 28 Apr 2015 12:54:19 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2015 12:54:19 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5B886E0777; Tue, 28 Apr 2015 12:54:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.incubator.apache.org Date: Tue, 28 Apr 2015 12:54:20 -0000 Message-Id: <8cba0270a618448d8f944696e7e2eaa7@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/2] incubator-ignite git commit: ignite-545: compilation fix X-Virus-Checked: Checked by ClamAV on apache.org 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 Authored: Tue Apr 28 14:41:44 2015 +0300 Committer: Denis Magda 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 } /** + * Same as {@link #addLast(Object)}, but returns new node. + * + * @param e Element to add. + * @return New node. + */ + public Node 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 } /** + * Same as {@link #offerFirst(Object)}, but returns new {@link Node}. + * + * @param e Element to add. + * @return New node. + */ + public Node 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 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 null if this deque is empty + */ + public Node peekFirstx() { + for (Node p = first(); p != null; p = succ(p)) { + E item = p.item; + + if (item != null) + return p; + } + + return null; + } + public E peekLast() { for (Node p = last(); p != null; p = pred(p)) { E item = p.item; @@ -1192,6 +1229,20 @@ public class ConcurrentLinkedDeque8 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. + *

+ * 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 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.