package org.wamblee.general;
/**
- * Object that holds a value of some type. This can be used where a mutable final value would
- * be preferred.
+ * Object that holds a value of some type. This can be used where a mutable
+ * final value would be preferred.
*
* @author Erik Brakkee
- *
+ *
*/
public class ValueHolder<T> {
- private T value;
-
+ private T value;
+
/**
- * Constructs with null value.
+ * Constructs with null value.
*/
- public ValueHolder() {
- value = null;
+ public ValueHolder() {
+ value = null;
}
-
+
/**
- * Constructs with given value.
- * @param aValue Value.
+ * Constructs with given value.
+ *
+ * @param aValue
+ * Value.
*/
- public ValueHolder(T aValue) {
- value = aValue;
+ public ValueHolder(T aValue) {
+ value = aValue;
}
-
+
/**
- * @return Current value.
+ * @return Current value.
*/
public T getValue() {
return value;
}
-
+
/**
- * Set the value.
- * @param aValue New value.
+ * Set the value.
+ *
+ * @param aValue
+ * New value.
*/
public void setValue(T aValue) {
value = aValue;