edu.wisc.my.portlets.bookmarks.domain.compare
Class DefaultBookmarksComparator
java.lang.Object
edu.wisc.my.portlets.bookmarks.domain.compare.DefaultBookmarksComparator
- All Implemented Interfaces:
- Serializable, Comparator<Entry>
public class DefaultBookmarksComparator
- extends Object
- implements Comparator<Entry>, Serializable
Implements the default comparison order for the objects involved in a BookmarkSet.
Comparison follows these rules in order:
Folders are always greater than non Folders.
Entry fields are compared in the following order: name, note, created, modified.
Bookmark fields are compared in the follwing order:
- Version:
- $Revision: 12141 $
- Author:
- Eric Dalquist eric.dalquist@doit.wisc.edu
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_BOOKMARKS_COMPARATOR
public static DefaultBookmarksComparator DEFAULT_BOOKMARKS_COMPARATOR
DefaultBookmarksComparator
protected DefaultBookmarksComparator()
compare
public int compare(Entry e1,
Entry e2)
- Specified by:
compare in interface Comparator<Entry>
compareFolders
protected int compareFolders(Entry e1,
Entry e2)
- Folders are always greater than non-Folders, if they are both Folders
or both not Folders they are equal.
compareEntries
protected int compareEntries(Entry e1,
Entry e2)
- Compairs the entries by name, note, created and modified properties in that
order.
compareBookmarks
protected int compareBookmarks(Entry e1,
Entry e2)
- If both classes are not Bookmarks they are equal. If they are both
bookmarks they are compared by url then newWindow properties.
Copyright © 2010 Jasig. All Rights Reserved.