|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jjoost.util.Counters.DontCounter
public static class Counters.DontCounter
a Counter which ignores all updates to its value and always returns a value less than zero.
| Constructor Summary | |
|---|---|
Counters.DontCounter()
|
|
| 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 |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Counters.DontCounter()
| Method Detail |
|---|
public boolean add(int i)
CounterCounter
add in interface Counteri - to add
public int get()
CounterCounter
get in interface Counterpublic Counter newInstance()
CounterCounter of the same type as this one, with a value of zero
newInstance in interface CounterCounter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||