/lib/commons-io/apidocs/org/apache/commons/io/comparator/NameFileComparator.html

https://bitbucket.org/arkban/somersault · HTML · 517 lines · 441 code · 52 blank · 24 comment · 0 complexity · 55cb21c7140ab58fb3ebc4088ab474e5 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. NameFileComparator (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="NameFileComparator (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/comparator/LastModifiedFileComparator.html" title="class in org.apache.commons.io.comparator"><B>PREV CLASS</B></A>&nbsp;
  50. &nbsp;<A HREF="../../../../../org/apache/commons/io/comparator/PathFileComparator.html" title="class in org.apache.commons.io.comparator"><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/comparator/NameFileComparator.html" target="_top"><B>FRAMES</B></A> &nbsp;
  53. &nbsp;<A HREF="NameFileComparator.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.comparator</FONT>
  80. <BR>
  81. Class NameFileComparator</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/comparator/AbstractFileComparator.html" title="class in org.apache.commons.io.comparator">org.apache.commons.io.comparator.AbstractFileComparator</A>
  85. <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.io.comparator.NameFileComparator</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/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&lt;<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>&gt;</DD>
  89. </DL>
  90. <HR>
  91. <DL>
  92. <DT><PRE>public class <B>NameFileComparator</B><DT>extends <A HREF="../../../../../org/apache/commons/io/comparator/AbstractFileComparator.html" title="class in org.apache.commons.io.comparator">AbstractFileComparator</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. Compare the <b>names</b> of two files for order (see <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html?is-external=true#getName()" title="class or interface in java.io"><CODE>File.getName()</CODE></A>).
  96. <p>
  97. This comparator can be used to sort lists or arrays of files
  98. by their name either in a case-sensitive, case-insensitive or
  99. system dependant case sensitive way. A number of singleton instances
  100. are provided for the various case sensitivity options (using <A HREF="../../../../../org/apache/commons/io/IOCase.html" title="class in org.apache.commons.io"><CODE>IOCase</CODE></A>)
  101. and the reverse of those options.
  102. <p>
  103. Example of a <i>case-sensitive</i> file name sort using the
  104. <A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NAME_COMPARATOR"><CODE>NAME_COMPARATOR</CODE></A> singleton instance:
  105. <pre>
  106. List&lt;File&gt; list = ...
  107. NameFileComparator.NAME_COMPARATOR.sort(list);
  108. </pre>
  109. <p>
  110. Example of a <i>reverse case-insensitive</i> file name sort using the
  111. <A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NAME_INSENSITIVE_REVERSE"><CODE>NAME_INSENSITIVE_REVERSE</CODE></A> singleton instance:
  112. <pre>
  113. File[] array = ...
  114. NameFileComparator.NAME_INSENSITIVE_REVERSE.sort(array);
  115. </pre>
  116. <p>
  117. <P>
  118. <P>
  119. <DL>
  120. <DT><B>Since:</B></DT>
  121. <DD>Commons IO 1.4</DD>
  122. <DT><B>Version:</B></DT>
  123. <DD>$Revision: 723942 $ $Date: 2008-12-05 20:24:06 -0500 (Fri, 05 Dec 2008) $</DD>
  124. <DT><B>See Also:</B><DD><A HREF="../../../../../serialized-form.html#org.apache.commons.io.comparator.NameFileComparator">Serialized Form</A></DL>
  125. <HR>
  126. <P>
  127. <!-- =========== FIELD SUMMARY =========== -->
  128. <A NAME="field_summary"><!-- --></A>
  129. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  130. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  131. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  132. <B>Field Summary</B></FONT></TH>
  133. </TR>
  134. <TR BGCOLOR="white" CLASS="TableRowColor">
  135. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  136. <CODE>private &nbsp;<A HREF="../../../../../org/apache/commons/io/IOCase.html" title="class in org.apache.commons.io">IOCase</A></CODE></FONT></TD>
  137. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#caseSensitivity">caseSensitivity</A></B></CODE>
  138. <BR>
  139. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether the comparison is case sensitive.</TD>
  140. </TR>
  141. <TR BGCOLOR="white" CLASS="TableRowColor">
  142. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  143. <CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&lt;<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>&gt;</CODE></FONT></TD>
  144. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NAME_COMPARATOR">NAME_COMPARATOR</A></B></CODE>
  145. <BR>
  146. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case-sensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#SENSITIVE"><CODE>IOCase.SENSITIVE</CODE></A>)</TD>
  147. </TR>
  148. <TR BGCOLOR="white" CLASS="TableRowColor">
  149. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  150. <CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&lt;<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>&gt;</CODE></FONT></TD>
  151. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NAME_INSENSITIVE_COMPARATOR">NAME_INSENSITIVE_COMPARATOR</A></B></CODE>
  152. <BR>
  153. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case-insensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#INSENSITIVE"><CODE>IOCase.INSENSITIVE</CODE></A>)</TD>
  154. </TR>
  155. <TR BGCOLOR="white" CLASS="TableRowColor">
  156. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  157. <CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&lt;<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>&gt;</CODE></FONT></TD>
  158. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NAME_INSENSITIVE_REVERSE">NAME_INSENSITIVE_REVERSE</A></B></CODE>
  159. <BR>
  160. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reverse case-insensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#INSENSITIVE"><CODE>IOCase.INSENSITIVE</CODE></A>)</TD>
  161. </TR>
  162. <TR BGCOLOR="white" CLASS="TableRowColor">
  163. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  164. <CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&lt;<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>&gt;</CODE></FONT></TD>
  165. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NAME_REVERSE">NAME_REVERSE</A></B></CODE>
  166. <BR>
  167. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reverse case-sensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#SENSITIVE"><CODE>IOCase.SENSITIVE</CODE></A>)</TD>
  168. </TR>
  169. <TR BGCOLOR="white" CLASS="TableRowColor">
  170. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  171. <CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&lt;<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>&gt;</CODE></FONT></TD>
  172. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NAME_SYSTEM_COMPARATOR">NAME_SYSTEM_COMPARATOR</A></B></CODE>
  173. <BR>
  174. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System sensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#SYSTEM"><CODE>IOCase.SYSTEM</CODE></A>)</TD>
  175. </TR>
  176. <TR BGCOLOR="white" CLASS="TableRowColor">
  177. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  178. <CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&lt;<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>&gt;</CODE></FONT></TD>
  179. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NAME_SYSTEM_REVERSE">NAME_SYSTEM_REVERSE</A></B></CODE>
  180. <BR>
  181. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reverse system sensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#SYSTEM"><CODE>IOCase.SYSTEM</CODE></A>)</TD>
  182. </TR>
  183. </TABLE>
  184. &nbsp;
  185. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  186. <A NAME="constructor_summary"><!-- --></A>
  187. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  188. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  189. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  190. <B>Constructor Summary</B></FONT></TH>
  191. </TR>
  192. <TR BGCOLOR="white" CLASS="TableRowColor">
  193. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NameFileComparator()">NameFileComparator</A></B>()</CODE>
  194. <BR>
  195. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a case sensitive file name comparator instance.</TD>
  196. </TR>
  197. <TR BGCOLOR="white" CLASS="TableRowColor">
  198. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NameFileComparator(org.apache.commons.io.IOCase)">NameFileComparator</A></B>(<A HREF="../../../../../org/apache/commons/io/IOCase.html" title="class in org.apache.commons.io">IOCase</A>&nbsp;caseSensitivity)</CODE>
  199. <BR>
  200. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a file name comparator instance with the specified case-sensitivity.</TD>
  201. </TR>
  202. </TABLE>
  203. &nbsp;
  204. <!-- ========== METHOD SUMMARY =========== -->
  205. <A NAME="method_summary"><!-- --></A>
  206. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  207. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  208. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  209. <B>Method Summary</B></FONT></TH>
  210. </TR>
  211. <TR BGCOLOR="white" CLASS="TableRowColor">
  212. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  213. <CODE>&nbsp;int</CODE></FONT></TD>
  214. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#compare(java.io.File, java.io.File)">compare</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;file1,
  215. <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;file2)</CODE>
  216. <BR>
  217. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compare the names of two files with the specified case sensitivity.</TD>
  218. </TR>
  219. <TR BGCOLOR="white" CLASS="TableRowColor">
  220. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  221. <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>
  222. <TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#toString()">toString</A></B>()</CODE>
  223. <BR>
  224. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String representation of this file comparator.</TD>
  225. </TR>
  226. </TABLE>
  227. &nbsp;<A NAME="methods_inherited_from_class_org.apache.commons.io.comparator.AbstractFileComparator"><!-- --></A>
  228. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  229. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  230. <TH ALIGN="left"><B>Methods inherited from class org.apache.commons.io.comparator.<A HREF="../../../../../org/apache/commons/io/comparator/AbstractFileComparator.html" title="class in org.apache.commons.io.comparator">AbstractFileComparator</A></B></TH>
  231. </TR>
  232. <TR BGCOLOR="white" CLASS="TableRowColor">
  233. <TD><CODE><A HREF="../../../../../org/apache/commons/io/comparator/AbstractFileComparator.html#sort(java.io.File...)">sort</A>, <A HREF="../../../../../org/apache/commons/io/comparator/AbstractFileComparator.html#sort(java.util.List)">sort</A></CODE></TD>
  234. </TR>
  235. </TABLE>
  236. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  237. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  238. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  239. <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>
  240. </TR>
  241. <TR BGCOLOR="white" CLASS="TableRowColor">
  242. <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>
  243. </TR>
  244. </TABLE>
  245. &nbsp;<A NAME="methods_inherited_from_class_java.util.Comparator"><!-- --></A>
  246. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  247. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  248. <TH ALIGN="left"><B>Methods inherited from interface java.util.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A></B></TH>
  249. </TR>
  250. <TR BGCOLOR="white" CLASS="TableRowColor">
  251. <TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util">equals</A></CODE></TD>
  252. </TR>
  253. </TABLE>
  254. &nbsp;
  255. <P>
  256. <!-- ============ FIELD DETAIL =========== -->
  257. <A NAME="field_detail"><!-- --></A>
  258. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  259. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  260. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  261. <B>Field Detail</B></FONT></TH>
  262. </TR>
  263. </TABLE>
  264. <A NAME="NAME_COMPARATOR"><!-- --></A><H3>
  265. NAME_COMPARATOR</H3>
  266. <PRE>
  267. public static final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&lt;<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>&gt; <B>NAME_COMPARATOR</B></PRE>
  268. <DL>
  269. <DD>Case-sensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#SENSITIVE"><CODE>IOCase.SENSITIVE</CODE></A>)
  270. <P>
  271. <DL>
  272. </DL>
  273. </DL>
  274. <HR>
  275. <A NAME="NAME_REVERSE"><!-- --></A><H3>
  276. NAME_REVERSE</H3>
  277. <PRE>
  278. public static final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&lt;<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>&gt; <B>NAME_REVERSE</B></PRE>
  279. <DL>
  280. <DD>Reverse case-sensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#SENSITIVE"><CODE>IOCase.SENSITIVE</CODE></A>)
  281. <P>
  282. <DL>
  283. </DL>
  284. </DL>
  285. <HR>
  286. <A NAME="NAME_INSENSITIVE_COMPARATOR"><!-- --></A><H3>
  287. NAME_INSENSITIVE_COMPARATOR</H3>
  288. <PRE>
  289. public static final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&lt;<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>&gt; <B>NAME_INSENSITIVE_COMPARATOR</B></PRE>
  290. <DL>
  291. <DD>Case-insensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#INSENSITIVE"><CODE>IOCase.INSENSITIVE</CODE></A>)
  292. <P>
  293. <DL>
  294. </DL>
  295. </DL>
  296. <HR>
  297. <A NAME="NAME_INSENSITIVE_REVERSE"><!-- --></A><H3>
  298. NAME_INSENSITIVE_REVERSE</H3>
  299. <PRE>
  300. public static final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&lt;<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>&gt; <B>NAME_INSENSITIVE_REVERSE</B></PRE>
  301. <DL>
  302. <DD>Reverse case-insensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#INSENSITIVE"><CODE>IOCase.INSENSITIVE</CODE></A>)
  303. <P>
  304. <DL>
  305. </DL>
  306. </DL>
  307. <HR>
  308. <A NAME="NAME_SYSTEM_COMPARATOR"><!-- --></A><H3>
  309. NAME_SYSTEM_COMPARATOR</H3>
  310. <PRE>
  311. public static final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&lt;<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>&gt; <B>NAME_SYSTEM_COMPARATOR</B></PRE>
  312. <DL>
  313. <DD>System sensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#SYSTEM"><CODE>IOCase.SYSTEM</CODE></A>)
  314. <P>
  315. <DL>
  316. </DL>
  317. </DL>
  318. <HR>
  319. <A NAME="NAME_SYSTEM_REVERSE"><!-- --></A><H3>
  320. NAME_SYSTEM_REVERSE</H3>
  321. <PRE>
  322. public static final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&lt;<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>&gt; <B>NAME_SYSTEM_REVERSE</B></PRE>
  323. <DL>
  324. <DD>Reverse system sensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#SYSTEM"><CODE>IOCase.SYSTEM</CODE></A>)
  325. <P>
  326. <DL>
  327. </DL>
  328. </DL>
  329. <HR>
  330. <A NAME="caseSensitivity"><!-- --></A><H3>
  331. caseSensitivity</H3>
  332. <PRE>
  333. private final <A HREF="../../../../../org/apache/commons/io/IOCase.html" title="class in org.apache.commons.io">IOCase</A> <B>caseSensitivity</B></PRE>
  334. <DL>
  335. <DD>Whether the comparison is case sensitive.
  336. <P>
  337. <DL>
  338. </DL>
  339. </DL>
  340. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  341. <A NAME="constructor_detail"><!-- --></A>
  342. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  343. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  344. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  345. <B>Constructor Detail</B></FONT></TH>
  346. </TR>
  347. </TABLE>
  348. <A NAME="NameFileComparator()"><!-- --></A><H3>
  349. NameFileComparator</H3>
  350. <PRE>
  351. public <B>NameFileComparator</B>()</PRE>
  352. <DL>
  353. <DD>Construct a case sensitive file name comparator instance.
  354. <P>
  355. </DL>
  356. <HR>
  357. <A NAME="NameFileComparator(org.apache.commons.io.IOCase)"><!-- --></A><H3>
  358. NameFileComparator</H3>
  359. <PRE>
  360. public <B>NameFileComparator</B>(<A HREF="../../../../../org/apache/commons/io/IOCase.html" title="class in org.apache.commons.io">IOCase</A>&nbsp;caseSensitivity)</PRE>
  361. <DL>
  362. <DD>Construct a file name comparator instance with the specified case-sensitivity.
  363. <P>
  364. <DL>
  365. <DT><B>Parameters:</B><DD><CODE>caseSensitivity</CODE> - how to handle case sensitivity, null means case-sensitive</DL>
  366. </DL>
  367. <!-- ============ METHOD DETAIL ========== -->
  368. <A NAME="method_detail"><!-- --></A>
  369. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  370. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  371. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  372. <B>Method Detail</B></FONT></TH>
  373. </TR>
  374. </TABLE>
  375. <A NAME="compare(java.io.File, java.io.File)"><!-- --></A><H3>
  376. compare</H3>
  377. <PRE>
  378. public int <B>compare</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;file1,
  379. <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;file2)</PRE>
  380. <DL>
  381. <DD>Compare the names of two files with the specified case sensitivity.
  382. <P>
  383. <DD><DL>
  384. <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true#compare(T, T)" title="class or interface in java.util">compare</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>&lt;<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>&gt;</CODE></DL>
  385. </DD>
  386. <DD><DL>
  387. <DT><B>Parameters:</B><DD><CODE>file1</CODE> - The first file to compare<DD><CODE>file2</CODE> - The second file to compare
  388. <DT><B>Returns:</B><DD>a negative value if the first file's name
  389. is less than the second, zero if the names are the
  390. same and a positive value if the first files name
  391. is greater than the second file.</DL>
  392. </DD>
  393. </DL>
  394. <HR>
  395. <A NAME="toString()"><!-- --></A><H3>
  396. toString</H3>
  397. <PRE>
  398. 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>
  399. <DL>
  400. <DD>String representation of this file comparator.
  401. <P>
  402. <DD><DL>
  403. <DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/commons/io/comparator/AbstractFileComparator.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../../../../org/apache/commons/io/comparator/AbstractFileComparator.html" title="class in org.apache.commons.io.comparator">AbstractFileComparator</A></CODE></DL>
  404. </DD>
  405. <DD><DL>
  406. <DT><B>Returns:</B><DD>String representation of this file comparator</DL>
  407. </DD>
  408. </DL>
  409. <!-- ========= END OF CLASS DATA ========= -->
  410. <HR>
  411. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  412. <A NAME="navbar_bottom"><!-- --></A>
  413. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  414. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  415. <TR>
  416. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  417. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  418. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  419. <TR ALIGN="center" VALIGN="top">
  420. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  421. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  422. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  423. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  424. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  425. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  426. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  427. </TR>
  428. </TABLE>
  429. </TD>
  430. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  431. </EM>
  432. </TD>
  433. </TR>
  434. <TR>
  435. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  436. &nbsp;<A HREF="../../../../../org/apache/commons/io/comparator/LastModifiedFileComparator.html" title="class in org.apache.commons.io.comparator"><B>PREV CLASS</B></A>&nbsp;
  437. &nbsp;<A HREF="../../../../../org/apache/commons/io/comparator/PathFileComparator.html" title="class in org.apache.commons.io.comparator"><B>NEXT CLASS</B></A></FONT></TD>
  438. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  439. <A HREF="../../../../../index.html?org/apache/commons/io/comparator/NameFileComparator.html" target="_top"><B>FRAMES</B></A> &nbsp;
  440. &nbsp;<A HREF="NameFileComparator.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  441. &nbsp;<SCRIPT type="text/javascript">
  442. <!--
  443. if(window==top) {
  444. document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  445. }
  446. //-->
  447. </SCRIPT>
  448. <NOSCRIPT>
  449. <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
  450. </NOSCRIPT>
  451. </FONT></TD>
  452. </TR>
  453. <TR>
  454. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  455. 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>
  456. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  457. 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>
  458. </TR>
  459. </TABLE>
  460. <A NAME="skip-navbar_bottom"></A>
  461. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  462. <HR>
  463. Copyright (c) 2002-2010 Apache Software Foundation
  464. </BODY>
  465. </HTML>