public enum BitsPerComponent extends Enum<BitsPerComponent>
有效取值为:1,2,4,8,16
默认值取值为 8
| 限定符和类型 | 方法和说明 |
|---|---|
static BitsPerComponent |
getInstance(int bit)
获取实例
|
static BitsPerComponent |
getInstance(String bitStr)
获取实例
|
int |
getValue()
获取 每个颜色通道使用的位数
|
String |
toString() |
static BitsPerComponent |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static BitsPerComponent[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final BitsPerComponent BIT_1
public static final BitsPerComponent BIT_2
public static final BitsPerComponent BIT_4
public static final BitsPerComponent BIT_8
public static final BitsPerComponent BIT_16
public static BitsPerComponent[] values()
for (BitsPerComponent c : BitsPerComponent.values()) System.out.println(c);
public static BitsPerComponent valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public int getValue()
public static BitsPerComponent getInstance(String bitStr)
bitStr - 比特数字符串public static BitsPerComponent getInstance(int bit)
bit - 比特数public String toString()
toString 在类中 Enum<BitsPerComponent>Copyright © 2021. All rights reserved.