de.nava.informa.utils
Class ItemComparator
java.lang.Object
de.nava.informa.utils.ItemComparator
- All Implemented Interfaces:
- Comparator<ItemIF>
public class ItemComparator
- extends Object
- implements Comparator<ItemIF>
Custom comparator for ItemIF objects, which takes the date the news
item was found into account.
- Author:
- Niko Schmuck (niko@nava.de)
Constructor Summary |
ItemComparator()
Default constructor using ascending dates (oldes first) and using
the date specified by the item (as opposed to the date the item
was found by retrieving). |
ItemComparator(boolean reverseOrder)
|
ItemComparator(boolean reverseOrder,
boolean useFoundDate)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ItemComparator
public ItemComparator()
- Default constructor using ascending dates (oldes first) and using
the date specified by the item (as opposed to the date the item
was found by retrieving).
ItemComparator
public ItemComparator(boolean reverseOrder)
ItemComparator
public ItemComparator(boolean reverseOrder,
boolean useFoundDate)
compare
public int compare(ItemIF item1,
ItemIF item2)
- Specified by:
compare
in interface Comparator<ItemIF>
getReverseOrder
public boolean getReverseOrder()
setReverseOrder
public void setReverseOrder(boolean reverseOrder)
getUseFoundDate
public boolean getUseFoundDate()
setUseFoundDate
public void setUseFoundDate(boolean useFoundDate)
Copyright © 2002-2007 Niko Schmuck.
All Rights Reserved.