@Override
    public String toString() {
        if (type == VariableType.ARRAYLIST) {
            StringBuilder str = new StringBuilder();
            str.append("[");
            for (Value val : (ArrayList<Value>) value) {

                str.append(val.toString());

                if (!val.equals(((ArrayList<Value>) value).get(((ArrayList<Value>) value).size() - 1))) {
                    str.append(" ");
                }
            }
            str.append("]");
            return str.toString();
        } else if (type == VariableType.BOOLEAN) {
            if ((Boolean) this.value)
                return "true";
            else
                return "false";
        } else
            return this.value.toString();
    }