Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 11008 invoked from network); 30 Apr 2002 22:10:40 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 30 Apr 2002 22:10:40 -0000 Received: (qmail 1195 invoked by uid 97); 30 Apr 2002 22:10:45 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@nagoya.betaversion.org Received: (qmail 1102 invoked by alias); 30 Apr 2002 22:10:45 -0000 Delivered-To: jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 1083 invoked by uid 97); 30 Apr 2002 22:10:45 -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 1071 invoked by uid 98); 30 Apr 2002 22:10:44 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <00da01c1f093$f24743e0$594d18d4@oemcomputer> From: "Stephen Colebourne" To: "Jakarta Commons Developers List" References: <003e01c1f025$6ddcfd20$1b400a0a@mip> <01dc01c1f059$28430140$9865fea9@spiritsoft.com> <000f01c1f05c$88b252d0$1b400a0a@mip> Subject: Re: [Collections][SUBMIT] TypedList Date: Tue, 30 Apr 2002 23:11:13 +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.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N From: Michal Plechawski > Another thing is that I do not understand the real use case laying behind > the discussed Transform-xxx. I do not see why somebody wants to put > transformed elements into a collection, but ask for them directly. It breaks > some natural laws, like: > > map.put(x, y); > map.containsKey(x); // this should be true > > I think that this may be very misleading for many people, and be the reason > of hard-to-find errors. IMHO this idea breaks basic Collection Framework > intuitions. The discussion in the WeakHashSet thread seemed to conclude that all input into the collection would be transformed by the inputTransformer, and all output would be transformed by the outputTransformer. It will be important to support the case: List list = TransformUtils.transformList(inputTransformer, outputTransformer); list.add("3"); Integer i = (Integer) list.get(0); This is needed where the list is to contain objects of one type (Integer in this example) but is to accept a variety of input types. (I submitted a type conversion package ages back for this kind of thing, but it didn't get anywhere) > However, this Predicate-xxx stuff is a completely different story and a good > idea I think. Coming soon... Stephen -- To unsubscribe, e-mail: For additional commands, e-mail: