1   package net.mlw.fball.event;
2   
3   /***
4    * 
5    * @author Matthew L. Wilson
6    * @version $Revision: 1.3 $ $Date: 2004/03/19 21:44:31 $
7    */
8   public class ProgressEvent implements Event
9   {
10     private int current = -1, total;
11  
12     /***
13      * @param current
14      * @param total
15      */
16     public ProgressEvent(int total)
17     {
18        this.total = total;
19     }
20  
21     /***
22      * @param current
23      * @param total
24      */
25     public ProgressEvent(int total, int current)
26     {
27        this.current = current;
28        this.total = total;
29     }
30  
31     public boolean isNew()
32     {
33        return (current == -1);
34     }
35  
36     /***
37      * @return Returns the current.
38      */
39     public int getCurrent()
40     {
41        return current;
42     }
43  
44     /***
45      * @return Returns the total.
46      */
47     public int getTotal()
48     {
49        return total;
50     }
51  
52     /***
53      * @see java.lang.Object#toString()
54      */
55     public String toString()
56     {
57        return super.toString() + " " + current + " of " + total + " total.";
58     }
59  
60  }
This page was automatically generated by Maven