Class ConstantClock

java.lang.Object
com.atlassian.jira.util.ConstantClock
All Implemented Interfaces:
com.atlassian.core.util.Clock

@Deprecated public final class ConstantClock extends Object implements com.atlassian.core.util.Clock
Deprecated.
Use Clock instead
Simple clock that returns a constant value given during construction. Useful for testing date related functions.
Since:
v4.0
  • Constructor Details

    • ConstantClock

      public ConstantClock(Date currentDate)
      Deprecated.
    • ConstantClock

      public ConstantClock(long currentDate)
      Deprecated.
  • Method Details

    • getCurrentDate

      public Date getCurrentDate()
      Deprecated.
      Specified by:
      getCurrentDate in interface com.atlassian.core.util.Clock
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object