Package de.scravy.bedrock
Class Box<T>
java.lang.Object
de.scravy.bedrock.Box<T>
- Type Parameters:
T- The type of the value.
- All Implemented Interfaces:
ExtendedIterable<T>,Function0<T>,HasLengthAtLeast,Iterable<T>,Consumer<T>,Supplier<T>
- Direct Known Subclasses:
Box.DoubleBox,Box.IntBox,Box.LongBox
public abstract class Box<T> extends Object implements Function0<T>, Consumer<T>, ExtendedIterable<T>
A Box holding a mutable value.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBox.DoubleBoxstatic classBox.IntBoxstatic classBox.LongBoxNested classes/interfaces inherited from interface de.scravy.bedrock.ExtendedIterable
ExtendedIterable.ForEachWithIndexConsumer<T> -
Constructor Summary
Constructors Constructor Description Box() -
Method Summary
Modifier and Type Method Description Tapply(Function<T,T> function)TapplyAtomic(Function<T,T> function)static <T> Box<T>box()static <T> Box<T>box(T value)booleancontains(T value)static Box.DoubleBoxdoubleBox()static Box.DoubleBoxdoubleBox(double value)booleanexists(Predicate<T> predicate)static Box.IntBoxintBox()static Box.IntBoxintBox(int value)Iterator<T>iterator()static Box.LongBoxlongBox()static Box.LongBoxlongBox(long value)