Package com.jalios.jstore
Class BasicStorable.CdateComparator<T extends Storable>
- java.lang.Object
-
- com.jalios.jstore.BasicStorable.CdateComparator<T>
-
- Type Parameters:
T
- the class of comparable storable type
- All Implemented Interfaces:
java.util.Comparator<T>
- Direct Known Subclasses:
AccessControlList.NameComparator
,BasicComparator
,Data.AuthorComparator
,Data.OpAuthorComparator
,Group.AclComparator
,Group.MemberCountComparator
,MailMessage.SentDateComparator
,Member.GroupComparator
,Member.LangComparator
,Member.LastLoginDateComparator
,Member.LdapAccountComparator
,Member.LoginComparator
,Member.PublicationCountComparator
,Member.RightComparator
,Member.SessionComparator
,Member.WebdavComparator
,Publication.AdateComparator
,Publication.AudienceRightComparator
,Publication.AuthorComparator
,Publication.EdateComparator
,Publication.PdateComparator
,Publication.PstatusComparator
,Publication.ReaderComparator
,Publication.RightComparator
,Publication.TypeComparator
,Publication.UdateComparator
,Publication.VoteScoreComparator
- Enclosing class:
- BasicStorable
public static class BasicStorable.CdateComparator<T extends Storable> extends java.lang.Object implements java.util.Comparator<T>
Compares two Storables using their Cdate in descending order (newest date first). Default to Id Comparison if the 2 Cdate are the equals. Note: this comparator imposes orderings that are inconsistent with equals.
-
-
Constructor Summary
Constructors Constructor Description CdateComparator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(T s1, T s2)
static int
compareDate(java.util.Date d1, java.util.Date d2)
Compares two Dates in descending order.
-
-
-
Method Detail
-
compareDate
public static int compareDate(java.util.Date d1, java.util.Date d2)
Compares two Dates in descending order.- Parameters:
d1
- the first date to compared2
- the second date to compare- Returns:
- -1, 0 or 1 if d1 is greater than, equals or lower than d2
- See Also:
DateComparator.compareDate(Date, Date)
-
-