Package com.axelor.db

Interface ValueEnum<T>

  • All Known Implementing Classes:
    ViewCustomizationPermission

    public interface ValueEnum<T>
    Enum type fields with custom values should implement this interface.
    • Method Detail

      • getValue

        T getValue()
        Get the value.
        Returns:
        custom value associated with this enum constant.
      • of

        static <T extends Enum<T>> T of​(Class<T> enumType,
                                        Object value)
        Get the constant of the specified enum type with the specified value.
        Type Parameters:
        T - the enum type whose constant is to be returned
        Parameters:
        enumType - the Class object of the enum type from which to return a constant
        value - the value of the constant to return
        Returns:
        the enum constant of the specified enum type with the specified value
        Throws:
        NullPointerException - if the specified value is null
        IllegalArgumentException - if specified enumType is not an enum or no constant found for the specified value