From: David ‘Bombe’ Roden Date: Tue, 15 Nov 2011 05:52:01 +0000 (+0100) Subject: Add filter for Sones with at least one album. X-Git-Tag: 0.7.3^2~4 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=4a2258d453ffa05b9d4fbbd34235a9a26dc35147;p=Sone.git Add filter for Sones with at least one album. --- diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index 006765a..8b2ec2a 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -115,6 +115,15 @@ public class Sone implements Fingerprintable, Comparable { }; + /** Filter that matches Sones that have at least one album. */ + public static final Filter HAS_ALBUM_FILTER = new Filter() { + + @Override + public boolean filterObject(Sone sone) { + return !sone.getAlbums().isEmpty(); + } + }; + /** The logger. */ private static final Logger logger = Logging.getLogger(Sone.class);