Package org.apache.juneau.internal
Class IntValue
java.lang.Object
org.apache.juneau.internal.IntValue
A simple settable integer value.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IntValue
create()
Creates a new integer value initialized to0
.int
get()
Returns the value.int
Returns the current value and then increments it.static IntValue
of
(int value) Creates an integer value with the specified initial state.set
(int value) Sets the value.
-
Method Details
-
create
Creates a new integer value initialized to0
.- Returns:
- A new integer value.
-
of
Creates an integer value with the specified initial state.- Parameters:
value
- The initial state of the value.- Returns:
- A new integer value.
-
set
Sets the value.- Parameters:
value
- The new value.- Returns:
- This object.
-
get
Returns the value.- Returns:
- The value.
-
getAndIncrement
Returns the current value and then increments it.- Returns:
- The current value.
-