package cgeo.geocaching.filter;

import cgeo.geocaching.R;
import cgeo.geocaching.gcvote.GCVote;
import cgeo.geocaching.models.Geocache;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Filter to display found caches eligible for voting on GCVote.
 */
class GcvoteFilter extends AbstractFilter {

    public static final Creator<GcvoteFilter> CREATOR = new Parcelable.Creator<GcvoteFilter>() {

        @Override
        public GcvoteFilter createFromParcel(final Parcel in) {
            return new GcvoteFilter(in);
        }

        @Override
        public GcvoteFilter[] newArray(final int size) {
            return new GcvoteFilter[size];
        }
    };

    public GcvoteFilter() {
        super(R.string.caches_filter_missing_gcvote);
    }

    public GcvoteFilter(final Parcel in) {
        super(in);
    }

    @Override
    public boolean accepts(final Geocache cache) {
        return cache.isFound() && !GCVote.isValidRating(cache.getMyVote()) && GCVote.isVotingPossible(cache);
    }

}

@@ -674,31 +674,24 @@
     %7D;%0A%0A    
-public 
 GcvoteFilter
@@ -756,31 +756,24 @@
 %0A    %7D%0A%0A    
-public 
 GcvoteFilter

fix checkstyle warnings