Package at.jku.ssw.fp.util
Class Ref<A>
- java.lang.Object
-
- at.jku.ssw.fp.util.Ref<A>
-
- Type Parameters:
A
- the type of the mutable value
- All Implemented Interfaces:
Serializable
public class Ref<A> extends Object implements Serializable
Class for objects with a single mutable generic field.- Author:
- Herbert Praehofer
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <A> Ref<A>
of(A value)
Creates an object with a mutable value.String
toString()
Returns a string representation.
-
-
-
Field Detail
-
value
public A value
The mutable field
-
-
Constructor Detail
-
Ref
private Ref(A value)
Private constructor with the value for the mutable field.- Parameters:
value
- the value for the mutable field
-
-
Method Detail
-
of
public static <A> Ref<A> of(A value)
Creates an object with a mutable value.- Type Parameters:
A
- the type of the mutable value- Parameters:
value
- the initial value for the mutable field- Returns:
- the object with the mutable field
-
-