a whole bunch of stuff
[ephemerata.git] / KezvhLib / lib / org.apache.commons.collections / apidocs / org / apache / commons / collections / collection / PredicatedCollection.html
blob060ed19c1af8ff1d787b11f83d2786028d36604c
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <!--NewPage-->
3 <HTML>
4 <HEAD>
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">
7 <TITLE>
8 PredicatedCollection (Commons Collections 3.2.1 API)
9 </TITLE>
11 <META NAME="keywords" CONTENT="org.apache.commons.collections.collection.PredicatedCollection 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="PredicatedCollection (Commons Collections 3.2.1 API)";
20 </SCRIPT>
21 <NOSCRIPT>
22 </NOSCRIPT>
24 </HEAD>
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="">
33 <TR>
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>&nbsp;</TD>
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
40 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PredicatedCollection.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
46 </TR>
47 </TABLE>
48 </TD>
49 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
50 </EM>
51 </TD>
52 </TR>
54 <TR>
55 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
56 &nbsp;<A HREF="../../../../../org/apache/commons/collections/collection/CompositeCollection.CollectionMutator.html" title="interface in org.apache.commons.collections.collection"><B>PREV CLASS</B></A>&nbsp;
57 &nbsp;<A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html" title="class in org.apache.commons.collections.collection"><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/collection/PredicatedCollection.html" target="_top"><B>FRAMES</B></A> &nbsp;
60 &nbsp;<A HREF="PredicatedCollection.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
61 &nbsp;<SCRIPT type="text/javascript">
62 <!--
63 if(window==top) {
64 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
66 //-->
67 </SCRIPT>
68 <NOSCRIPT>
69 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
70 </NOSCRIPT>
73 </FONT></TD>
74 </TR>
75 <TR>
76 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
80 </TR>
81 </TABLE>
82 <A NAME="skip-navbar_top"></A>
83 <!-- ========= END OF TOP NAVBAR ========= -->
85 <HR>
86 <!-- ======== START OF CLASS DATA ======== -->
87 <H2>
88 <FONT SIZE="-1">
89 org.apache.commons.collections.collection</FONT>
90 <BR>
91 Class PredicatedCollection</H2>
92 <PRE>
93 java.lang.Object
94 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html" title="class in org.apache.commons.collections.collection">org.apache.commons.collections.collection.AbstractCollectionDecorator</A>
95 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/commons/collections/collection/AbstractSerializableCollectionDecorator.html" title="class in org.apache.commons.collections.collection">org.apache.commons.collections.collection.AbstractSerializableCollectionDecorator</A>
96 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.collections.collection.PredicatedCollection</B>
97 </PRE>
98 <DL>
99 <DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, java.lang.Iterable, java.util.Collection</DD>
100 </DL>
101 <DL>
102 <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/commons/collections/bag/PredicatedBag.html" title="class in org.apache.commons.collections.bag">PredicatedBag</A>, <A HREF="../../../../../org/apache/commons/collections/buffer/PredicatedBuffer.html" title="class in org.apache.commons.collections.buffer">PredicatedBuffer</A>, <A HREF="../../../../../org/apache/commons/collections/list/PredicatedList.html" title="class in org.apache.commons.collections.list">PredicatedList</A>, <A HREF="../../../../../org/apache/commons/collections/set/PredicatedSet.html" title="class in org.apache.commons.collections.set">PredicatedSet</A></DD>
103 </DL>
104 <HR>
105 <DL>
106 <DT><PRE>public class <B>PredicatedCollection</B><DT>extends <A HREF="../../../../../org/apache/commons/collections/collection/AbstractSerializableCollectionDecorator.html" title="class in org.apache.commons.collections.collection">AbstractSerializableCollectionDecorator</A></DL>
107 </PRE>
110 Decorates another <code>Collection</code> to validate that additions
111 match a specified predicate.
113 This collection exists to provide validation for the decorated collection.
114 It is normally created to decorate an empty collection.
115 If an object cannot be added to the collection, an IllegalArgumentException is thrown.
117 One usage would be to ensure that no null entries are added to the collection.
118 <pre>Collection coll = PredicatedCollection.decorate(new ArrayList(), NotNullPredicate.INSTANCE);</pre>
120 This class is Serializable from Commons Collections 3.1.
124 <DL>
125 <DT><B>Since:</B></DT>
126 <DD>Commons Collections 3.0</DD>
127 <DT><B>Version:</B></DT>
128 <DD>$Revision: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $</DD>
129 <DT><B>Author:</B></DT>
130 <DD>Stephen Colebourne, Paul Jack</DD>
131 <DT><B>See Also:</B><DD><A HREF="../../../../../serialized-form.html#org.apache.commons.collections.collection.PredicatedCollection">Serialized Form</A></DL>
132 <HR>
135 <!-- =========== FIELD SUMMARY =========== -->
137 <A NAME="field_summary"><!-- --></A>
138 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
139 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
140 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
141 <B>Field Summary</B></FONT></TH>
142 </TR>
143 <TR BGCOLOR="white" CLASS="TableRowColor">
144 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
145 <CODE>protected &nbsp;<A HREF="../../../../../org/apache/commons/collections/Predicate.html" title="interface in org.apache.commons.collections">Predicate</A></CODE></FONT></TD>
146 <TD><CODE><B><A HREF="../../../../../org/apache/commons/collections/collection/PredicatedCollection.html#predicate">predicate</A></B></CODE>
148 <BR>
149 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The predicate to use</TD>
150 </TR>
151 </TABLE>
152 &nbsp;<A NAME="fields_inherited_from_class_org.apache.commons.collections.collection.AbstractCollectionDecorator"><!-- --></A>
153 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
154 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
155 <TH ALIGN="left"><B>Fields inherited from class org.apache.commons.collections.collection.<A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html" title="class in org.apache.commons.collections.collection">AbstractCollectionDecorator</A></B></TH>
156 </TR>
157 <TR BGCOLOR="white" CLASS="TableRowColor">
158 <TD><CODE><A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#collection">collection</A></CODE></TD>
159 </TR>
160 </TABLE>
161 &nbsp;
162 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
164 <A NAME="constructor_summary"><!-- --></A>
165 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
166 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
167 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
168 <B>Constructor Summary</B></FONT></TH>
169 </TR>
170 <TR BGCOLOR="white" CLASS="TableRowColor">
171 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
172 <CODE>protected </CODE></FONT></TD>
173 <TD><CODE><B><A HREF="../../../../../org/apache/commons/collections/collection/PredicatedCollection.html#PredicatedCollection(java.util.Collection, org.apache.commons.collections.Predicate)">PredicatedCollection</A></B>(java.util.Collection&nbsp;coll,
174 <A HREF="../../../../../org/apache/commons/collections/Predicate.html" title="interface in org.apache.commons.collections">Predicate</A>&nbsp;predicate)</CODE>
176 <BR>
177 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor that wraps (not copies).</TD>
178 </TR>
179 </TABLE>
180 &nbsp;
181 <!-- ========== METHOD SUMMARY =========== -->
183 <A NAME="method_summary"><!-- --></A>
184 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
185 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
186 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
187 <B>Method Summary</B></FONT></TH>
188 </TR>
189 <TR BGCOLOR="white" CLASS="TableRowColor">
190 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
191 <CODE>&nbsp;boolean</CODE></FONT></TD>
192 <TD><CODE><B><A HREF="../../../../../org/apache/commons/collections/collection/PredicatedCollection.html#add(java.lang.Object)">add</A></B>(java.lang.Object&nbsp;object)</CODE>
194 <BR>
195 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Override to validate the object being added to ensure it matches
196 the predicate.</TD>
197 </TR>
198 <TR BGCOLOR="white" CLASS="TableRowColor">
199 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
200 <CODE>&nbsp;boolean</CODE></FONT></TD>
201 <TD><CODE><B><A HREF="../../../../../org/apache/commons/collections/collection/PredicatedCollection.html#addAll(java.util.Collection)">addAll</A></B>(java.util.Collection&nbsp;coll)</CODE>
203 <BR>
204 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Override to validate the objects being added to ensure they match
205 the predicate.</TD>
206 </TR>
207 <TR BGCOLOR="white" CLASS="TableRowColor">
208 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
209 <CODE>static&nbsp;java.util.Collection</CODE></FONT></TD>
210 <TD><CODE><B><A HREF="../../../../../org/apache/commons/collections/collection/PredicatedCollection.html#decorate(java.util.Collection, org.apache.commons.collections.Predicate)">decorate</A></B>(java.util.Collection&nbsp;coll,
211 <A HREF="../../../../../org/apache/commons/collections/Predicate.html" title="interface in org.apache.commons.collections">Predicate</A>&nbsp;predicate)</CODE>
213 <BR>
214 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Factory method to create a predicated (validating) collection.</TD>
215 </TR>
216 <TR BGCOLOR="white" CLASS="TableRowColor">
217 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
218 <CODE>protected &nbsp;void</CODE></FONT></TD>
219 <TD><CODE><B><A HREF="../../../../../org/apache/commons/collections/collection/PredicatedCollection.html#validate(java.lang.Object)">validate</A></B>(java.lang.Object&nbsp;object)</CODE>
221 <BR>
222 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Validates the object being added to ensure it matches the predicate.</TD>
223 </TR>
224 </TABLE>
225 &nbsp;<A NAME="methods_inherited_from_class_org.apache.commons.collections.collection.AbstractCollectionDecorator"><!-- --></A>
226 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
227 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
228 <TH ALIGN="left"><B>Methods inherited from class org.apache.commons.collections.collection.<A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html" title="class in org.apache.commons.collections.collection">AbstractCollectionDecorator</A></B></TH>
229 </TR>
230 <TR BGCOLOR="white" CLASS="TableRowColor">
231 <TD><CODE><A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#clear()">clear</A>, <A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#contains(java.lang.Object)">contains</A>, <A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#containsAll(java.util.Collection)">containsAll</A>, <A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#getCollection()">getCollection</A>, <A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#hashCode()">hashCode</A>, <A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#isEmpty()">isEmpty</A>, <A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#iterator()">iterator</A>, <A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#remove(java.lang.Object)">remove</A>, <A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#removeAll(java.util.Collection)">removeAll</A>, <A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#retainAll(java.util.Collection)">retainAll</A>, <A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#size()">size</A>, <A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#toArray()">toArray</A>, <A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#toArray(java.lang.Object[])">toArray</A>, <A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#toString()">toString</A></CODE></TD>
232 </TR>
233 </TABLE>
234 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
235 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
236 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
237 <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
238 </TR>
239 <TR BGCOLOR="white" CLASS="TableRowColor">
240 <TD><CODE>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</CODE></TD>
241 </TR>
242 </TABLE>
243 &nbsp;
246 <!-- ============ FIELD DETAIL =========== -->
248 <A NAME="field_detail"><!-- --></A>
249 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
250 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
251 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
252 <B>Field Detail</B></FONT></TH>
253 </TR>
254 </TABLE>
256 <A NAME="predicate"><!-- --></A><H3>
257 predicate</H3>
258 <PRE>
259 protected final <A HREF="../../../../../org/apache/commons/collections/Predicate.html" title="interface in org.apache.commons.collections">Predicate</A> <B>predicate</B></PRE>
260 <DL>
261 <DD>The predicate to use
263 <DL>
264 </DL>
265 </DL>
267 <!-- ========= CONSTRUCTOR DETAIL ======== -->
269 <A NAME="constructor_detail"><!-- --></A>
270 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
271 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
272 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
273 <B>Constructor Detail</B></FONT></TH>
274 </TR>
275 </TABLE>
277 <A NAME="PredicatedCollection(java.util.Collection, org.apache.commons.collections.Predicate)"><!-- --></A><H3>
278 PredicatedCollection</H3>
279 <PRE>
280 protected <B>PredicatedCollection</B>(java.util.Collection&nbsp;coll,
281 <A HREF="../../../../../org/apache/commons/collections/Predicate.html" title="interface in org.apache.commons.collections">Predicate</A>&nbsp;predicate)</PRE>
282 <DL>
283 <DD>Constructor that wraps (not copies).
285 If there are any elements already in the collection being decorated, they
286 are validated.
288 <DL>
289 <DT><B>Parameters:</B><DD><CODE>coll</CODE> - the collection to decorate, must not be null<DD><CODE>predicate</CODE> - the predicate to use for validation, must not be null
290 <DT><B>Throws:</B>
291 <DD><CODE>java.lang.IllegalArgumentException</CODE> - if collection or predicate is null
292 <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the collection contains invalid elements</DL>
293 </DL>
295 <!-- ============ METHOD DETAIL ========== -->
297 <A NAME="method_detail"><!-- --></A>
298 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
299 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
300 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
301 <B>Method Detail</B></FONT></TH>
302 </TR>
303 </TABLE>
305 <A NAME="decorate(java.util.Collection, org.apache.commons.collections.Predicate)"><!-- --></A><H3>
306 decorate</H3>
307 <PRE>
308 public static java.util.Collection <B>decorate</B>(java.util.Collection&nbsp;coll,
309 <A HREF="../../../../../org/apache/commons/collections/Predicate.html" title="interface in org.apache.commons.collections">Predicate</A>&nbsp;predicate)</PRE>
310 <DL>
311 <DD>Factory method to create a predicated (validating) collection.
313 If there are any elements already in the collection being decorated, they
314 are validated.
316 <DD><DL>
317 <DT><B>Parameters:</B><DD><CODE>coll</CODE> - the collection to decorate, must not be null<DD><CODE>predicate</CODE> - the predicate to use for validation, must not be null
318 <DT><B>Returns:</B><DD>a new predicated collection
319 <DT><B>Throws:</B>
320 <DD><CODE>java.lang.IllegalArgumentException</CODE> - if collection or predicate is null
321 <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the collection contains invalid elements</DL>
322 </DD>
323 </DL>
324 <HR>
326 <A NAME="validate(java.lang.Object)"><!-- --></A><H3>
327 validate</H3>
328 <PRE>
329 protected void <B>validate</B>(java.lang.Object&nbsp;object)</PRE>
330 <DL>
331 <DD>Validates the object being added to ensure it matches the predicate.
333 The predicate itself should not throw an exception, but return false to
334 indicate that the object cannot be added.
336 <DD><DL>
337 <DT><B>Parameters:</B><DD><CODE>object</CODE> - the object being added
338 <DT><B>Throws:</B>
339 <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the add is invalid</DL>
340 </DD>
341 </DL>
342 <HR>
344 <A NAME="add(java.lang.Object)"><!-- --></A><H3>
345 add</H3>
346 <PRE>
347 public boolean <B>add</B>(java.lang.Object&nbsp;object)</PRE>
348 <DL>
349 <DD>Override to validate the object being added to ensure it matches
350 the predicate.
352 <DD><DL>
353 <DT><B>Specified by:</B><DD><CODE>add</CODE> in interface <CODE>java.util.Collection</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#add(java.lang.Object)">add</A></CODE> in class <CODE><A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html" title="class in org.apache.commons.collections.collection">AbstractCollectionDecorator</A></CODE></DL>
354 </DD>
355 <DD><DL>
356 <DT><B>Parameters:</B><DD><CODE>object</CODE> - the object being added
357 <DT><B>Returns:</B><DD>the result of adding to the underlying collection
358 <DT><B>Throws:</B>
359 <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the add is invalid</DL>
360 </DD>
361 </DL>
362 <HR>
364 <A NAME="addAll(java.util.Collection)"><!-- --></A><H3>
365 addAll</H3>
366 <PRE>
367 public boolean <B>addAll</B>(java.util.Collection&nbsp;coll)</PRE>
368 <DL>
369 <DD>Override to validate the objects being added to ensure they match
370 the predicate. If any one fails, no update is made to the underlying
371 collection.
373 <DD><DL>
374 <DT><B>Specified by:</B><DD><CODE>addAll</CODE> in interface <CODE>java.util.Collection</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html#addAll(java.util.Collection)">addAll</A></CODE> in class <CODE><A HREF="../../../../../org/apache/commons/collections/collection/AbstractCollectionDecorator.html" title="class in org.apache.commons.collections.collection">AbstractCollectionDecorator</A></CODE></DL>
375 </DD>
376 <DD><DL>
377 <DT><B>Parameters:</B><DD><CODE>coll</CODE> - the collection being added
378 <DT><B>Returns:</B><DD>the result of adding to the underlying collection
379 <DT><B>Throws:</B>
380 <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the add is invalid</DL>
381 </DD>
382 </DL>
383 <!-- ========= END OF CLASS DATA ========= -->
384 <HR>
387 <!-- ======= START OF BOTTOM NAVBAR ====== -->
388 <A NAME="navbar_bottom"><!-- --></A>
389 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
390 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
391 <TR>
392 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
393 <A NAME="navbar_bottom_firstrow"><!-- --></A>
394 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
395 <TR ALIGN="center" VALIGN="top">
396 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
397 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
398 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
399 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PredicatedCollection.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
400 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
401 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
402 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
403 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
404 </TR>
405 </TABLE>
406 </TD>
407 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
408 </EM>
409 </TD>
410 </TR>
412 <TR>
413 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
414 &nbsp;<A HREF="../../../../../org/apache/commons/collections/collection/CompositeCollection.CollectionMutator.html" title="interface in org.apache.commons.collections.collection"><B>PREV CLASS</B></A>&nbsp;
415 &nbsp;<A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html" title="class in org.apache.commons.collections.collection"><B>NEXT CLASS</B></A></FONT></TD>
416 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
417 <A HREF="../../../../../index.html?org/apache/commons/collections/collection/PredicatedCollection.html" target="_top"><B>FRAMES</B></A> &nbsp;
418 &nbsp;<A HREF="PredicatedCollection.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
419 &nbsp;<SCRIPT type="text/javascript">
420 <!--
421 if(window==top) {
422 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
424 //-->
425 </SCRIPT>
426 <NOSCRIPT>
427 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
428 </NOSCRIPT>
431 </FONT></TD>
432 </TR>
433 <TR>
434 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
435 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
436 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
437 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
438 </TR>
439 </TABLE>
440 <A NAME="skip-navbar_bottom"></A>
441 <!-- ======== END OF BOTTOM NAVBAR ======= -->
443 <HR>
444 Copyright © 2001-2008 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
445 </BODY>
446 </HTML>