Enum Class FontStyle

java.lang.Object
java.lang.Enum<FontStyle>
cn.herodotus.engine.captcha.core.definition.enums.FontStyle
所有已实现的接口:
Serializable, Comparable<FontStyle>, Constable

public enum FontStyle extends Enum<FontStyle>

Description: 字体风格

定义此类的目的: 1. 设置字体风格和字体大小,最初都是使用int类型参数,很容混淆出错,增加个枚举类型以示区别 2. 枚举类型让配置参数配置更便捷。

作者:
: gengwei.zheng
Date:
: 2021/12/23 10:33
  • 枚举常量详细资料

    • PLAIN

      public static final FontStyle PLAIN
      字体风格
    • BOLD

      public static final FontStyle BOLD
    • ITALIC

      public static final FontStyle ITALIC
  • 方法详细资料

    • values

      public static FontStyle[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      返回:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FontStyle valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - 如果参数为空值
    • getMapping

      public int getMapping()