Package com.sun.pdfview
Class BaseWatchable.Gate
java.lang.Object
com.sun.pdfview.BaseWatchable.Gate
- Enclosing class:
BaseWatchable
A class that lets us give it a target time or number of steps,
and will tell us to stop after that much time or that many steps
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaniterate()Notify the gate of one iteration.voidsetStopIterations(int iterations) set the number of iterations until we stopvoidsetStopTime(long millisFromNow) set the stop timebooleanstop()check whether we should stop.
-
Field Details
-
timeBased
private boolean timeBasedwhether this is a time-based (true) or step-based (false) gate -
nextGate
private long nextGatethe next gate, whether time or iterations
-
-
Constructor Details
-
Gate
Gate()
-
-
Method Details
-
setStopTime
public void setStopTime(long millisFromNow) set the stop time -
setStopIterations
public void setStopIterations(int iterations) set the number of iterations until we stop -
stop
public boolean stop()check whether we should stop. -
iterate
public boolean iterate()Notify the gate of one iteration. Returns true if we should stop or false if not
-