org.eobjects.metamodel.util
Class TimeComparator

java.lang.Object
  extended by org.eobjects.metamodel.util.TimeComparator
All Implemented Interfaces:
Comparator<Object>

public final class TimeComparator
extends Object
implements Comparator<Object>

Compares dates of various formats. Since this class has unchecked generic conversion it can compare java.util.Date, java.sql.Date, java.sql.Time, java.util.Calendar, Date-formatted strings etc.


Method Summary
 int compare(Object o1, Object o2)
           
static Comparable<Object> getComparable(Object o)
           
static Comparator<Object> getComparator()
           
static boolean isTimeBased(Object o)
           
static Date toDate(Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Method Detail

getComparator

public static Comparator<Object> getComparator()

getComparable

public static Comparable<Object> getComparable(Object o)

compare

public int compare(Object o1,
                   Object o2)
Specified by:
compare in interface Comparator<Object>

toDate

public static Date toDate(Object value)

isTimeBased

public static boolean isTimeBased(Object o)


Copyright © 2007-2013. All Rights Reserved.