public class IntHolder extends Object
| Modifier and Type | Field and Description |
|---|---|
int |
val
The int value.
|
| Constructor and Description |
|---|
IntHolder()
Create a new int-holder set to 0.
|
IntHolder(int i)
Create a new int-holder set to a value.
|
| Modifier and Type | Method and Description |
|---|---|
int |
get()
Get the value.
|
int |
incr()
Increment the value by one, and return it.
|
int |
incr(int i)
Increment the value by an amount and return it.
|
void |
set(int i)
Set the value.
|
public IntHolder()
public IntHolder(int i)
i - The value to set the int to.public int incr()
public int incr(int i)
i - The amount to increment by.public int get()
public void set(int i)
i - The value to set it to.Copyright © 2019. All rights reserved.