Package tenapull.util
Class Var<T>
java.lang.Object
tenapull.util.Var<T>
- Type Parameters:
T- the type being wrapped
- Direct Known Subclasses:
Var.String
public class Var<T>
extends java.lang.Object
Wraps a value of any type (T). Used mainly so that a lambda may mutate the value
of a variable in the outer scope, because lambdas require that an outer variable
be 'final or effectively final' if it is to be accessible from within the lambda.
An instance of var satisfies this requirement while allowing its 'value' property
to be mutated.
Also includes static-inner-class wrappers of each primitive type
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVar.BoolVar which wraps a boolean primitivestatic classVar.ByteVar which wraps a byte primitivestatic classVar.CharVar which wraps a char primitivestatic classVar.DoubleVar which wraps a double primitivestatic classVar.FloatVar which wraps a float primitivestatic classVar.IntVar which wraps an int primitivestatic classVar.LongVar which wraps a long primitivestatic classVar.ShortVar which wraps a short primitivestatic classVar.StringVar which wraps a String -
Field Summary
-
Constructor Summary
-
Method Summary