|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.multiverse.transactional.refs.IntRef
public class IntRef
A Ref for storing an int.
| Constructor Summary | |
|---|---|
IntRef()
Creates a new IntRef with the 0 as value. |
|
IntRef(int value)
Creates a new IntRef with the given value. |
|
| Method Summary | |
|---|---|
void |
await(int desired)
Waits till the value is equal to the desired value. |
int |
awaitLargerOrEqualThan(int than)
Waits till the value is equal or larger than. |
int |
awaitLargerThan(int than)
Waits till this value is larger than. |
int |
awaitNotEqualTo(int than)
|
int |
awaitSmallerOrEqualThan(int than)
|
int |
awaitSmallerThan(int than)
|
int |
dec()
Decreases the value in this IntRef by one. |
int |
dec(int amount)
Decreases the value of this IntRef by the given amount. |
boolean |
equals(Object thatObj)
|
int |
get()
Gets the current value. |
int |
hashCode()
|
int |
inc()
Increases the value in this IntRef by one. |
int |
inc(int amount)
Increase the value of this IntRef by the given amount. |
int |
set(int newValue)
Sets the new value and returns the old value. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IntRef()
public IntRef(int value)
value - the initial value of this IntRef.| Method Detail |
|---|
public final int get()
public final int set(int newValue)
newValue - the new value.
public final int dec()
public final int inc()
public final int inc(int amount)
amount - the amount the value needs to be increased with. Value is allowed to be 0 or negative.
public final int dec(int amount)
amount - the amount the value needs to be decreased with. Value is allowed to be 0 or negative.
public final void await(int desired)
desired - the value to wait for.public final int awaitLargerThan(int than)
than - the value to wait for.
public final int awaitLargerOrEqualThan(int than)
than -
public final int awaitSmallerThan(int than)
public final int awaitSmallerOrEqualThan(int than)
public final int awaitNotEqualTo(int than)
public final String toString()
toString in class Objectpublic final int hashCode()
hashCode in class Objectpublic final boolean equals(Object thatObj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||