1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 <!-- Generated by javadoc (build 1.5.0_07) on Fri Apr 11 15:39:19 BST 2008 -->
6 <META http-equiv=
"Content-Type" content=
"text/html; charset=ISO-8859-1">
8 TransformedPredicate (Commons Collections
3.2.1 API)
11 <META NAME=
"keywords" CONTENT=
"org.apache.commons.collections.functors.TransformedPredicate class">
13 <LINK REL =
"stylesheet" TYPE=
"text/css" HREF=
"../../../../../stylesheet.css" TITLE=
"Style">
15 <SCRIPT type=
"text/javascript">
16 function windowTitle()
18 parent.document.
title=
"TransformedPredicate (Commons Collections 3.2.1 API)";
26 <BODY BGCOLOR=
"white" onload=
"windowTitle();">
29 <!-- ========= START OF TOP NAVBAR ======= -->
30 <A NAME=
"navbar_top"><!-- --></A>
31 <A HREF=
"#skip-navbar_top" title=
"Skip navigation links"></A>
32 <TABLE BORDER=
"0" WIDTH=
"100%" CELLPADDING=
"1" CELLSPACING=
"0" SUMMARY=
"">
34 <TD COLSPAN=
2 BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1">
35 <A NAME=
"navbar_top_firstrow"><!-- --></A>
36 <TABLE BORDER=
"0" CELLPADDING=
"0" CELLSPACING=
"3" SUMMARY=
"">
37 <TR ALIGN=
"center" VALIGN=
"top">
38 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../overview-summary.html"><FONT CLASS=
"NavBarFont1"><B>Overview
</B></FONT></A> </TD>
39 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-summary.html"><FONT CLASS=
"NavBarFont1"><B>Package
</B></FONT></A> </TD>
40 <TD BGCOLOR=
"#FFFFFF" CLASS=
"NavBarCell1Rev"> <FONT CLASS=
"NavBarFont1Rev"><B>Class
</B></FONT> </TD>
41 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"class-use/TransformedPredicate.html"><FONT CLASS=
"NavBarFont1"><B>Use
</B></FONT></A> </TD>
42 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-tree.html"><FONT CLASS=
"NavBarFont1"><B>Tree
</B></FONT></A> </TD>
43 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../deprecated-list.html"><FONT CLASS=
"NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
44 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../index-all.html"><FONT CLASS=
"NavBarFont1"><B>Index
</B></FONT></A> </TD>
45 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../help-doc.html"><FONT CLASS=
"NavBarFont1"><B>Help
</B></FONT></A> </TD>
49 <TD ALIGN=
"right" VALIGN=
"top" ROWSPAN=
3><EM>
55 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
56 <A HREF=
"../../../../../org/apache/commons/collections/functors/SwitchTransformer.html" title=
"class in org.apache.commons.collections.functors"><B>PREV CLASS
</B></A>
57 <A HREF=
"../../../../../org/apache/commons/collections/functors/TransformerClosure.html" title=
"class in org.apache.commons.collections.functors"><B>NEXT CLASS
</B></A></FONT></TD>
58 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
59 <A HREF=
"../../../../../index.html?org/apache/commons/collections/functors/TransformedPredicate.html" target=
"_top"><B>FRAMES
</B></A>
60 <A HREF=
"TransformedPredicate.html" target=
"_top"><B>NO FRAMES
</B></A>
61 <SCRIPT type=
"text/javascript">
64 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
69 <A HREF=
"../../../../../allclasses-noframe.html"><B>All Classes
</B></A>
76 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
77 SUMMARY:
NESTED
|
FIELD
|
<A HREF=
"#constructor_summary">CONSTR
</A> |
<A HREF=
"#method_summary">METHOD
</A></FONT></TD>
78 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
79 DETAIL:
FIELD
|
<A HREF=
"#constructor_detail">CONSTR
</A> |
<A HREF=
"#method_detail">METHOD
</A></FONT></TD>
82 <A NAME=
"skip-navbar_top"></A>
83 <!-- ========= END OF TOP NAVBAR ========= -->
86 <!-- ======== START OF CLASS DATA ======== -->
89 org.apache.commons.collections.functors
</FONT>
91 Class TransformedPredicate
</H2>
94 <IMG SRC=
"../../../../../resources/inherit.gif" ALT=
"extended by "><B>org.apache.commons.collections.functors.TransformedPredicate
</B>
97 <DT><B>All Implemented Interfaces:
</B> <DD>java.io.Serializable,
<A HREF=
"../../../../../org/apache/commons/collections/functors/PredicateDecorator.html" title=
"interface in org.apache.commons.collections.functors">PredicateDecorator
</A>,
<A HREF=
"../../../../../org/apache/commons/collections/Predicate.html" title=
"interface in org.apache.commons.collections">Predicate
</A></DD>
101 <DT><PRE>public final class
<B>TransformedPredicate
</B><DT>extends java.lang.Object
<DT>implements
<A HREF=
"../../../../../org/apache/commons/collections/Predicate.html" title=
"interface in org.apache.commons.collections">Predicate
</A>,
<A HREF=
"../../../../../org/apache/commons/collections/functors/PredicateDecorator.html" title=
"interface in org.apache.commons.collections.functors">PredicateDecorator
</A>, java.io.Serializable
</DL>
105 Predicate implementation that transforms the given object before invoking
106 another
<code>Predicate
</code>.
111 <DT><B>Since:
</B></DT>
112 <DD>Commons Collections
3.1</DD>
113 <DT><B>Version:
</B></DT>
114 <DD>$Revision:
646777 $ $Date:
2008-
04-
10 13:
33:
15 +
0100 (Thu,
10 Apr
2008) $
</DD>
115 <DT><B>Author:
</B></DT>
116 <DD>Alban Peignier, Stephen Colebourne
</DD>
117 <DT><B>See Also:
</B><DD><A HREF=
"../../../../../serialized-form.html#org.apache.commons.collections.functors.TransformedPredicate">Serialized Form
</A></DL>
122 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
124 <A NAME=
"constructor_summary"><!-- --></A>
125 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
126 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
127 <TH ALIGN=
"left" COLSPAN=
"2"><FONT SIZE=
"+2">
128 <B>Constructor Summary
</B></FONT></TH>
130 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
131 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/collections/functors/TransformedPredicate.html#TransformedPredicate(org.apache.commons.collections.Transformer, org.apache.commons.collections.Predicate)">TransformedPredicate
</A></B>(
<A HREF=
"../../../../../org/apache/commons/collections/Transformer.html" title=
"interface in org.apache.commons.collections">Transformer
</A> transformer,
132 <A HREF=
"../../../../../org/apache/commons/collections/Predicate.html" title=
"interface in org.apache.commons.collections">Predicate
</A> predicate)
</CODE>
135 Constructor that performs no validation.
</TD>
139 <!-- ========== METHOD SUMMARY =========== -->
141 <A NAME=
"method_summary"><!-- --></A>
142 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
143 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
144 <TH ALIGN=
"left" COLSPAN=
"2"><FONT SIZE=
"+2">
145 <B>Method Summary
</B></FONT></TH>
147 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
148 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
149 <CODE> boolean
</CODE></FONT></TD>
150 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/collections/functors/TransformedPredicate.html#evaluate(java.lang.Object)">evaluate
</A></B>(java.lang.Object
object)
</CODE>
153 Evaluates the predicate returning the result of the decorated predicate
154 once the input has been transformed
</TD>
156 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
157 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
158 <CODE>static
<A HREF=
"../../../../../org/apache/commons/collections/Predicate.html" title=
"interface in org.apache.commons.collections">Predicate
</A></CODE></FONT></TD>
159 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/collections/functors/TransformedPredicate.html#getInstance(org.apache.commons.collections.Transformer, org.apache.commons.collections.Predicate)">getInstance
</A></B>(
<A HREF=
"../../../../../org/apache/commons/collections/Transformer.html" title=
"interface in org.apache.commons.collections">Transformer
</A> transformer,
160 <A HREF=
"../../../../../org/apache/commons/collections/Predicate.html" title=
"interface in org.apache.commons.collections">Predicate
</A> predicate)
</CODE>
163 Factory to create the predicate.
</TD>
165 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
166 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
167 <CODE> <A HREF=
"../../../../../org/apache/commons/collections/Predicate.html" title=
"interface in org.apache.commons.collections">Predicate
</A>[]
</CODE></FONT></TD>
168 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/collections/functors/TransformedPredicate.html#getPredicates()">getPredicates
</A></B>()
</CODE>
171 Gets the predicate being decorated.
</TD>
173 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
174 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
175 <CODE> <A HREF=
"../../../../../org/apache/commons/collections/Transformer.html" title=
"interface in org.apache.commons.collections">Transformer
</A></CODE></FONT></TD>
176 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/collections/functors/TransformedPredicate.html#getTransformer()">getTransformer
</A></B>()
</CODE>
179 Gets the transformer in use.
</TD>
182 <A NAME=
"methods_inherited_from_class_java.lang.Object"><!-- --></A>
183 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
184 <TR BGCOLOR=
"#EEEEFF" CLASS=
"TableSubHeadingColor">
185 <TH ALIGN=
"left"><B>Methods inherited from class java.lang.Object
</B></TH>
187 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
188 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
</CODE></TD>
194 <!-- ========= CONSTRUCTOR DETAIL ======== -->
196 <A NAME=
"constructor_detail"><!-- --></A>
197 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
198 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
199 <TH ALIGN=
"left" COLSPAN=
"1"><FONT SIZE=
"+2">
200 <B>Constructor Detail
</B></FONT></TH>
204 <A NAME=
"TransformedPredicate(org.apache.commons.collections.Transformer, org.apache.commons.collections.Predicate)"><!-- --></A><H3>
205 TransformedPredicate
</H3>
207 public
<B>TransformedPredicate
</B>(
<A HREF=
"../../../../../org/apache/commons/collections/Transformer.html" title=
"interface in org.apache.commons.collections">Transformer
</A> transformer,
208 <A HREF=
"../../../../../org/apache/commons/collections/Predicate.html" title=
"interface in org.apache.commons.collections">Predicate
</A> predicate)
</PRE>
210 <DD>Constructor that performs no validation.
211 Use
<code>getInstance
</code> if you want that.
214 <DT><B>Parameters:
</B><DD><CODE>transformer
</CODE> - the transformer to use
<DD><CODE>predicate
</CODE> - the predicate to decorate
</DL>
217 <!-- ============ METHOD DETAIL ========== -->
219 <A NAME=
"method_detail"><!-- --></A>
220 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
221 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
222 <TH ALIGN=
"left" COLSPAN=
"1"><FONT SIZE=
"+2">
223 <B>Method Detail
</B></FONT></TH>
227 <A NAME=
"getInstance(org.apache.commons.collections.Transformer, org.apache.commons.collections.Predicate)"><!-- --></A><H3>
230 public static
<A HREF=
"../../../../../org/apache/commons/collections/Predicate.html" title=
"interface in org.apache.commons.collections">Predicate
</A> <B>getInstance
</B>(
<A HREF=
"../../../../../org/apache/commons/collections/Transformer.html" title=
"interface in org.apache.commons.collections">Transformer
</A> transformer,
231 <A HREF=
"../../../../../org/apache/commons/collections/Predicate.html" title=
"interface in org.apache.commons.collections">Predicate
</A> predicate)
</PRE>
233 <DD>Factory to create the predicate.
239 <DT><B>Parameters:
</B><DD><CODE>transformer
</CODE> - the transformer to call
<DD><CODE>predicate
</CODE> - the predicate to call with the result of the transform
240 <DT><B>Returns:
</B><DD>the predicate
242 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if the transformer or the predicate is null
</DL>
247 <A NAME=
"evaluate(java.lang.Object)"><!-- --></A><H3>
250 public boolean
<B>evaluate
</B>(java.lang.Object
object)
</PRE>
252 <DD>Evaluates the predicate returning the result of the decorated predicate
253 once the input has been transformed
256 <DT><B>Specified by:
</B><DD><CODE><A HREF=
"../../../../../org/apache/commons/collections/Predicate.html#evaluate(java.lang.Object)">evaluate
</A></CODE> in interface
<CODE><A HREF=
"../../../../../org/apache/commons/collections/Predicate.html" title=
"interface in org.apache.commons.collections">Predicate
</A></CODE></DL>
259 <DT><B>Parameters:
</B><DD><CODE>object
</CODE> - the input object which will be transformed
260 <DT><B>Returns:
</B><DD>true if decorated predicate returns true
</DL>
265 <A NAME=
"getPredicates()"><!-- --></A><H3>
268 public
<A HREF=
"../../../../../org/apache/commons/collections/Predicate.html" title=
"interface in org.apache.commons.collections">Predicate
</A>[]
<B>getPredicates
</B>()
</PRE>
270 <DD>Gets the predicate being decorated.
273 <DT><B>Specified by:
</B><DD><CODE><A HREF=
"../../../../../org/apache/commons/collections/functors/PredicateDecorator.html#getPredicates()">getPredicates
</A></CODE> in interface
<CODE><A HREF=
"../../../../../org/apache/commons/collections/functors/PredicateDecorator.html" title=
"interface in org.apache.commons.collections.functors">PredicateDecorator
</A></CODE></DL>
277 <DT><B>Returns:
</B><DD>the predicate as the only element in an array
<DT><B>Since:
</B></DT>
278 <DD>Commons Collections
3.1</DD>
284 <A NAME=
"getTransformer()"><!-- --></A><H3>
287 public
<A HREF=
"../../../../../org/apache/commons/collections/Transformer.html" title=
"interface in org.apache.commons.collections">Transformer
</A> <B>getTransformer
</B>()
</PRE>
289 <DD>Gets the transformer in use.
296 <DT><B>Returns:
</B><DD>the transformer
</DL>
299 <!-- ========= END OF CLASS DATA ========= -->
303 <!-- ======= START OF BOTTOM NAVBAR ====== -->
304 <A NAME=
"navbar_bottom"><!-- --></A>
305 <A HREF=
"#skip-navbar_bottom" title=
"Skip navigation links"></A>
306 <TABLE BORDER=
"0" WIDTH=
"100%" CELLPADDING=
"1" CELLSPACING=
"0" SUMMARY=
"">
308 <TD COLSPAN=
2 BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1">
309 <A NAME=
"navbar_bottom_firstrow"><!-- --></A>
310 <TABLE BORDER=
"0" CELLPADDING=
"0" CELLSPACING=
"3" SUMMARY=
"">
311 <TR ALIGN=
"center" VALIGN=
"top">
312 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../overview-summary.html"><FONT CLASS=
"NavBarFont1"><B>Overview
</B></FONT></A> </TD>
313 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-summary.html"><FONT CLASS=
"NavBarFont1"><B>Package
</B></FONT></A> </TD>
314 <TD BGCOLOR=
"#FFFFFF" CLASS=
"NavBarCell1Rev"> <FONT CLASS=
"NavBarFont1Rev"><B>Class
</B></FONT> </TD>
315 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"class-use/TransformedPredicate.html"><FONT CLASS=
"NavBarFont1"><B>Use
</B></FONT></A> </TD>
316 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-tree.html"><FONT CLASS=
"NavBarFont1"><B>Tree
</B></FONT></A> </TD>
317 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../deprecated-list.html"><FONT CLASS=
"NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
318 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../index-all.html"><FONT CLASS=
"NavBarFont1"><B>Index
</B></FONT></A> </TD>
319 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../help-doc.html"><FONT CLASS=
"NavBarFont1"><B>Help
</B></FONT></A> </TD>
323 <TD ALIGN=
"right" VALIGN=
"top" ROWSPAN=
3><EM>
329 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
330 <A HREF=
"../../../../../org/apache/commons/collections/functors/SwitchTransformer.html" title=
"class in org.apache.commons.collections.functors"><B>PREV CLASS
</B></A>
331 <A HREF=
"../../../../../org/apache/commons/collections/functors/TransformerClosure.html" title=
"class in org.apache.commons.collections.functors"><B>NEXT CLASS
</B></A></FONT></TD>
332 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
333 <A HREF=
"../../../../../index.html?org/apache/commons/collections/functors/TransformedPredicate.html" target=
"_top"><B>FRAMES
</B></A>
334 <A HREF=
"TransformedPredicate.html" target=
"_top"><B>NO FRAMES
</B></A>
335 <SCRIPT type=
"text/javascript">
338 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
343 <A HREF=
"../../../../../allclasses-noframe.html"><B>All Classes
</B></A>
350 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
351 SUMMARY:
NESTED
|
FIELD
|
<A HREF=
"#constructor_summary">CONSTR
</A> |
<A HREF=
"#method_summary">METHOD
</A></FONT></TD>
352 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
353 DETAIL:
FIELD
|
<A HREF=
"#constructor_detail">CONSTR
</A> |
<A HREF=
"#method_detail">METHOD
</A></FONT></TD>
356 <A NAME=
"skip-navbar_bottom"></A>
357 <!-- ======== END OF BOTTOM NAVBAR ======= -->
360 Copyright ©
2001-
2008 <a href=
"http://www.apache.org/">The Apache Software Foundation
</a>. All Rights Reserved.