org.oddjob.beancmpr.comparers
Class DateComparer
java.lang.Object
org.oddjob.beancmpr.comparers.DateComparer
- All Implemented Interfaces:
- Comparer<Date>
public class DateComparer
- extends Object
- implements Comparer<Date>
DateComparer
public DateComparer()
getType
public Class<?> getType()
- Description copied from interface:
Comparer
- The type of the things.
Note that we would have liked the return type
to be Class<T>
but we could not then have had a
Comparer<Iterable<MatchableGroup>>
because it's not possible to
return a type of Class<Iterable<MatchableGroup>>
in Java.
If there is a solution to this then please let us know.
- Specified by:
getType
in interface Comparer<Date>
- Returns:
- The type. Must not be null.
compare
public Comparison<Date> compare(Date x,
Date y)
- Description copied from interface:
Comparer
- Compare two things.
- Specified by:
compare
in interface Comparer<Date>
- Parameters:
x
- One thing.y
- The other thing.
- Returns:
- A Comparison. The may be null if either or both of x
and y is null.
getTolerance
public long getTolerance()
setTolerance
public void setTolerance(long tolerance)
getDateFormat
public String getDateFormat()
setDateFormat
public void setDateFormat(String dateFormat)
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2013. All Rights Reserved.