com.notuvy.util
Class WallClock

java.lang.Object
  extended by com.notuvy.util.WallClock
Direct Known Subclasses:
WallClock.Manual

public abstract class WallClock
extends Object

A representation of the current time. The default implementation is a trivial encapsulation of the system time. Its purpose is to be a hook for unit tests to replace with explicit time control.

Author:
murali

Nested Class Summary
static class WallClock.Manual
           
 
Field Summary
static DateFormat FORMATTER
           
protected static org.apache.log4j.Logger LOG
           
static String STRING_FORMAT
           
static WallClock SYSTEM
           
 
Constructor Summary
WallClock()
           
 
Method Summary
static WallClock.Manual createManual()
           
static Date currentDate()
           
static long currentTimeMillis()
           
protected static WallClock getInstance()
           
protected abstract  long getTimeMillis()
           
static void restoreSystem()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.log4j.Logger LOG

SYSTEM

public static final WallClock SYSTEM

STRING_FORMAT

public static final String STRING_FORMAT
See Also:
Constant Field Values

FORMATTER

public static final DateFormat FORMATTER
Constructor Detail

WallClock

public WallClock()
Method Detail

currentTimeMillis

public static long currentTimeMillis()

currentDate

public static Date currentDate()

restoreSystem

public static void restoreSystem()

createManual

public static WallClock.Manual createManual()

getInstance

protected static WallClock getInstance()

getTimeMillis

protected abstract long getTimeMillis()


Copyright © 2013. All Rights Reserved.