org.specrunner.comparators.core
Class ComparatorDate

java.lang.Object
  extended by org.specrunner.comparators.core.ComparatorDefault
      extended by org.specrunner.comparators.core.AbstractComparatorTime
          extended by org.specrunner.comparators.core.ComparatorDate
All Implemented Interfaces:
Serializable, Comparator<Object>, IComparator, IResetable

public class ComparatorDate
extends AbstractComparatorTime

Comparator of dates.

Author:
Thiago Santos
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.specrunner.comparators.core.AbstractComparatorTime
FEATURE_TOLERANCE
 
Constructor Summary
ComparatorDate()
           
 
Method Summary
protected  Long getMillis(Object obj)
          Get the corresponding time information in milliseconds.
 Class<?> getType()
          The comparator reference type.
 
Methods inherited from class org.specrunner.comparators.core.AbstractComparatorTime
compare, compare, getTolerance, initialize, match, setTolerance
 
Methods inherited from class org.specrunner.comparators.core.ComparatorDefault
toString
 
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
 

Constructor Detail

ComparatorDate

public ComparatorDate()
Method Detail

getType

public Class<?> getType()
Description copied from interface: IComparator
The comparator reference type.

Specified by:
getType in interface IComparator
Overrides:
getType in class ComparatorDefault
Returns:
The comparator target.

getMillis

protected Long getMillis(Object obj)
Description copied from class: AbstractComparatorTime
Get the corresponding time information in milliseconds.

Specified by:
getMillis in class AbstractComparatorTime
Parameters:
obj - The time object.
Returns:
The time in milliseconds corresponding to the object.


Copyright © 2014. All rights reserved.