public enum Weight extends Enum<Weight>
11.3 表 45
| 枚举常量和说明 |
|---|
W_100
可选值为
100,200,300,400,500,600,700,800,900
|
W_200 |
W_300 |
W_400
默认值
|
W_500 |
W_600 |
W_700 |
W_800 |
W_900 |
| 限定符和类型 | 方法和说明 |
|---|---|
static Weight |
getInstance(int weight) |
static Weight |
getInstance(String weight) |
Integer |
getWeight()
获取字体粗细值
|
String |
toString() |
static Weight |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static Weight[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final Weight W_100
public static final Weight W_200
public static final Weight W_300
public static final Weight W_400
public static final Weight W_500
public static final Weight W_600
public static final Weight W_700
public static final Weight W_800
public static final Weight W_900
public static Weight[] values()
for (Weight c : Weight.values()) System.out.println(c);
public static Weight valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public static Weight getInstance(int weight)
public Integer getWeight()
Copyright © 2021. All rights reserved.