package com.lanyuanxiaoyao.service.configuration.entity;

/**
 * 常见Item封装
 *
 * @author lanyuanxiaoyao
 * @date 2023-11-30
 */
public class Item {
    private final String label;
    private final String value;

    public Item(String value) {
        this(value, value);
    }

    public Item(Number value) {
        this(value, value);
    }

    public Item(String label, String value) {
        this.label = label;
        this.value = value;
    }

    public Item(Number label, Number value) {
        this(label.toString(), value.toString());
    }

    public String getLabel() {
        return label;
    }

    public String getValue() {
        return value;
    }

    @Override
    public String toString() {
        return "Item{" +
                "label='" + label + '\'' +
                ", value='" + value + '\'' +
                '}';
    }
}
