diff options
| author | SammysHP <sven@sammyshp.de> | 2011-09-14 21:42:32 +0200 |
|---|---|---|
| committer | SammysHP <sven@sammyshp.de> | 2011-09-14 21:42:32 +0200 |
| commit | 4f7c67407019de18fd53b640edb9682a346fbfef (patch) | |
| tree | 5a1d10843e8f5104e4202211f4792b5bfe830cb6 /src/cgeo/geocaching/sorting/StateComparator.java | |
| parent | 90e7bf968f6722b8df8b884f37617e7fc78901b5 (diff) | |
| download | cgeo-4f7c67407019de18fd53b640edb9682a346fbfef.zip cgeo-4f7c67407019de18fd53b640edb9682a346fbfef.tar.gz cgeo-4f7c67407019de18fd53b640edb9682a346fbfef.tar.bz2 | |
Formatting
Diffstat (limited to 'src/cgeo/geocaching/sorting/StateComparator.java')
| -rw-r--r-- | src/cgeo/geocaching/sorting/StateComparator.java | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/cgeo/geocaching/sorting/StateComparator.java b/src/cgeo/geocaching/sorting/StateComparator.java index 787af5a..232fa92 100644 --- a/src/cgeo/geocaching/sorting/StateComparator.java +++ b/src/cgeo/geocaching/sorting/StateComparator.java @@ -4,29 +4,29 @@ import cgeo.geocaching.cgCache; /** * sort caches by state (normal, disabled, archived) - * + * */ public class StateComparator extends AbstractCacheComparator implements - CacheComparator { + CacheComparator { - @Override - protected boolean canCompare(final cgCache cache1, final cgCache cache2) { - return true; - } + @Override + protected boolean canCompare(final cgCache cache1, final cgCache cache2) { + return true; + } - @Override - protected int compareCaches(final cgCache cache1, final cgCache cache2) { - return getState(cache1) - getState(cache2); - } + @Override + protected int compareCaches(final cgCache cache1, final cgCache cache2) { + return getState(cache1) - getState(cache2); + } - private static int getState(final cgCache cache) { - if (cache.disabled) { - return 1; - } - if (cache.archived) { - return 2; - } - return 0; - } + private static int getState(final cgCache cache) { + if (cache.disabled) { + return 1; + } + if (cache.archived) { + return 2; + } + return 0; + } } |
