Author: scolebourne
Date: Sat Oct 14 07:24:29 2006
New Revision: 463941

URL: http://svn.apache.org/viewvc?view=rev&rev=463941
Log:
Javadoc and Group filter decoration methods together in the source file

Modified:
    
jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java

Modified: 
jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java?view=diff&rev=463941&r1=463940&r2=463941
==============================================================================
--- 
jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java
 (original)
+++ 
jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java
 Sat Oct 14 07:24:29 2006
@@ -168,56 +168,6 @@
     }
 
     //-----------------------------------------------------------------------
-
-    /* Constructed on demand and then cached */
-    private static IOFileFilter cvsFilter;
-
-    /* Constructed on demand and then cached */
-    private static IOFileFilter svnFilter;
-
-    /**
-     * Returns an IOFileFilter that ignores CVS directories. You may optionally
-     * pass in an existing IOFileFilter in which case it is extended to exclude
-     * CVS directories.
-     * @param filter IOFileFilter to wrap, null if a new IOFileFilter
-     * should be created
-     * @return the requested (combined) filter
-     * @since 1.1 (method existed but had bug in 1.0)
-     */
-    public static IOFileFilter makeCVSAware(IOFileFilter filter) {
-        if (cvsFilter == null) {
-            cvsFilter = notFileFilter(
-                andFileFilter(directoryFileFilter(), nameFileFilter("CVS")));
-        }
-        if (filter == null) {
-            return cvsFilter;
-        } else {
-            return andFileFilter(filter, cvsFilter);
-        }
-    }
-
-    /**
-     * Returns an IOFileFilter that ignores SVN directories. You may optionally
-     * pass in an existing IOFileFilter in which case it is extended to exclude
-     * SVN directories.
-     * @param filter IOFileFilter to wrap, null if a new IOFileFilter
-     * should be created
-     * @return the requested (combined) filter
-     * @since 1.1
-     */
-    public static IOFileFilter makeSVNAware(IOFileFilter filter) {
-        if (svnFilter == null) {
-            svnFilter = notFileFilter(
-                andFileFilter(directoryFileFilter(), nameFileFilter(".svn")));
-        }
-        if (filter == null) {
-            return svnFilter;
-        } else {
-            return andFileFilter(filter, svnFilter);
-        }
-    }
-
-    //-----------------------------------------------------------------------
     /**
      * Returns a filter that returns true if the file was last modified after
      * the specified cutoff time.
@@ -329,6 +279,55 @@
         IOFileFilter minimumFilter = new SizeFileFilter(minSizeInclusive, 
true);
         IOFileFilter maximumFilter = new SizeFileFilter(maxSizeInclusive + 1L, 
false);
         return new AndFileFilter(minimumFilter, maximumFilter);
+    }
+
+    //-----------------------------------------------------------------------
+    /* Constructed on demand and then cached */
+    private static IOFileFilter cvsFilter;
+
+    /* Constructed on demand and then cached */
+    private static IOFileFilter svnFilter;
+
+    /**
+     * Decorates a filter to make it ignore CVS directories.
+     * Passing in <code>null</code> will return a filter that accepts 
everything
+     * except CVS directories.
+     * 
+     * @param filter  the filter to decorate, null means an unrestricted filter
+     * @return the decorated filter, never null
+     * @since 1.1 (method existed but had bug in 1.0)
+     */
+    public static IOFileFilter makeCVSAware(IOFileFilter filter) {
+        if (cvsFilter == null) {
+            cvsFilter = notFileFilter(
+                andFileFilter(directoryFileFilter(), nameFileFilter("CVS")));
+        }
+        if (filter == null) {
+            return cvsFilter;
+        } else {
+            return andFileFilter(filter, cvsFilter);
+        }
+    }
+
+    /**
+     * Decorates a filter to make it ignore SVN directories.
+     * Passing in <code>null</code> will return a filter that accepts 
everything
+     * except SVN directories.
+     * 
+     * @param filter  the filter to decorate, null means an unrestricted filter
+     * @return the decorated filter, never null
+     * @since 1.1
+     */
+    public static IOFileFilter makeSVNAware(IOFileFilter filter) {
+        if (svnFilter == null) {
+            svnFilter = notFileFilter(
+                andFileFilter(directoryFileFilter(), nameFileFilter(".svn")));
+        }
+        if (filter == null) {
+            return svnFilter;
+        } else {
+            return andFileFilter(filter, svnFilter);
+        }
     }
 
     //-----------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to