com.atlassian.jira.util
Class ConstantClock
java.lang.Object
com.atlassian.jira.util.ConstantClock
- All Implemented Interfaces:
- com.atlassian.core.util.Clock
public final class ConstantClock
- extends Object
- implements com.atlassian.core.util.Clock
Simple clock that returns a constant value given during construction. Useful for testing date related functions.
- Since:
- v4.0
ConstantClock
public ConstantClock(Date currentDate)
ConstantClock
public ConstantClock(long currentDate)
getCurrentDate
public Date getCurrentDate()
- Specified by:
getCurrentDate
in interface com.atlassian.core.util.Clock
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2002-2013 Atlassian. All Rights Reserved.