Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 33801 invoked from network); 25 Apr 2004 23:47:36 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 25 Apr 2004 23:47:36 -0000 Received: (qmail 92200 invoked by uid 500); 25 Apr 2004 23:47:19 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 91909 invoked by uid 500); 25 Apr 2004 23:47:17 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 91894 invoked from network); 25 Apr 2004 23:47:16 -0000 Received: from unknown (HELO zinc.btinternet.com) (194.73.73.148) by daedalus.apache.org with SMTP; 25 Apr 2004 23:47:16 -0000 Received: from [217.43.117.203] (helo=oemcomputer) by zinc.btinternet.com with smtp (Exim 3.22 #25) id 1BHtLH-0002Sr-00 for commons-dev@jakarta.apache.org; Mon, 26 Apr 2004 00:47:23 +0100 Message-ID: <005c01c42b1f$8bb211a0$cb752bd9@oemcomputer> From: "Stephen Colebourne" To: "Jakarta Commons Developers List" Subject: [collections] Bag interface Date: Mon, 26 Apr 2004 00:46:35 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N The current Bag interface has the following javadoc warning: * Note that this interface violates the {@link Collection} contract. * The behavior specified in many of these methods is not the same * as the behavior specified by Collection. The noncompliant methods * are clearly marked with "(Violation)". A future * version of this class will specify the same behavior as Collection, * which unfortunately will break backwards compatibility with this version. This has caused bile-like derision in some quarters, and is not something I've ever liked - its basically an artifact of collections history. I propose that we change this to state that its wrong, but that we will keep compatability: * NOTE: This interface violates the {@link Collection} contract. * The behavior specified in many of these methods is not the same * as the behavior specified by Collection. * The noncompliant methods are clearly marked with "(Violation)". * Exercise caution when using a bag as a Collection. *

* This violation resulted from the original specification of the interface. * In an ideal world, the interface would be changed to fix the problems, however * it has been decided to maintain backwards compatibility instead. Opinions? Stephen --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org