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 34EB2E950 for ; Sat, 16 Feb 2013 09:27:22 +0000 (UTC) Received: (qmail 16023 invoked by uid 500); 16 Feb 2013 09:27:21 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 15477 invoked by uid 500); 16 Feb 2013 09:27:15 -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 15326 invoked by uid 99); 16 Feb 2013 09:27:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Feb 2013 09:27:13 +0000 Date: Sat, 16 Feb 2013 09:27:13 +0000 (UTC) From: "Christian Gruenberg (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (COLLECTIONS-432) Replace Buffer interface with java.util.Queue 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-432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christian Gruenberg updated COLLECTIONS-432: -------------------------------------------- Attachment: commons.patch UnmodifiableBuffer not necessary, because Queue is a java.util.Collection. So you can use java.util.Collections.unmodifiableCollection. ArrayStack is replaced with java.util.Collections.asLifoQueue (Java6) or java.util.ArrayDequeue (Java6). BoundedFifoBuffer is replaced with java.util.concurrent.ArrayBlockingQueue CircularFifoBuffer is replaced with java.util.concurrent.ArrayBlockingQueue. PredicatedBuffer transfered into PredivatedBuffer PriorityBuffer is replaced with java.util.PriorityQueue SynchronizedBuffer is replaced with java.util.concurrent.SynchronizedQueue BlockingBuffer is replaced with java.util.concurrent.BlockingQueue (practical java.util.concurrent.ArrayBlockingQueue or java.util.concurrent.SynchronizedQueue) BoundedBuffer is replaced with java.util.concurrent.ArrayBlockingQueue TransformedBuffer transfered into TransformedQueue UnboundedFifoBuffer is replaced with java.util.concurrent.ArrayBlockingQueue CollectionUtils isFull() maxSize() java.util.concurrent.ArrayBlockingQueue or java.util.ArrayDequeue (Java6) BufferUnderflowException not necessary any more BufferOverflowException not necessary any more > Replace Buffer interface with java.util.Queue > --------------------------------------------- > > Key: COLLECTIONS-432 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-432 > Project: Commons Collections > Issue Type: Improvement > Affects Versions: 4.0 > Reporter: Thomas Neidhart > Fix For: 4.0 > > Attachments: commons.patch > > > Since jdk 1.5, a new interface Queue is available which is basically identical to the Buffer interface of CC. > Some of our implementations already have a counterpart in the jdk: > * BoundedFifoBuffer -> LinkedBlockingQueue or ArrayBlockingQueue > * UnboundedFifoBuffer -> LinkedList or ArrayDeque > * PriorityBuffer -> PriorityQueue > Thus the Buffer queue shall be replaced by the existing Queue, unneeded implementations be removed and the rest adapted. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira