package jp.sourceforge.glad.util;

import java.io.Serializable;

public class ValueHolder<T> implements Serializable, ValueAccessor<T> {

    private static final long serialVersionUID = 5857148705565100551L;

    private T value;

    public ValueHolder() {
    }

    public ValueHolder(T value) {
        this.value = value;
    }

    public ValueHolder(ValueHolder<T> other) {
        this.value = other.value;
    }
    
    public T get() {
        return value;
    }

    public void set(T value) {
        this.value = value;
    }

    public String toString() {
        return "ValueHolder(" + value + ")";
    }

}
