package com.unibuy.smartdevice.structure;

import android.util.Log;

public class SettingStructure {
    private String settingId;
    private String[] data;

    public SettingStructure(String settingId, String[] data) {
        this.settingId = settingId;
        this.data = data;
    }

    public String getSettingId() {
        return settingId;
    }

    public void setSettingId(String settingId) {
        this.settingId = settingId;
    }

    public int getDataCount() {
        return data.length;
    }

    public String getData(int index) {
        if (index < data.length && data[index] != null) {
            return data[index];
        } else {
            return "";
        }
    }

    public void setData(int index, String data) {
        this.data[index] = data;
    }

    @Override
    public String toString() {
        return "SettingStructure{" +
                "settingId='" + settingId + '\'' +
                ", data1(0)='" + getData(0) + '\'' +
                ", data2(1)='" + getData(1) + '\'' +
                ", data3(2)='" + getData(2) + '\'' +
                ", data4(3)='" + getData(3) + '\'' +
                ", data5(4)='" + getData(4) + '\'' +
                ", data6(5)='" + getData(5) + '\'' +
                ", data7(6)='" + getData(6) + '\'' +
                ", data8(7)='" + getData(7) + '\'' +
                ", data9(8)='" + getData(8) + '\'' +
                ", data10(9)='" + getData(9) + '\'' +
                '}';
    }
}
