public class Box<T> extends java.lang.Object implements GetterSetter<T>
Modifier and Type | Class and Description |
---|---|
static class |
Box.NonNull<T>
A Box
|
GetterSetter.Double, GetterSetter.Int
Modifier and Type | Method and Description |
---|---|
static <T> Box<T> |
empty()
Creates an empty Holder object.
|
T |
get() |
static <T> Box<T> |
of(T init)
Creates a Holder of the given object.
|
void |
set(T obj)
Sets the value which will later be returned by get().
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
from, from
protected Box(T init)
public static <T> Box<T> of(T init)
public static <T> Box<T> empty()
public void set(T obj)
GetterSetter
set
in interface GetterSetter<T>
public java.lang.String toString()
toString
in class java.lang.Object