package com.fs.qwApi.enums;

public enum Numbers {
    Numbers_ONE(1),
    Numbers_TWO(2),
    Numbers_THREE(3),
    Numbers_FOUR(4),

    Numbers_FIVE(5),

    Numbers_SIX(6);

    private final int value;

    Numbers(int value) {
        this.value = value;
    }

    public int getValue() {
        return value;
    }

    public static Numbers fromInt(int val) {
        for (Numbers s : Numbers.values()) {
            if (s.getValue() == val) {
                return s;
            }
        }
        throw new IllegalArgumentException("Invalid status value: " + val);
    }
}
