net.sourceforge.rssowl.controller.sort
Class TitleSorter
java.lang.Object
net.sourceforge.rssowl.controller.sort.AbstractSorter
net.sourceforge.rssowl.controller.sort.TitleSorter
- All Implemented Interfaces:
- Comparator
- public class TitleSorter
- extends AbstractSorter
Class used to compare two RSSNewsItems by title.
- Version:
- 1.1.3
- Author:
- Ludovic Kim-Xuan Galibert
Fields inherited from class net.sourceforge.rssowl.controller.sort.AbstractSorter |
|
Constructor Summary |
TitleSorter()
Creates a new instance of RSSOwlTitleSorting |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TitleSorter
public TitleSorter()
- Creates a new instance of RSSOwlTitleSorting
compare
public int compare(Object o1,
Object o2)
- Compare the given objects by title.
- Parameters:
o1
- the first key (news title) to retrieve the first NewsItem to
compareo2
- the second key (news title) to retrieve the second NewsItem to
compare
- Returns:
- 0 if both RSSNewsItems have exactly the same title, -1 if the first
NewsItem's title is alphabetically before the second, and 1 if the second
NewsItem's title is alphabetically before the first.
RSSOwl - RSS / RDF / Atom Newsreader