package com.luticate.utils.dbo;

import org.json.JSONException;
import org.json.JSONObject;

import java.util.HashMap;

/**
 * Created by robin on 11/27/15.
 */
public class LuBoolDbo extends LuDbo {
    public boolean isValue() {
        return _value;
    }

    public void setValue(boolean value) {
        _value = value;
    }

    private boolean _value;

    @Override
    public void fromJson(JSONObject json) throws JSONException {
        _value = json.getBoolean("Value");
    }

    @Override
    public HashMap<String, Object> toArray() {
        HashMap<String, Object> array = new HashMap<>();
        array.put("Value", _value);
        return array;
    }
}
