diff options
author | campbeb <bpcampbell@gmail.com> | 2012-03-18 12:41:39 +0900 |
---|---|---|
committer | campbeb <bpcampbell@gmail.com> | 2012-03-18 12:41:39 +0900 |
commit | 04759a13bf0543a81c0fe1cb87e4e9f8bdabd581 (patch) | |
tree | 0d6c8e0b5564b54b36ddc347f9392cc04b52e427 /main/src/cgeo/geocaching/cgCache.java | |
parent | 254bd0204e5521bea6bd96d946b84ecbb89f8c89 (diff) | |
download | cgeo-04759a13bf0543a81c0fe1cb87e4e9f8bdabd581.zip cgeo-04759a13bf0543a81c0fe1cb87e4e9f8bdabd581.tar.gz cgeo-04759a13bf0543a81c0fe1cb87e4e9f8bdabd581.tar.bz2 |
Optimization - Avoid use of internal getters.
See
http://developer.android.com/guide/practices/design/performance.html#internal_get_set
Diffstat (limited to 'main/src/cgeo/geocaching/cgCache.java')
-rw-r--r-- | main/src/cgeo/geocaching/cgCache.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/main/src/cgeo/geocaching/cgCache.java b/main/src/cgeo/geocaching/cgCache.java index 79a4209..85dc4d4 100644 --- a/main/src/cgeo/geocaching/cgCache.java +++ b/main/src/cgeo/geocaching/cgCache.java @@ -159,34 +159,34 @@ public class cgCache implements ICache { * - logOffline */ if (visitedDate == 0) { - visitedDate = other.getVisitedDate(); + visitedDate = other.visitedDate; } if (listId == StoredList.TEMPORARY_LIST_ID) { listId = other.listId; } if (StringUtils.isBlank(geocode)) { - geocode = other.getGeocode(); + geocode = other.geocode; } if (StringUtils.isBlank(cacheId)) { cacheId = other.cacheId; } if (StringUtils.isBlank(guid)) { - guid = other.getGuid(); + guid = other.guid; } if (null == cacheType || CacheType.UNKNOWN == cacheType) { - cacheType = other.getType(); + cacheType = other.cacheType; } if (StringUtils.isBlank(name)) { - name = other.getName(); + name = other.name; } if (StringUtils.isBlank(nameSp)) { nameSp = other.nameSp; } if (StringUtils.isBlank(owner)) { - owner = other.getOwner(); + owner = other.owner; } if (StringUtils.isBlank(ownerReal)) { - ownerReal = other.getOwnerReal(); + ownerReal = other.ownerReal; } if (hidden == null) { hidden = other.hidden; @@ -198,16 +198,16 @@ public class cgCache implements ICache { size = other.size; } if (difficulty == 0) { - difficulty = other.getDifficulty(); + difficulty = other.difficulty; } if (terrain == 0) { - terrain = other.getTerrain(); + terrain = other.terrain; } if (direction == null) { direction = other.direction; } if (distance == null) { - distance = other.getDistance(); + distance = other.distance; } if (StringUtils.isBlank(latlon)) { latlon = other.latlon; @@ -229,22 +229,22 @@ public class cgCache implements ICache { personalNote = other.personalNote; } if (StringUtils.isBlank(shortdesc)) { - shortdesc = other.getShortdesc(); + shortdesc = other.shortdesc; } if (StringUtils.isBlank(description)) { description = other.description; } if (favoritePoints == 0) { - favoritePoints = other.getFavoritePoints(); + favoritePoints = other.favoritePoints; } if (rating == 0) { - rating = other.getRating(); + rating = other.rating; } if (votes == 0) { votes = other.votes; } if (myVote == 0) { - myVote = other.getMyVote(); + myVote = other.myVote; } if (attributes == null) { attributes = other.attributes; |