aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/github/daneren2005/dsub/domain/PodcastChannel.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/domain/PodcastChannel.java b/src/github/daneren2005/dsub/domain/PodcastChannel.java
index a39e8d04..8549b06d 100644
--- a/src/github/daneren2005/dsub/domain/PodcastChannel.java
+++ b/src/github/daneren2005/dsub/domain/PodcastChannel.java
@@ -77,4 +77,17 @@ public class PodcastChannel implements Serializable {
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
+
+ public static class PodcastComparator implements Comparator<PodcastChannel> {
+ @Override
+ public int compare(PodcastChannel podcast1, PodcastChannel podcast2) {
+ return podcast1.getName().compareToIgnoreCase(podcast2.getName());
+ }
+
+ public static List<PodcastChannel> sort(List<PodcastChannel> podcasts) {
+ Collections.sort(podcasts, new PodcastComparator());
+ return podcasts;
+ }
+
+ }
}