export default class ModelDictionary {
    constructor(data) {
        this.m_data = null;
        this.m_data = data;
    }
    get data() {
        return this.m_data;
    }
    get(key, defaultValue = null) {
        if (!this.exists(key)) {
            return defaultValue;
        }
        return this.data[key] == null ? defaultValue : this.data[key];
    }
    set(key, value) {
        if (name != null) {
            this.m_data[key] = value;
        }
    }
    exists(key) {
        return this.m_data[key] !== undefined;
    }
    delete(key) {
        delete this.m_data[key];
    }
    toJSON() {
        return this.data;
    }
}
