diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2011-10-27 09:05:04 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2011-10-27 09:05:04 +0200 |
| commit | 0e645cf3b74144de8d10f7bc8eaa5e76530e1857 (patch) | |
| tree | 5d72c631e4a117828e8c43eb41e0f5fe5ab06f67 /main/src/cgeo/geocaching/cgCache.java | |
| parent | 863ebe9d98f0159fd542cbd8d5cffce0c047e45b (diff) | |
| download | cgeo-0e645cf3b74144de8d10f7bc8eaa5e76530e1857.zip cgeo-0e645cf3b74144de8d10f7bc8eaa5e76530e1857.tar.gz cgeo-0e645cf3b74144de8d10f7bc8eaa5e76530e1857.tar.bz2 | |
Use flags rather than 6 different booleans
This makes the code easier to read, as one can tell right away what is
being loaded.
Diffstat (limited to 'main/src/cgeo/geocaching/cgCache.java')
| -rw-r--r-- | main/src/cgeo/geocaching/cgCache.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/cgCache.java b/main/src/cgeo/geocaching/cgCache.java index 1479fec..61cd1a7 100644 --- a/main/src/cgeo/geocaching/cgCache.java +++ b/main/src/cgeo/geocaching/cgCache.java @@ -31,6 +31,17 @@ import java.util.regex.Pattern; */ public class cgCache implements ICache { + /** + * Cache loading parameters + */ + final public static int LOADATTRIBUTES = 1 << 0; + final public static int LOADWAYPOINTS = 1 << 1; + final public static int LOADSPOILERS = 1 << 2; + final public static int LOADLOGS = 1 << 3; + final public static int LOADINVENTORY = 1 << 4; + final public static int LOADOFFLINELOG = 1 << 5; + final public static int LOADALL = LOADATTRIBUTES | LOADWAYPOINTS | LOADSPOILERS | LOADLOGS | LOADINVENTORY | LOADOFFLINELOG; + public Long updated = null; public Long detailedUpdate = null; public Long visitedDate = null; |
