🔥 Remove unused predicates
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 16 Feb 2020 12:03:57 +0000 (13:03 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 16 Feb 2020 12:03:57 +0000 (13:03 +0100)
src/main/java/net/pterodactylus/sone/data/Sone.java

index e2a7b5b..90d0355 100644 (file)
@@ -32,13 +32,11 @@ import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
 import net.pterodactylus.sone.freenet.wot.Identity;
-import net.pterodactylus.sone.freenet.wot.OwnIdentity;
 import net.pterodactylus.sone.template.SoneAccessor;
 
 import freenet.keys.FreenetURI;
 
 import com.google.common.base.Function;
-import com.google.common.base.Predicate;
 import com.google.common.primitives.Ints;
 
 /**
@@ -115,34 +113,6 @@ public interface Sone extends Identified, Fingerprintable, Comparable<Sone> {
                }
        };
 
-       /** Filter to remove Sones that have not been downloaded. */
-       public static final Predicate<Sone> EMPTY_SONE_FILTER = new Predicate<Sone>() {
-
-               @Override
-               public boolean apply(Sone sone) {
-                       return (sone != null) && (sone.getTime() != 0);
-               }
-       };
-
-       /** Filter that matches all {@link Sone#isLocal() local Sones}. */
-       public static final Predicate<Sone> LOCAL_SONE_FILTER = new Predicate<Sone>() {
-
-               @Override
-               public boolean apply(Sone sone) {
-                       return (sone != null) && (sone.getIdentity() instanceof OwnIdentity);
-               }
-
-       };
-
-       /** Filter that matches Sones that have at least one album. */
-       public static final Predicate<Sone> HAS_ALBUM_FILTER = new Predicate<Sone>() {
-
-               @Override
-               public boolean apply(Sone sone) {
-                       return (sone != null) && !sone.getRootAlbum().getAlbums().isEmpty();
-               }
-       };
-
        public static final Function<Sone, List<Album>> toAllAlbums = new Function<Sone, List<Album>>() {
                @Override
                public List<Album> apply(@Nullable Sone sone) {