|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Counter
A simple interface encapsulating some dynamic integer greater than or equal to zero
| Method Summary | |
|---|---|
boolean |
add(int i)
returns true if adding the provided integer does not reduce the value to below zero; if true then the value was added to the Counter |
int |
get()
Gets the current value of the Counter |
Counter |
newInstance()
returns a new Counter of the same type as this one, with a value of zero |
| Method Detail |
|---|
boolean add(int i)
Counter
i - to add
int get()
Counter
Counter newInstance()
Counter of the same type as this one, with a value of zero
Counter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||