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