io.leopard.timer
Class SimpleTimer

java.lang.Object
  extended by io.leopard.timer.SimpleTimer
All Implemented Interfaces:
Timer

public abstract class SimpleTimer
extends java.lang.Object
implements Timer


Field Summary
protected  Period period
           
 
Constructor Summary
SimpleTimer(int second)
          构造定时器 .
SimpleTimer(Period period)
           
 
Method Summary
 Period getPeriod()
          周期.
 int getThreadCount()
          线程数.
 boolean isEnabled()
          是否启用 .
 void run()
           
abstract  void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

period

protected Period period
Constructor Detail

SimpleTimer

public SimpleTimer(int second)
构造定时器 .

Parameters:
second -

SimpleTimer

public SimpleTimer(Period period)
Method Detail

isEnabled

public boolean isEnabled()
Description copied from interface: Timer
是否启用 .

Specified by:
isEnabled in interface Timer
Returns:

getPeriod

public Period getPeriod()
Description copied from interface: Timer
周期.

Specified by:
getPeriod in interface Timer
Returns:

getThreadCount

public int getThreadCount()
Description copied from interface: Timer
线程数.

Specified by:
getThreadCount in interface Timer
Returns:

start

public abstract void start()
Specified by:
start in interface Timer

run

public void run()


Copyright © 2014. All Rights Reserved.