diff options
| author | Karsten Priegnitz <koem@petoria.de> | 2011-09-15 14:08:44 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2011-09-15 14:08:44 +0200 |
| commit | a97f03151faed72242a99b70b7f2277e0731c802 (patch) | |
| tree | fa545125a7c06bf3dfae80a320846ba7b864c658 /src/cgeo/geocaching/cgCache.java | |
| parent | 6e02f9ed6e13ad42b34eb066740b20cf7bda803f (diff) | |
| download | cgeo-a97f03151faed72242a99b70b7f2277e0731c802.zip cgeo-a97f03151faed72242a99b70b7f2277e0731c802.tar.gz cgeo-a97f03151faed72242a99b70b7f2277e0731c802.tar.bz2 | |
Cache size: using constants, not strings
Diffstat (limited to 'src/cgeo/geocaching/cgCache.java')
| -rw-r--r-- | src/cgeo/geocaching/cgCache.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cgeo/geocaching/cgCache.java b/src/cgeo/geocaching/cgCache.java index 4a2243d..68aaf49 100644 --- a/src/cgeo/geocaching/cgCache.java +++ b/src/cgeo/geocaching/cgCache.java @@ -3,6 +3,7 @@ package cgeo.geocaching; import cgeo.geocaching.activity.IAbstractActivity; import cgeo.geocaching.connector.ConnectorFactory; import cgeo.geocaching.connector.IConnector; +import cgeo.geocaching.enumerations.CacheSize; import cgeo.geocaching.geopoint.Geopoint; import org.apache.commons.lang3.StringUtils; @@ -46,7 +47,7 @@ public class cgCache implements ICache { public String ownerReal = ""; public Date hidden = null; public String hint = ""; - public String size = ""; + public CacheSize size = null; public Float difficulty = Float.valueOf(0); public Float terrain = Float.valueOf(0); public Float direction = null; @@ -138,7 +139,7 @@ public class cgCache implements ICache { if (StringUtils.isBlank(hint)) { hint = other.hint; } - if (StringUtils.isBlank(size)) { + if (size == null) { size = other.size; } if (difficulty == null || difficulty == 0) { @@ -398,7 +399,7 @@ public class cgCache implements ICache { } @Override - public String getSize() { + public CacheSize getSize() { return size; } |
