aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/org
diff options
context:
space:
mode:
authorCamil Staps2015-05-19 14:50:35 +0200
committerCamil Staps2015-05-19 14:50:35 +0200
commit524e0e66596f776279c6e34ccf87534f2f65e659 (patch)
tree7e35b0f3ff4486e1906282eb90353537bb8310df /app/src/main/java/org
parentAdded two classes (diff)
basic Filter & Keyword classes
Diffstat (limited to 'app/src/main/java/org')
-rw-r--r--app/src/main/java/org/rssin/rssin/Filter.java45
-rw-r--r--app/src/main/java/org/rssin/rssin/Keyword.java18
2 files changed, 63 insertions, 0 deletions
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<Feed> feeds;
+ private final Set<Keyword> keywords;
+
+ public Filter() {
+ feeds = new HashSet<>();
+ keywords = new HashSet<>();
+ }
+
+ public Filter(Set<Keyword> keywords) {
+ this.feeds = new HashSet<>();
+ this.keywords = keywords;
+ }
+
+ public Filter(HashSet<Feed> feeds) {
+ this.feeds = feeds;
+ this.keywords = new HashSet<>();
+ }
+
+ public Filter(HashSet<Keyword> keywords, HashSet<Feed> feeds) {
+ this.feeds = feeds;
+ this.keywords = keywords;
+ }
+
+ public Set<Feed> getFeeds() {
+ return feeds;
+ }
+
+ public Set<Keyword> 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;
+ }
+
+}