/lib/commons-io/apidocs/org/apache/commons/io/comparator/NameFileComparator.html
HTML | 517 lines | 441 code | 52 blank | 24 comment | 0 complexity | 55cb21c7140ab58fb3ebc4088ab474e5 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-3-Clause, Apache-2.0
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>
7NameFileComparator (Commons IO 1.5-SNAPSHOT)
8</TITLE>
9
10<META NAME="date" CONTENT="2010-09-28">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17 if (location.href.indexOf('is-external=true') == -1) {
18 parent.document.title="NameFileComparator (Commons IO 1.5-SNAPSHOT)";
19 }
20}
21</SCRIPT>
22<NOSCRIPT>
23</NOSCRIPT>
24
25</HEAD>
26
27<BODY BGCOLOR="white" onload="windowTitle();">
28<HR>
29
30
31<!-- ========= START OF TOP NAVBAR ======= -->
32<A NAME="navbar_top"><!-- --></A>
33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35<TR>
36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37<A NAME="navbar_top_firstrow"><!-- --></A>
38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39 <TR ALIGN="center" VALIGN="top">
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
42 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
47 </TR>
48</TABLE>
49</TD>
50<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
51</EM>
52</TD>
53</TR>
54
55<TR>
56<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57 <A HREF="../../../../../org/apache/commons/io/comparator/LastModifiedFileComparator.html" title="class in org.apache.commons.io.comparator"><B>PREV CLASS</B></A>
58 <A HREF="../../../../../org/apache/commons/io/comparator/PathFileComparator.html" title="class in org.apache.commons.io.comparator"><B>NEXT CLASS</B></A></FONT></TD>
59<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
60 <A HREF="../../../../../index.html?org/apache/commons/io/comparator/NameFileComparator.html" target="_top"><B>FRAMES</B></A>
61 <A HREF="NameFileComparator.html" target="_top"><B>NO FRAMES</B></A>
62 <SCRIPT type="text/javascript">
63 <!--
64 if(window==top) {
65 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
66 }
67 //-->
68</SCRIPT>
69<NOSCRIPT>
70 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
71</NOSCRIPT>
72
73
74</FONT></TD>
75</TR>
76<TR>
77<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
79<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
81</TR>
82</TABLE>
83<A NAME="skip-navbar_top"></A>
84<!-- ========= END OF TOP NAVBAR ========= -->
85
86<HR>
87<!-- ======== START OF CLASS DATA ======== -->
88<H2>
89<FONT SIZE="-1">
90org.apache.commons.io.comparator</FONT>
91<BR>
92Class NameFileComparator</H2>
93<PRE>
94<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>
95 <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>
96 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.io.comparator.NameFileComparator</B>
97</PRE>
98<DL>
99<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><<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>></DD>
100</DL>
101<HR>
102<DL>
103<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>
104</PRE>
105
106<P>
107Compare 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>).
108 <p>
109 This comparator can be used to sort lists or arrays of files
110 by their name either in a case-sensitive, case-insensitive or
111 system dependant case sensitive way. A number of singleton instances
112 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>)
113 and the reverse of those options.
114 <p>
115 Example of a <i>case-sensitive</i> file name sort using the
116 <A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NAME_COMPARATOR"><CODE>NAME_COMPARATOR</CODE></A> singleton instance:
117 <pre>
118 List<File> list = ...
119 NameFileComparator.NAME_COMPARATOR.sort(list);
120 </pre>
121 <p>
122 Example of a <i>reverse case-insensitive</i> file name sort using the
123 <A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NAME_INSENSITIVE_REVERSE"><CODE>NAME_INSENSITIVE_REVERSE</CODE></A> singleton instance:
124 <pre>
125 File[] array = ...
126 NameFileComparator.NAME_INSENSITIVE_REVERSE.sort(array);
127 </pre>
128 <p>
129<P>
130
131<P>
132<DL>
133<DT><B>Since:</B></DT>
134 <DD>Commons IO 1.4</DD>
135<DT><B>Version:</B></DT>
136 <DD>$Revision: 723942 $ $Date: 2008-12-05 20:24:06 -0500 (Fri, 05 Dec 2008) $</DD>
137<DT><B>See Also:</B><DD><A HREF="../../../../../serialized-form.html#org.apache.commons.io.comparator.NameFileComparator">Serialized Form</A></DL>
138<HR>
139
140<P>
141<!-- =========== FIELD SUMMARY =========== -->
142
143<A NAME="field_summary"><!-- --></A>
144<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
145<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
146<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
147<B>Field Summary</B></FONT></TH>
148</TR>
149<TR BGCOLOR="white" CLASS="TableRowColor">
150<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
151<CODE>private <A HREF="../../../../../org/apache/commons/io/IOCase.html" title="class in org.apache.commons.io">IOCase</A></CODE></FONT></TD>
152<TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#caseSensitivity">caseSensitivity</A></B></CODE>
153
154<BR>
155 Whether the comparison is case sensitive.</TD>
156</TR>
157<TR BGCOLOR="white" CLASS="TableRowColor">
158<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
159<CODE>static <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><<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>></CODE></FONT></TD>
160<TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NAME_COMPARATOR">NAME_COMPARATOR</A></B></CODE>
161
162<BR>
163 Case-sensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#SENSITIVE"><CODE>IOCase.SENSITIVE</CODE></A>)</TD>
164</TR>
165<TR BGCOLOR="white" CLASS="TableRowColor">
166<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
167<CODE>static <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><<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>></CODE></FONT></TD>
168<TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NAME_INSENSITIVE_COMPARATOR">NAME_INSENSITIVE_COMPARATOR</A></B></CODE>
169
170<BR>
171 Case-insensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#INSENSITIVE"><CODE>IOCase.INSENSITIVE</CODE></A>)</TD>
172</TR>
173<TR BGCOLOR="white" CLASS="TableRowColor">
174<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
175<CODE>static <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><<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>></CODE></FONT></TD>
176<TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NAME_INSENSITIVE_REVERSE">NAME_INSENSITIVE_REVERSE</A></B></CODE>
177
178<BR>
179 Reverse case-insensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#INSENSITIVE"><CODE>IOCase.INSENSITIVE</CODE></A>)</TD>
180</TR>
181<TR BGCOLOR="white" CLASS="TableRowColor">
182<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
183<CODE>static <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><<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>></CODE></FONT></TD>
184<TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NAME_REVERSE">NAME_REVERSE</A></B></CODE>
185
186<BR>
187 Reverse case-sensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#SENSITIVE"><CODE>IOCase.SENSITIVE</CODE></A>)</TD>
188</TR>
189<TR BGCOLOR="white" CLASS="TableRowColor">
190<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
191<CODE>static <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><<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>></CODE></FONT></TD>
192<TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NAME_SYSTEM_COMPARATOR">NAME_SYSTEM_COMPARATOR</A></B></CODE>
193
194<BR>
195 System sensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#SYSTEM"><CODE>IOCase.SYSTEM</CODE></A>)</TD>
196</TR>
197<TR BGCOLOR="white" CLASS="TableRowColor">
198<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
199<CODE>static <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><<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>></CODE></FONT></TD>
200<TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NAME_SYSTEM_REVERSE">NAME_SYSTEM_REVERSE</A></B></CODE>
201
202<BR>
203 Reverse system sensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#SYSTEM"><CODE>IOCase.SYSTEM</CODE></A>)</TD>
204</TR>
205</TABLE>
206
207<!-- ======== CONSTRUCTOR SUMMARY ======== -->
208
209<A NAME="constructor_summary"><!-- --></A>
210<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
211<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
212<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
213<B>Constructor Summary</B></FONT></TH>
214</TR>
215<TR BGCOLOR="white" CLASS="TableRowColor">
216<TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#NameFileComparator()">NameFileComparator</A></B>()</CODE>
217
218<BR>
219 Construct a case sensitive file name comparator instance.</TD>
220</TR>
221<TR BGCOLOR="white" CLASS="TableRowColor">
222<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> caseSensitivity)</CODE>
223
224<BR>
225 Construct a file name comparator instance with the specified case-sensitivity.</TD>
226</TR>
227</TABLE>
228
229<!-- ========== METHOD SUMMARY =========== -->
230
231<A NAME="method_summary"><!-- --></A>
232<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
233<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
234<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
235<B>Method Summary</B></FONT></TH>
236</TR>
237<TR BGCOLOR="white" CLASS="TableRowColor">
238<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
239<CODE> int</CODE></FONT></TD>
240<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> file1,
241 <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> file2)</CODE>
242
243<BR>
244 Compare the names of two files with the specified case sensitivity.</TD>
245</TR>
246<TR BGCOLOR="white" CLASS="TableRowColor">
247<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
248<CODE> <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>
249<TD><CODE><B><A HREF="../../../../../org/apache/commons/io/comparator/NameFileComparator.html#toString()">toString</A></B>()</CODE>
250
251<BR>
252 String representation of this file comparator.</TD>
253</TR>
254</TABLE>
255 <A NAME="methods_inherited_from_class_org.apache.commons.io.comparator.AbstractFileComparator"><!-- --></A>
256<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
257<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
258<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>
259</TR>
260<TR BGCOLOR="white" CLASS="TableRowColor">
261<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>
262</TR>
263</TABLE>
264 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
265<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
266<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
267<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>
268</TR>
269<TR BGCOLOR="white" CLASS="TableRowColor">
270<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>
271</TR>
272</TABLE>
273 <A NAME="methods_inherited_from_class_java.util.Comparator"><!-- --></A>
274<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
275<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
276<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>
277</TR>
278<TR BGCOLOR="white" CLASS="TableRowColor">
279<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>
280</TR>
281</TABLE>
282
283<P>
284
285<!-- ============ FIELD DETAIL =========== -->
286
287<A NAME="field_detail"><!-- --></A>
288<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
289<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
290<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
291<B>Field Detail</B></FONT></TH>
292</TR>
293</TABLE>
294
295<A NAME="NAME_COMPARATOR"><!-- --></A><H3>
296NAME_COMPARATOR</H3>
297<PRE>
298public 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><<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>> <B>NAME_COMPARATOR</B></PRE>
299<DL>
300<DD>Case-sensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#SENSITIVE"><CODE>IOCase.SENSITIVE</CODE></A>)
301<P>
302<DL>
303</DL>
304</DL>
305<HR>
306
307<A NAME="NAME_REVERSE"><!-- --></A><H3>
308NAME_REVERSE</H3>
309<PRE>
310public 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><<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>> <B>NAME_REVERSE</B></PRE>
311<DL>
312<DD>Reverse case-sensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#SENSITIVE"><CODE>IOCase.SENSITIVE</CODE></A>)
313<P>
314<DL>
315</DL>
316</DL>
317<HR>
318
319<A NAME="NAME_INSENSITIVE_COMPARATOR"><!-- --></A><H3>
320NAME_INSENSITIVE_COMPARATOR</H3>
321<PRE>
322public 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><<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>> <B>NAME_INSENSITIVE_COMPARATOR</B></PRE>
323<DL>
324<DD>Case-insensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#INSENSITIVE"><CODE>IOCase.INSENSITIVE</CODE></A>)
325<P>
326<DL>
327</DL>
328</DL>
329<HR>
330
331<A NAME="NAME_INSENSITIVE_REVERSE"><!-- --></A><H3>
332NAME_INSENSITIVE_REVERSE</H3>
333<PRE>
334public 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><<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>> <B>NAME_INSENSITIVE_REVERSE</B></PRE>
335<DL>
336<DD>Reverse case-insensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#INSENSITIVE"><CODE>IOCase.INSENSITIVE</CODE></A>)
337<P>
338<DL>
339</DL>
340</DL>
341<HR>
342
343<A NAME="NAME_SYSTEM_COMPARATOR"><!-- --></A><H3>
344NAME_SYSTEM_COMPARATOR</H3>
345<PRE>
346public 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><<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>> <B>NAME_SYSTEM_COMPARATOR</B></PRE>
347<DL>
348<DD>System sensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#SYSTEM"><CODE>IOCase.SYSTEM</CODE></A>)
349<P>
350<DL>
351</DL>
352</DL>
353<HR>
354
355<A NAME="NAME_SYSTEM_REVERSE"><!-- --></A><H3>
356NAME_SYSTEM_REVERSE</H3>
357<PRE>
358public 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><<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>> <B>NAME_SYSTEM_REVERSE</B></PRE>
359<DL>
360<DD>Reverse system sensitive name comparator instance (see <A HREF="../../../../../org/apache/commons/io/IOCase.html#SYSTEM"><CODE>IOCase.SYSTEM</CODE></A>)
361<P>
362<DL>
363</DL>
364</DL>
365<HR>
366
367<A NAME="caseSensitivity"><!-- --></A><H3>
368caseSensitivity</H3>
369<PRE>
370private final <A HREF="../../../../../org/apache/commons/io/IOCase.html" title="class in org.apache.commons.io">IOCase</A> <B>caseSensitivity</B></PRE>
371<DL>
372<DD>Whether the comparison is case sensitive.
373<P>
374<DL>
375</DL>
376</DL>
377
378<!-- ========= CONSTRUCTOR DETAIL ======== -->
379
380<A NAME="constructor_detail"><!-- --></A>
381<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
382<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
383<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
384<B>Constructor Detail</B></FONT></TH>
385</TR>
386</TABLE>
387
388<A NAME="NameFileComparator()"><!-- --></A><H3>
389NameFileComparator</H3>
390<PRE>
391public <B>NameFileComparator</B>()</PRE>
392<DL>
393<DD>Construct a case sensitive file name comparator instance.
394<P>
395</DL>
396<HR>
397
398<A NAME="NameFileComparator(org.apache.commons.io.IOCase)"><!-- --></A><H3>
399NameFileComparator</H3>
400<PRE>
401public <B>NameFileComparator</B>(<A HREF="../../../../../org/apache/commons/io/IOCase.html" title="class in org.apache.commons.io">IOCase</A> caseSensitivity)</PRE>
402<DL>
403<DD>Construct a file name comparator instance with the specified case-sensitivity.
404<P>
405<DL>
406<DT><B>Parameters:</B><DD><CODE>caseSensitivity</CODE> - how to handle case sensitivity, null means case-sensitive</DL>
407</DL>
408
409<!-- ============ METHOD DETAIL ========== -->
410
411<A NAME="method_detail"><!-- --></A>
412<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
413<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
414<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
415<B>Method Detail</B></FONT></TH>
416</TR>
417</TABLE>
418
419<A NAME="compare(java.io.File, java.io.File)"><!-- --></A><H3>
420compare</H3>
421<PRE>
422public 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> file1,
423 <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> file2)</PRE>
424<DL>
425<DD>Compare the names of two files with the specified case sensitivity.
426<P>
427<DD><DL>
428<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><<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>></CODE></DL>
429</DD>
430<DD><DL>
431<DT><B>Parameters:</B><DD><CODE>file1</CODE> - The first file to compare<DD><CODE>file2</CODE> - The second file to compare
432<DT><B>Returns:</B><DD>a negative value if the first file's name
433 is less than the second, zero if the names are the
434 same and a positive value if the first files name
435 is greater than the second file.</DL>
436</DD>
437</DL>
438<HR>
439
440<A NAME="toString()"><!-- --></A><H3>
441toString</H3>
442<PRE>
443public <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>
444<DL>
445<DD>String representation of this file comparator.
446<P>
447<DD><DL>
448<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>
449</DD>
450<DD><DL>
451
452<DT><B>Returns:</B><DD>String representation of this file comparator</DL>
453</DD>
454</DL>
455<!-- ========= END OF CLASS DATA ========= -->
456<HR>
457
458
459<!-- ======= START OF BOTTOM NAVBAR ====== -->
460<A NAME="navbar_bottom"><!-- --></A>
461<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
462<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
463<TR>
464<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
465<A NAME="navbar_bottom_firstrow"><!-- --></A>
466<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
467 <TR ALIGN="center" VALIGN="top">
468 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
469 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
470 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
471 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
472 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
473 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
474 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
475 </TR>
476</TABLE>
477</TD>
478<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
479</EM>
480</TD>
481</TR>
482
483<TR>
484<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
485 <A HREF="../../../../../org/apache/commons/io/comparator/LastModifiedFileComparator.html" title="class in org.apache.commons.io.comparator"><B>PREV CLASS</B></A>
486 <A HREF="../../../../../org/apache/commons/io/comparator/PathFileComparator.html" title="class in org.apache.commons.io.comparator"><B>NEXT CLASS</B></A></FONT></TD>
487<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
488 <A HREF="../../../../../index.html?org/apache/commons/io/comparator/NameFileComparator.html" target="_top"><B>FRAMES</B></A>
489 <A HREF="NameFileComparator.html" target="_top"><B>NO FRAMES</B></A>
490 <SCRIPT type="text/javascript">
491 <!--
492 if(window==top) {
493 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
494 }
495 //-->
496</SCRIPT>
497<NOSCRIPT>
498 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
499</NOSCRIPT>
500
501
502</FONT></TD>
503</TR>
504<TR>
505<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
506 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
507<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
508DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
509</TR>
510</TABLE>
511<A NAME="skip-navbar_bottom"></A>
512<!-- ======== END OF BOTTOM NAVBAR ======= -->
513
514<HR>
515Copyright (c) 2002-2010 Apache Software Foundation
516</BODY>
517</HTML>