|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.specrunner.comparators.core.ComparatorDefault
org.specrunner.comparators.core.AbstractComparatorTime
public abstract class AbstractComparatorTime
Abstract comparator of time objects.
| Field Summary | |
|---|---|
static String |
FEATURE_TOLERANCE
Feature to set time tolerance. |
| Constructor Summary | |
|---|---|
AbstractComparatorTime()
|
|
| Method Summary | |
|---|---|
protected boolean |
compare(Long expected,
Long received)
Compare the expected and received. |
int |
compare(Object o1,
Object o2)
|
protected abstract Long |
getMillis(Object obj)
Get the corresponding time information in milliseconds. |
Long |
getTolerance()
Get the time tolerance. |
void |
initialize()
Initialize something. |
boolean |
match(Object expected,
Object received)
Says if two objects can be considered equals. |
void |
setTolerance(Long tolerance)
Set time tolerance. |
| Methods inherited from class org.specrunner.comparators.core.ComparatorDefault |
|---|
getType, 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 |
| Field Detail |
|---|
public static final String FEATURE_TOLERANCE
| Constructor Detail |
|---|
public AbstractComparatorTime()
| Method Detail |
|---|
public void initialize()
IResetable
initialize in interface IResetableinitialize in class ComparatorDefaultpublic Long getTolerance()
public void setTolerance(Long tolerance)
tolerance - The tolerance.
public boolean match(Object expected,
Object received)
IComparator
match in interface IComparatormatch in class ComparatorDefaultexpected - The expected value.received - The received value.
protected abstract Long getMillis(Object obj)
obj - The time object.
protected boolean compare(Long expected,
Long received)
expected - The expected time.received - The received time.
public int compare(Object o1,
Object o2)
compare in interface Comparator<Object>compare in class ComparatorDefault
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||