java.lang.Object
ch.qos.logback.core.util.IntHolder
A simple mutable holder for an integer value, providing basic operations
like incrementing, setting, and retrieving the value. This class is not
thread-safe and should be used in single-threaded contexts or with external
synchronization.
- Since:
- 1.5.24
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIntHolder(int value) Constructs an IntHolder with the specified initial value. -
Method Summary
-
Field Details
-
value
-
-
Constructor Details
-
IntHolder
Constructs an IntHolder with the specified initial value.- Parameters:
value- the initial integer value to hold
-
-
Method Details
-
inc
Increments the held value by 1. -
set
Sets the held value to the specified new value.- Parameters:
newValue- the new integer value to set
-
get
Returns the current held value.- Returns:
- the current integer value
-