Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B7EED9C6F for ; Tue, 19 Jun 2012 21:34:43 +0000 (UTC) Received: (qmail 51840 invoked by uid 500); 19 Jun 2012 21:34:43 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 51738 invoked by uid 500); 19 Jun 2012 21:34:43 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 51721 invoked by uid 99); 19 Jun 2012 21:34:43 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2012 21:34:43 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id EF57C1416E9 for ; Tue, 19 Jun 2012 21:34:42 +0000 (UTC) Date: Tue, 19 Jun 2012 21:34:42 +0000 (UTC) From: "Hudson (JIRA)" To: issues@commons.apache.org Message-ID: <1020695572.31598.1340141682983.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1084046262.37435.1331171097183.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (COLLECTIONS-399) Add indexed get to BoundedFifoBuffer / CircularFifoBuffer MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COLLECTIONS-399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397080#comment-13397080 ] Hudson commented on COLLECTIONS-399: ------------------------------------ Integrated in commons-collections #24 (See [https://builds.apache.org/job/commons-collections/24/]) [COLLECTIONS-399] Added get(index) method to BoundedFifoBuffer. (Revision 1351852) Result = SUCCESS tn : http://svn.apache.org/viewvc/?view=rev&rev=1351852 Files : * /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/buffer/BoundedFifoBuffer.java * /commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/TestBoundedFifoBuffer.java * /commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/TestCircularFifoBuffer.java > Add indexed get to BoundedFifoBuffer / CircularFifoBuffer > --------------------------------------------------------- > > Key: COLLECTIONS-399 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-399 > Project: Commons Collections > Issue Type: New Feature > Reporter: Sebb > Fix For: 4.0 > > > Since the BoundedFifoBuffer is implemented as an array, it should be simple to implement random access to any element of the buffer. > [This functionality was requested on the Commons user list] > For example: > // get nth entry; i.e. get(0) is the same as get() > // NoSuchElementException if i >= numEntries > // if i < 0, could either throw an Exception or treat as reverse index from end of buffer > E get(int i) > This would also work for the sub-class CircularFifoBuffer. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira