public static interface Box.Int extends IntSupplier, IntConsumer, Box<Integer>
A Box for primitive ints.
| Modifier and Type | Method and Description |
|---|---|
default void |
accept(int value)
Deprecated.
Provided to satisfy the
IntConsumer interface; use set(int) instead. |
static Box.Int |
from(IntSupplier getter,
IntConsumer setter)
Creates a
Box.Int from a IntSupplier and a IntConsumer. |
default Integer |
get()
Deprecated.
Provided to satisfy
Box<Integer>; use getAsInt() instead. |
int |
getAsInt() |
static Box.Int |
of(int value)
Creates a
Box.Int holding the given value in a non-volatile field. |
void |
set(int value)
Sets the value which will later be returned by
getAsInt(). |
default void |
set(Integer value)
Deprecated.
Provided to satisfy
Box<Integer>; use set(int) instead. |
andThenvoid set(int value)
Sets the value which will later be returned by getAsInt().
int getAsInt()
getAsInt in interface IntSupplier@Deprecated default Integer get()
Box<Integer>; use getAsInt() instead.Delegates to getAsInt().
@Deprecated default void set(Integer value)
Box<Integer>; use set(int) instead.Delegates to set(int).
@Deprecated default void accept(int value)
IntConsumer interface; use set(int) instead.Delegates to set(int).
accept in interface IntConsumerstatic Box.Int of(int value)
Creates a Box.Int holding the given value in a non-volatile field.
static Box.Int from(IntSupplier getter, IntConsumer setter)
Creates a Box.Int from a IntSupplier and a IntConsumer.