hmi.util
Class Console.Counter

java.lang.Object
  extended by hmi.util.Console.Counter
Enclosing class:
Console

public static class Console.Counter
extends Object

Counters keep the values for a print counter


Field Summary
private  int curCount
           
private  int cycle
           
private  int limit
           
private  int totalCount
           
 
Constructor Summary
Console.Counter(int limit, int cycle)
          Create a new Counter with specofied limit and cycle
 
Method Summary
 boolean cycleCounter()
          increments the counter, unless the limit has been reached, and if the cycle count has been reached, resets the counter to zero, and returns true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

curCount

private int curCount

totalCount

private int totalCount

cycle

private int cycle

limit

private int limit
Constructor Detail

Console.Counter

public Console.Counter(int limit,
                       int cycle)
Create a new Counter with specofied limit and cycle

Method Detail

cycleCounter

public boolean cycleCounter()
increments the counter, unless the limit has been reached, and if the cycle count has been reached, resets the counter to zero, and returns true. Otherwise, false is returned.