@Override
    public boolean equals(Object obj) {
        if (obj == this.value)
            return true;
        if (obj instanceof Value) {
            Value v = (Value) obj;
            return this.type == v.type && (this.value == v.value || (this.value != null && this.value.equals(v.value)));
        } else {
            return (this.value.equals(obj));
        }
    }