类 EnumToIntegerConverter

java.lang.Object
cn.taketoday.core.conversion.support.AbstractConditionalEnumConverter
cn.taketoday.core.conversion.support.EnumToIntegerConverter
所有已实现的接口:
ConditionalConverter, Converter<Enum<?>,Integer>

final class EnumToIntegerConverter extends AbstractConditionalEnumConverter implements Converter<Enum<?>,Integer>
Calls Enum.ordinal() to convert a source Enum to a Integer. This converter will not match enums with interfaces that can be converted.
从以下版本开始:
4.0
作者:
Yanming Zhou
  • 构造器详细资料

    • EnumToIntegerConverter

      public EnumToIntegerConverter(ConversionService conversionService)
  • 方法详细资料

    • convert

      public Integer convert(Enum<?> source)
      从接口复制的说明: Converter
      Convert the source object of type S to target type T.
      指定者:
      convert 在接口中 Converter<Enum<?>,Integer>
      参数:
      source - the source object to convert, which must be an instance of S (never null)
      返回:
      the converted object, which must be an instance of T (potentially null)