mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 15:53:46 +00:00
15 lines
265 B
Java
Vendored
15 lines
265 B
Java
Vendored
public class Box<T> {
|
|
private final T value;
|
|
|
|
public Box(T value) {
|
|
this.value = value;
|
|
}
|
|
|
|
public static <T> Box<T> create(T defaultValue) {
|
|
return new Box(defaultValue);
|
|
}
|
|
|
|
public T getValue() {
|
|
return value;
|
|
}
|
|
} |