camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [13/13] camel git commit: CAMEL-8732: Remove methods that are not in use nor possible to use as-is due generics with ? is not applicable for being used by the file/ftp components.
Date Sun, 03 May 2015 09:04:07 GMT
CAMEL-8732: Remove methods that are not in use nor possible to use as-is due generics with
? is not applicable for being used by the file/ftp components.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d58024b4
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d58024b4
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d58024b4

Branch: refs/heads/master
Commit: d58024b4966a6905a8dc38404fb659007786c67e
Parents: 51f8742
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sun May 3 11:06:39 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun May 3 11:06:39 2015 +0200

----------------------------------------------------------------------
 .../file/GenericFileDefaultSorter.java          | 57 --------------------
 1 file changed, 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d58024b4/camel-core/src/main/java/org/apache/camel/component/file/GenericFileDefaultSorter.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileDefaultSorter.java
b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileDefaultSorter.java
index 2e7f1e5..cc3bc9d 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileDefaultSorter.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileDefaultSorter.java
@@ -33,63 +33,6 @@ public final class GenericFileDefaultSorter {
     }
 
     /**
-     * Returns a new sort by name
-     */
-    public static Comparator<GenericFile<?>> sortByName(final boolean reverse)
{
-        return new Comparator<GenericFile<?>>() {
-            public int compare(GenericFile<?> o1, GenericFile<?> o2) {
-                int answer = o1.getFileName().compareTo(o2.getFileName());
-                return reverse ? -1 * answer : answer;
-            }
-        };
-    }
-
-    /**
-     * Returns a new sort by path name
-     */
-    public static Comparator<GenericFile<?>> sortByPathName(final boolean reverse)
{
-        return new Comparator<GenericFile<?>>() {
-            public int compare(GenericFile<?> o1, GenericFile<?> o2) {
-                int answer = o1.getParent().compareTo(o2.getParent());
-                return reverse ? -1 * answer : answer;
-            }
-        };
-    }
-
-    /**
-     * Returns a new sort by last modified (newest first)
-     */
-    public static Comparator<GenericFile<?>> sortByLastModified(
-            final boolean reverse) {
-        return new Comparator<GenericFile<?>>() {
-            public int compare(GenericFile<?> o1, GenericFile<?> o2) {
-                long delta = o1.getLastModified() - o2.getLastModified();
-                if (delta == 0) {
-                    return 0;
-                }
-                int answer = delta > 0 ? 1 : -1;
-                return reverse ? -1 * answer : answer;
-            }
-        };
-    }
-
-    /**
-     * Returns a new sort by file size (smallest first)
-     */
-    public static Comparator<GenericFile<?>> sortBySize(final boolean reverse)
{
-        return new Comparator<GenericFile<?>>() {
-            public int compare(GenericFile<?> o1, GenericFile<?> o2) {
-                long delta = o1.getFileLength() - o2.getFileLength();
-                if (delta == 0) {
-                    return 0;
-                }
-                int answer = delta > 0 ? 1 : -1;
-                return reverse ? -1 * answer : answer;
-            }
-        };
-    }
-
-    /**
      * Returns a new sory by file language expression
      *
      * @param context    the camel context


Mime
View raw message