diff options
author | Size43 | 2015-05-19 15:31:57 +0200 |
---|---|---|
committer | Size43 | 2015-05-19 15:31:57 +0200 |
commit | e44f7f0c9b820db215327d4ca809291c16ae076a (patch) | |
tree | 58bcd679b4cb0cc31a51924104caecca0b9166ba /app/src/main/java/org | |
parent | Fixed FeedSorter. (diff) | |
parent | basic Filter & Keyword classes (diff) |
Merge branch 'master' of https://github.com/camilstaps/RSSin
Diffstat (limited to 'app/src/main/java/org')
-rw-r--r-- | app/src/main/java/org/rssin/rssin/Filter.java | 45 | ||||
-rw-r--r-- | app/src/main/java/org/rssin/rssin/Keyword.java | 18 |
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; + } + +} |