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 89658107A6 for ; Sun, 8 Dec 2013 11:44:57 +0000 (UTC) Received: (qmail 35397 invoked by uid 500); 8 Dec 2013 11:44:51 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 35032 invoked by uid 500); 8 Dec 2013 11:44:44 -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 35009 invoked by uid 99); 8 Dec 2013 11:44:42 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Dec 2013 11:44:42 +0000 Date: Sun, 8 Dec 2013 11:44:42 +0000 (UTC) From: "Thomas Neidhart (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (COLLECTIONS-503) IfTransformer 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-503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Neidhart resolved COLLECTIONS-503. ----------------------------------------- Resolution: Fixed Applied the patch with a few modifications in r1549021: * changed javadoc a bit * added methods in TransformerUtils * deprecated TransformerUtils.switchTransformer(Predicate, Transformer, Transformer) Thanks for the patch! You name appears in the changelog and you are also in the list of contributors (see also http://commons.apache.org/proper/commons-collections/team-list.html). > IfTransformer > ------------- > > Key: COLLECTIONS-503 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-503 > Project: Commons Collections > Issue Type: New Feature > Components: Functor > Reporter: Josh Cain > Priority: Trivial > Fix For: 4.0.1 > > Attachments: ifTransformer.patch, ifTransformer.patch > > > Just thought a basic ifTransformer that performs operations based on a predicate would be useful. I know this functionality can be accomplished via a switchTransformer, but sometimes it would just be easier and more clear to have an ifTransformer. > I attached a draft of what it could look like. Let me know if this is something that should be included and I can polish it and write some tests. -- This message was sent by Atlassian JIRA (v6.1#6144)