|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Number
java.util.concurrent.atomic.AtomicInteger
bcds.tools.IntVar
public class IntVar
Implements a mutable int (an integer variable). java.util.concurrent.atomic.AtomicInteger is used as base class for its "mutability" (values can be incremented without requering object re-creation). Contrary to AtomicInteger, however, this class implements the Comparable interface.
Constructor Summary | |
---|---|
IntVar()
Default constructor; value is set to 0. |
|
IntVar(int initial)
|
Method Summary | |
---|---|
void |
add(int incr)
Increments this object with the given value, which can be positive, negative or zero. |
int |
compareTo(IntVar b)
|
Methods inherited from class java.util.concurrent.atomic.AtomicInteger |
---|
addAndGet, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, incrementAndGet, intValue, lazySet, longValue, set, toString, weakCompareAndSet |
Methods inherited from class java.lang.Number |
---|
byteValue, shortValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IntVar()
public IntVar(int initial)
Method Detail |
---|
public void add(int incr)
public int compareTo(IntVar b)
compareTo
in interface java.lang.Comparable<IntVar>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |