Пример #1
0
 /**
  * Get geocodes of all the caches, which can be used with GCVote. Non-GC caches will be filtered
  * out.
  *
  * @param caches
  * @return
  */
 private static @NonNull ArrayList<String> getVotableGeocodes(
     final @NonNull Collection<Geocache> caches) {
   final ArrayList<String> geocodes = new ArrayList<>(caches.size());
   for (final Geocache cache : caches) {
     String geocode = cache.getGeocode();
     if (StringUtils.isNotBlank(geocode) && cache.supportsGCVote()) {
       geocodes.add(geocode);
     }
   }
   return geocodes;
 }
Пример #2
0
 public static boolean isVotingPossible(final Geocache cache) {
   return Settings.isGCvoteLogin()
       && StringUtils.isNotBlank(cache.getGuid())
       && cache.supportsGCVote();
 }