public enum FormatStyle extends Enum<FormatStyle>
当从配置获取日期时间样式时使用这些样式。看到使用DateTimeFormatter
和DateTimeFormatterBuilder
。
Enum Constant and Description |
---|
FULL
完整的文本样式,用最详细的。
|
LONG
长的文本样式,有很多的细节。
|
MEDIUM
中文本风格,有一定的细节。
|
SHORT
短文本样式,通常是数字。
|
Modifier and Type | Method and Description |
---|---|
static FormatStyle |
valueOf(String name)
返回此类型具有指定名称的枚举常量。
|
static FormatStyle[] |
values()
返回一个数组包含该枚举类型的常量,它们的顺序声明。
|
public static final FormatStyle FULL
public static final FormatStyle LONG
public static final FormatStyle MEDIUM
public static final FormatStyle SHORT
public static FormatStyle[] values()
对于(formatstyle C:formatstyle。values()) 系统,println(C);
public static FormatStyle valueOf(String name)
name
-定要返回的枚举的名称。
IllegalArgumentException
-如果这个枚举类型,也没有固定的具有指定名称
NullPointerException
-如果参数为空
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.