From 524e0e66596f776279c6e34ccf87534f2f65e659 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 19 May 2015 14:50:35 +0200 Subject: basic Filter & Keyword classes --- app/src/main/java/org/rssin/rssin/Filter.java | 45 ++++++++++++++++++++++++++ app/src/main/java/org/rssin/rssin/Keyword.java | 18 +++++++++++ 2 files changed, 63 insertions(+) create mode 100644 app/src/main/java/org/rssin/rssin/Filter.java create mode 100644 app/src/main/java/org/rssin/rssin/Keyword.java (limited to 'app/src/main/java/org') diff --git a/app/src/main/java/org/rssin/rssin/Filter.java b/app/src/main/java/org/rssin/rssin/Filter.java new file mode 100644 index 0000000..6bb191f --- /dev/null +++ b/app/src/main/java/org/rssin/rssin/Filter.java @@ -0,0 +1,45 @@ +package org.rssin.rssin; + +import org.rssin.rss.Feed; + +import java.io.Serializable; +import java.util.HashSet; +import java.util.Set; + +/** + * Created by camilstaps on 19-5-15. + */ +public class Filter implements Serializable { + + private final Set feeds; + private final Set keywords; + + public Filter() { + feeds = new HashSet<>(); + keywords = new HashSet<>(); + } + + public Filter(Set keywords) { + this.feeds = new HashSet<>(); + this.keywords = keywords; + } + + public Filter(HashSet feeds) { + this.feeds = feeds; + this.keywords = new HashSet<>(); + } + + public Filter(HashSet keywords, HashSet feeds) { + this.feeds = feeds; + this.keywords = keywords; + } + + public Set getFeeds() { + return feeds; + } + + public Set getKeywords() { + return keywords; + } + +} diff --git a/app/src/main/java/org/rssin/rssin/Keyword.java b/app/src/main/java/org/rssin/rssin/Keyword.java new file mode 100644 index 0000000..690d627 --- /dev/null +++ b/app/src/main/java/org/rssin/rssin/Keyword.java @@ -0,0 +1,18 @@ +package org.rssin.rssin; + +/** + * Created by camilstaps on 19-5-15. + */ +public class Keyword { + + private final String keyword; + + public Keyword(String keyword) { + this.keyword = keyword; + } + + public String getKeyword() { + return keyword; + } + +} -- cgit v1.2.3