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 class
Var.Bool
Var which wraps a boolean primitivestatic class
Var.Byte
Var which wraps a byte primitivestatic class
Var.Char
Var which wraps a char primitivestatic class
Var.Double
Var which wraps a double primitivestatic class
Var.Float
Var which wraps a float primitivestatic class
Var.Int
Var which wraps an int primitivestatic class
Var.Long
Var which wraps a long primitivestatic class
Var.Short
Var which wraps a short primitivestatic class
Var.String
Var which wraps a String -
Field Summary
-
Constructor Summary
-
Method Summary