/lib/commons-io/apidocs/org/apache/commons/io/filefilter/NameFileFilter.html

https://bitbucket.org/arkban/somersault · HTML · 513 lines · 436 code · 53 blank · 24 comment · 0 complexity · e8e1db03a95cb272206f1ab91840a2c5 MD5 · raw file

  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.6.0_20) on Tue Sep 28 21:40:06 EDT 2010 -->
  6. <TITLE>
  7. NameFileFilter (Commons IO 1.5-SNAPSHOT)
  8. </TITLE>
  9. <META NAME="date" CONTENT="2010-09-28">
  10. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
  11. <SCRIPT type="text/javascript">
  12. function windowTitle()
  13. {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="NameFileFilter (Commons IO 1.5-SNAPSHOT)";
  16. }
  17. }
  18. </SCRIPT>
  19. <NOSCRIPT>
  20. </NOSCRIPT>
  21. </HEAD>
  22. <BODY BGCOLOR="white" onload="windowTitle();">
  23. <HR>
  24. <!-- ========= START OF TOP NAVBAR ======= -->
  25. <A NAME="navbar_top"><!-- --></A>
  26. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  27. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  28. <TR>
  29. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  30. <A NAME="navbar_top_firstrow"><!-- --></A>
  31. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  32. <TR ALIGN="center" VALIGN="top">
  33. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  34. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  35. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  36. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  37. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  38. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  39. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  40. </TR>
  41. </TABLE>
  42. </TD>
  43. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  44. </EM>
  45. </TD>
  46. </TR>
  47. <TR>
  48. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  49. &nbsp;<A HREF="../../../../../org/apache/commons/io/filefilter/MagicNumberFileFilter.html" title="class in org.apache.commons.io.filefilter"><B>PREV CLASS</B></A>&nbsp;
  50. &nbsp;<A HREF="../../../../../org/apache/commons/io/filefilter/NotFileFilter.html" title="class in org.apache.commons.io.filefilter"><B>NEXT CLASS</B></A></FONT></TD>
  51. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  52. <A HREF="../../../../../index.html?org/apache/commons/io/filefilter/NameFileFilter.html" target="_top"><B>FRAMES</B></A> &nbsp;
  53. &nbsp;<A HREF="NameFileFilter.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  54. &nbsp;<SCRIPT type="text/javascript">
  55. <!--
  56. if(window==top) {
  57. document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  58. }
  59. //-->
  60. </SCRIPT>
  61. <NOSCRIPT>
  62. <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
  63. </NOSCRIPT>
  64. </FONT></TD>
  65. </TR>
  66. <TR>
  67. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  68. 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>
  69. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  70. 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>
  71. </TR>
  72. </TABLE>
  73. <A NAME="skip-navbar_top"></A>
  74. <!-- ========= END OF TOP NAVBAR ========= -->
  75. <HR>
  76. <!-- ======== START OF CLASS DATA ======== -->
  77. <H2>
  78. <FONT SIZE="-1">
  79. org.apache.commons.io.filefilter</FONT>
  80. <BR>
  81. Class NameFileFilter</H2>
  82. <PRE>
  83. <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  84. <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/commons/io/filefilter/AbstractFileFilter.html" title="class in org.apache.commons.io.filefilter">org.apache.commons.io.filefilter.AbstractFileFilter</A>
  85. <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.io.filefilter.NameFileFilter</B>
  86. </PRE>
  87. <DL>
  88. <DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileFilter.html?is-external=true" title="class or interface in java.io">FileFilter</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FilenameFilter.html?is-external=true" title="class or interface in java.io">FilenameFilter</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>, <A HREF="../../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</A></DD>
  89. </DL>
  90. <HR>
  91. <DL>
  92. <DT><PRE>public class <B>NameFileFilter</B><DT>extends <A HREF="../../../../../org/apache/commons/io/filefilter/AbstractFileFilter.html" title="class in org.apache.commons.io.filefilter">AbstractFileFilter</A><DT>implements <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DL>
  93. </PRE>
  94. <P>
  95. Filters filenames for a certain name.
  96. <p>
  97. For example, to print all files and directories in the
  98. current directory whose name is <code>Test</code>:
  99. <pre>
  100. File dir = new File(".");
  101. String[] files = dir.list( new NameFileFilter("Test") );
  102. for ( int i = 0; i &lt; files.length; i++ ) {
  103. System.out.println(files[i]);
  104. }
  105. </pre>
  106. <P>
  107. <P>
  108. <DL>
  109. <DT><B>Since:</B></DT>
  110. <DD>Commons IO 1.0</DD>
  111. <DT><B>Version:</B></DT>
  112. <DD>$Revision: 736890 $ $Date: 2009-01-22 21:02:22 -0500 (Thu, 22 Jan 2009) $</DD>
  113. <DT><B>Author:</B></DT>
  114. <DD>Stephen Colebourne, Federico Barbieri, Serge Knystautas, Peter Donald</DD>
  115. <DT><B>See Also:</B><DD><A HREF="../../../../../serialized-form.html#org.apache.commons.io.filefilter.NameFileFilter">Serialized Form</A></DL>
  116. <HR>
  117. <P>
  118. <!-- =========== FIELD SUMMARY =========== -->
  119. <A NAME="field_summary"><!-- --></A>
  120. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  121. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  122. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  123. <B>Field Summary</B></FONT></TH>
  124. </TR>
  125. <TR BGCOLOR="white" CLASS="TableRowColor">
  126. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  127. <CODE>private &nbsp;<A HREF="../../../../../org/apache/commons/io/IOCase.html" title="class in org.apache.commons.io">IOCase</A></CODE></FONT></TD>
  128. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/filefilter/NameFileFilter.html#caseSensitivity">caseSensitivity</A></B></CODE>
  129. <BR>
  130. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether the comparison is case sensitive.</TD>
  131. </TR>
  132. <TR BGCOLOR="white" CLASS="TableRowColor">
  133. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  134. <CODE>private &nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]</CODE></FONT></TD>
  135. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/filefilter/NameFileFilter.html#names">names</A></B></CODE>
  136. <BR>
  137. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The filenames to search for</TD>
  138. </TR>
  139. </TABLE>
  140. &nbsp;
  141. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  142. <A NAME="constructor_summary"><!-- --></A>
  143. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  144. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  145. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  146. <B>Constructor Summary</B></FONT></TH>
  147. </TR>
  148. <TR BGCOLOR="white" CLASS="TableRowColor">
  149. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/filefilter/NameFileFilter.html#NameFileFilter(java.util.List)">NameFileFilter</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;&nbsp;names)</CODE>
  150. <BR>
  151. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new case-sensitive name file filter for a list of names.</TD>
  152. </TR>
  153. <TR BGCOLOR="white" CLASS="TableRowColor">
  154. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/filefilter/NameFileFilter.html#NameFileFilter(java.util.List, org.apache.commons.io.IOCase)">NameFileFilter</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;&nbsp;names,
  155. <A HREF="../../../../../org/apache/commons/io/IOCase.html" title="class in org.apache.commons.io">IOCase</A>&nbsp;caseSensitivity)</CODE>
  156. <BR>
  157. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new name file filter for a list of names specifying case-sensitivity.</TD>
  158. </TR>
  159. <TR BGCOLOR="white" CLASS="TableRowColor">
  160. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/filefilter/NameFileFilter.html#NameFileFilter(java.lang.String)">NameFileFilter</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</CODE>
  161. <BR>
  162. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new case-sensitive name file filter for a single name.</TD>
  163. </TR>
  164. <TR BGCOLOR="white" CLASS="TableRowColor">
  165. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/filefilter/NameFileFilter.html#NameFileFilter(java.lang.String[])">NameFileFilter</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]&nbsp;names)</CODE>
  166. <BR>
  167. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new case-sensitive name file filter for an array of names.</TD>
  168. </TR>
  169. <TR BGCOLOR="white" CLASS="TableRowColor">
  170. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/filefilter/NameFileFilter.html#NameFileFilter(java.lang.String[], org.apache.commons.io.IOCase)">NameFileFilter</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]&nbsp;names,
  171. <A HREF="../../../../../org/apache/commons/io/IOCase.html" title="class in org.apache.commons.io">IOCase</A>&nbsp;caseSensitivity)</CODE>
  172. <BR>
  173. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new name file filter for an array of names specifying case-sensitivity.</TD>
  174. </TR>
  175. <TR BGCOLOR="white" CLASS="TableRowColor">
  176. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/filefilter/NameFileFilter.html#NameFileFilter(java.lang.String, org.apache.commons.io.IOCase)">NameFileFilter</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
  177. <A HREF="../../../../../org/apache/commons/io/IOCase.html" title="class in org.apache.commons.io">IOCase</A>&nbsp;caseSensitivity)</CODE>
  178. <BR>
  179. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a new name file filter specifying case-sensitivity.</TD>
  180. </TR>
  181. </TABLE>
  182. &nbsp;
  183. <!-- ========== METHOD SUMMARY =========== -->
  184. <A NAME="method_summary"><!-- --></A>
  185. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  186. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  187. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  188. <B>Method Summary</B></FONT></TH>
  189. </TR>
  190. <TR BGCOLOR="white" CLASS="TableRowColor">
  191. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  192. <CODE>&nbsp;boolean</CODE></FONT></TD>
  193. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/filefilter/NameFileFilter.html#accept(java.io.File)">accept</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;file)</CODE>
  194. <BR>
  195. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks to see if the filename matches.</TD>
  196. </TR>
  197. <TR BGCOLOR="white" CLASS="TableRowColor">
  198. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  199. <CODE>&nbsp;boolean</CODE></FONT></TD>
  200. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/filefilter/NameFileFilter.html#accept(java.io.File, java.lang.String)">accept</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;file,
  201. <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</CODE>
  202. <BR>
  203. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks to see if the filename matches.</TD>
  204. </TR>
  205. <TR BGCOLOR="white" CLASS="TableRowColor">
  206. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  207. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
  208. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/filefilter/NameFileFilter.html#toString()">toString</A></B>()</CODE>
  209. <BR>
  210. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Provide a String representaion of this file filter.</TD>
  211. </TR>
  212. </TABLE>
  213. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  214. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  215. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  216. <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
  217. </TR>
  218. <TR BGCOLOR="white" CLASS="TableRowColor">
  219. <TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
  220. </TR>
  221. </TABLE>
  222. &nbsp;
  223. <P>
  224. <!-- ============ FIELD DETAIL =========== -->
  225. <A NAME="field_detail"><!-- --></A>
  226. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  227. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  228. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  229. <B>Field Detail</B></FONT></TH>
  230. </TR>
  231. </TABLE>
  232. <A NAME="names"><!-- --></A><H3>
  233. names</H3>
  234. <PRE>
  235. private final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[] <B>names</B></PRE>
  236. <DL>
  237. <DD>The filenames to search for
  238. <P>
  239. <DL>
  240. </DL>
  241. </DL>
  242. <HR>
  243. <A NAME="caseSensitivity"><!-- --></A><H3>
  244. caseSensitivity</H3>
  245. <PRE>
  246. private final <A HREF="../../../../../org/apache/commons/io/IOCase.html" title="class in org.apache.commons.io">IOCase</A> <B>caseSensitivity</B></PRE>
  247. <DL>
  248. <DD>Whether the comparison is case sensitive.
  249. <P>
  250. <DL>
  251. </DL>
  252. </DL>
  253. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  254. <A NAME="constructor_detail"><!-- --></A>
  255. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  256. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  257. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  258. <B>Constructor Detail</B></FONT></TH>
  259. </TR>
  260. </TABLE>
  261. <A NAME="NameFileFilter(java.lang.String)"><!-- --></A><H3>
  262. NameFileFilter</H3>
  263. <PRE>
  264. public <B>NameFileFilter</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</PRE>
  265. <DL>
  266. <DD>Constructs a new case-sensitive name file filter for a single name.
  267. <P>
  268. <DL>
  269. <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name to allow, must not be null
  270. <DT><B>Throws:</B>
  271. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the name is null</DL>
  272. </DL>
  273. <HR>
  274. <A NAME="NameFileFilter(java.lang.String, org.apache.commons.io.IOCase)"><!-- --></A><H3>
  275. NameFileFilter</H3>
  276. <PRE>
  277. public <B>NameFileFilter</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
  278. <A HREF="../../../../../org/apache/commons/io/IOCase.html" title="class in org.apache.commons.io">IOCase</A>&nbsp;caseSensitivity)</PRE>
  279. <DL>
  280. <DD>Construct a new name file filter specifying case-sensitivity.
  281. <P>
  282. <DL>
  283. <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name to allow, must not be null<DD><CODE>caseSensitivity</CODE> - how to handle case sensitivity, null means case-sensitive
  284. <DT><B>Throws:</B>
  285. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the name is null</DL>
  286. </DL>
  287. <HR>
  288. <A NAME="NameFileFilter(java.lang.String[])"><!-- --></A><H3>
  289. NameFileFilter</H3>
  290. <PRE>
  291. public <B>NameFileFilter</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]&nbsp;names)</PRE>
  292. <DL>
  293. <DD>Constructs a new case-sensitive name file filter for an array of names.
  294. <p>
  295. The array is not cloned, so could be changed after constructing the
  296. instance. This would be inadvisable however.
  297. <P>
  298. <DL>
  299. <DT><B>Parameters:</B><DD><CODE>names</CODE> - the names to allow, must not be null
  300. <DT><B>Throws:</B>
  301. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the names array is null</DL>
  302. </DL>
  303. <HR>
  304. <A NAME="NameFileFilter(java.lang.String[], org.apache.commons.io.IOCase)"><!-- --></A><H3>
  305. NameFileFilter</H3>
  306. <PRE>
  307. public <B>NameFileFilter</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]&nbsp;names,
  308. <A HREF="../../../../../org/apache/commons/io/IOCase.html" title="class in org.apache.commons.io">IOCase</A>&nbsp;caseSensitivity)</PRE>
  309. <DL>
  310. <DD>Constructs a new name file filter for an array of names specifying case-sensitivity.
  311. <p>
  312. The array is not cloned, so could be changed after constructing the
  313. instance. This would be inadvisable however.
  314. <P>
  315. <DL>
  316. <DT><B>Parameters:</B><DD><CODE>names</CODE> - the names to allow, must not be null<DD><CODE>caseSensitivity</CODE> - how to handle case sensitivity, null means case-sensitive
  317. <DT><B>Throws:</B>
  318. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the names array is null</DL>
  319. </DL>
  320. <HR>
  321. <A NAME="NameFileFilter(java.util.List)"><!-- --></A><H3>
  322. NameFileFilter</H3>
  323. <PRE>
  324. public <B>NameFileFilter</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;&nbsp;names)</PRE>
  325. <DL>
  326. <DD>Constructs a new case-sensitive name file filter for a list of names.
  327. <P>
  328. <DL>
  329. <DT><B>Parameters:</B><DD><CODE>names</CODE> - the names to allow, must not be null
  330. <DT><B>Throws:</B>
  331. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the name list is null
  332. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</A></CODE> - if the list does not contain Strings</DL>
  333. </DL>
  334. <HR>
  335. <A NAME="NameFileFilter(java.util.List, org.apache.commons.io.IOCase)"><!-- --></A><H3>
  336. NameFileFilter</H3>
  337. <PRE>
  338. public <B>NameFileFilter</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;&nbsp;names,
  339. <A HREF="../../../../../org/apache/commons/io/IOCase.html" title="class in org.apache.commons.io">IOCase</A>&nbsp;caseSensitivity)</PRE>
  340. <DL>
  341. <DD>Constructs a new name file filter for a list of names specifying case-sensitivity.
  342. <P>
  343. <DL>
  344. <DT><B>Parameters:</B><DD><CODE>names</CODE> - the names to allow, must not be null<DD><CODE>caseSensitivity</CODE> - how to handle case sensitivity, null means case-sensitive
  345. <DT><B>Throws:</B>
  346. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the name list is null
  347. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</A></CODE> - if the list does not contain Strings</DL>
  348. </DL>
  349. <!-- ============ METHOD DETAIL ========== -->
  350. <A NAME="method_detail"><!-- --></A>
  351. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  352. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  353. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  354. <B>Method Detail</B></FONT></TH>
  355. </TR>
  356. </TABLE>
  357. <A NAME="accept(java.io.File)"><!-- --></A><H3>
  358. accept</H3>
  359. <PRE>
  360. public boolean <B>accept</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;file)</PRE>
  361. <DL>
  362. <DD>Checks to see if the filename matches.
  363. <P>
  364. <DD><DL>
  365. <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileFilter.html?is-external=true#accept(java.io.File)" title="class or interface in java.io">accept</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileFilter.html?is-external=true" title="class or interface in java.io">FileFilter</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/io/filefilter/IOFileFilter.html#accept(java.io.File)">accept</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/commons/io/filefilter/AbstractFileFilter.html#accept(java.io.File)">accept</A></CODE> in class <CODE><A HREF="../../../../../org/apache/commons/io/filefilter/AbstractFileFilter.html" title="class in org.apache.commons.io.filefilter">AbstractFileFilter</A></CODE></DL>
  366. </DD>
  367. <DD><DL>
  368. <DT><B>Parameters:</B><DD><CODE>file</CODE> - the File to check
  369. <DT><B>Returns:</B><DD>true if the filename matches</DL>
  370. </DD>
  371. </DL>
  372. <HR>
  373. <A NAME="accept(java.io.File, java.lang.String)"><!-- --></A><H3>
  374. accept</H3>
  375. <PRE>
  376. public boolean <B>accept</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;file,
  377. <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</PRE>
  378. <DL>
  379. <DD>Checks to see if the filename matches.
  380. <P>
  381. <DD><DL>
  382. <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FilenameFilter.html?is-external=true#accept(java.io.File, java.lang.String)" title="class or interface in java.io">accept</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FilenameFilter.html?is-external=true" title="class or interface in java.io">FilenameFilter</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/io/filefilter/IOFileFilter.html#accept(java.io.File, java.lang.String)">accept</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/commons/io/filefilter/AbstractFileFilter.html#accept(java.io.File, java.lang.String)">accept</A></CODE> in class <CODE><A HREF="../../../../../org/apache/commons/io/filefilter/AbstractFileFilter.html" title="class in org.apache.commons.io.filefilter">AbstractFileFilter</A></CODE></DL>
  383. </DD>
  384. <DD><DL>
  385. <DT><B>Parameters:</B><DD><CODE>file</CODE> - the File directory<DD><CODE>name</CODE> - the filename
  386. <DT><B>Returns:</B><DD>true if the filename matches</DL>
  387. </DD>
  388. </DL>
  389. <HR>
  390. <A NAME="toString()"><!-- --></A><H3>
  391. toString</H3>
  392. <PRE>
  393. public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE>
  394. <DL>
  395. <DD>Provide a String representaion of this file filter.
  396. <P>
  397. <DD><DL>
  398. <DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/commons/io/filefilter/AbstractFileFilter.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../../../../org/apache/commons/io/filefilter/AbstractFileFilter.html" title="class in org.apache.commons.io.filefilter">AbstractFileFilter</A></CODE></DL>
  399. </DD>
  400. <DD><DL>
  401. <DT><B>Returns:</B><DD>a String representaion</DL>
  402. </DD>
  403. </DL>
  404. <!-- ========= END OF CLASS DATA ========= -->
  405. <HR>
  406. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  407. <A NAME="navbar_bottom"><!-- --></A>
  408. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  409. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  410. <TR>
  411. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  412. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  413. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  414. <TR ALIGN="center" VALIGN="top">
  415. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  416. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  417. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  418. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  419. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  420. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  421. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  422. </TR>
  423. </TABLE>
  424. </TD>
  425. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  426. </EM>
  427. </TD>
  428. </TR>
  429. <TR>
  430. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  431. &nbsp;<A HREF="../../../../../org/apache/commons/io/filefilter/MagicNumberFileFilter.html" title="class in org.apache.commons.io.filefilter"><B>PREV CLASS</B></A>&nbsp;
  432. &nbsp;<A HREF="../../../../../org/apache/commons/io/filefilter/NotFileFilter.html" title="class in org.apache.commons.io.filefilter"><B>NEXT CLASS</B></A></FONT></TD>
  433. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  434. <A HREF="../../../../../index.html?org/apache/commons/io/filefilter/NameFileFilter.html" target="_top"><B>FRAMES</B></A> &nbsp;
  435. &nbsp;<A HREF="NameFileFilter.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  436. &nbsp;<SCRIPT type="text/javascript">
  437. <!--
  438. if(window==top) {
  439. document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  440. }
  441. //-->
  442. </SCRIPT>
  443. <NOSCRIPT>
  444. <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
  445. </NOSCRIPT>
  446. </FONT></TD>
  447. </TR>
  448. <TR>
  449. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  450. 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>
  451. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  452. 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>
  453. </TR>
  454. </TABLE>
  455. <A NAME="skip-navbar_bottom"></A>
  456. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  457. <HR>
  458. Copyright (c) 2002-2010 Apache Software Foundation
  459. </BODY>
  460. </HTML>