org.wamblee.general
Class ValueHolder<T>

java.lang.Object
  extended by org.wamblee.general.ValueHolder<T>

public class ValueHolder<T>
extends Object

Object that holds a value of some type. This can be used where a mutable final value would be preferred.

Author:
Erik Brakkee

Constructor Summary
ValueHolder()
          Constructs with null value.
ValueHolder(T aValue)
          Constructs with given value.
 
Method Summary
 T getValue()
           
 void setValue(T aValue)
          Set the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueHolder

public ValueHolder()
Constructs with null value.


ValueHolder

public ValueHolder(T aValue)
Constructs with given value.

Parameters:
aValue - Value.
Method Detail

getValue

public T getValue()
Returns:
Current value.

setValue

public void setValue(T aValue)
Set the value.

Parameters:
aValue - New value.


Copyright © 2011. All Rights Reserved.