Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 9367 invoked from network); 2 Apr 2003 16:55:05 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 2 Apr 2003 16:55:05 -0000 Received: (qmail 24443 invoked by uid 97); 2 Apr 2003 16:56:56 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@nagoya.betaversion.org Received: (qmail 24436 invoked from network); 2 Apr 2003 16:56:56 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 2 Apr 2003 16:56:56 -0000 Received: (qmail 8165 invoked by uid 500); 2 Apr 2003 16:54:49 -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 8112 invoked from network); 2 Apr 2003 16:54:49 -0000 Received: from umbongo.flamefew.net (64.253.103.114) by daedalus.apache.org with SMTP; 2 Apr 2003 16:54:49 -0000 Received: by umbongo.flamefew.net (Postfix on Linux (i386), from userid 500) id 1DF733A2482; Wed, 2 Apr 2003 11:54:47 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by umbongo.flamefew.net (Postfix on Linux (i386)) with ESMTP id 1CDB8296E95 for ; Wed, 2 Apr 2003 11:54:47 -0500 (EST) Date: Wed, 2 Apr 2003 11:54:47 -0500 (EST) From: Henri Yandell X-X-Sender: To: Jakarta Commons Developers List Subject: [collections] Collections Next Gen Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I'm aiming to restructure the Collections API a bit. Basically an annoyance at things like: SequencedHashMap, when the Hash part of it shouldn't be there. Ditto for MultiHashMap etc etc. I've one question I'd like to air-out first though: ProxyMap has a constructor which takes a Map. It uses this map as the map it will proxy to. This is against the Collections spec, which says that a java.util.Map implementation [and other Collections] should treat a constructor argument of a Map as values to copy across. ie) copy-by-value rather than copy-by-reference I guess. I'd like to standardise this as either something we obey, or don't obey. Personally I've never liked it and not obeyed it, as a putAll or addAll method easily handles this functionality. Usually the Collections project has obeyed it however, as it is an unwritten part of the specification we are obeying. It seems we have three options I think: 1) We strictly obey the specification. A collection-type parameter to a constructor is a copy-by-value. 2) We strictly obey our own specification, saying that collection-type parameters mean wrapping. 3) Any extension of ProxyMap uses copy-by-reference as its specification. So when I pass a HashMap() into a SequencedMap, it uses that HashMap as its underlying structure. Any other extension of a Map uses copy-by-value, so if I pass a HashMap into a new FastHashMap, it copies the values from the HashMap into the FastHashMap. I prefer number 3. My aim is to make the majority of the Collections classes extensions of ProxyXxx classes. Anyone -1? Hen --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org