Enum 天干
- java.lang.Object
-
- java.lang.Enum<天干>
-
- com.github.jinahya.sexagenarycycle.天干
-
- All Implemented Interfaces:
Serializable
,Comparable<天干>
public enum 天干 extends Enum<天干>
Constants of Heavenly Stems.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 天干
getNext()
Returns the next value of this 天干.天干
getPrevious()
Returns the previous value of this 天干.static 天干
ofName(String name)
Returns the constant of specified name.static 天干
valueOf(String name)
Returns the enum constant of this type with the specified name.static 天干[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static 天干[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (天干 c : 天干.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static 天干 valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
ofName
public static 天干 ofName(String name)
Returns the constant of specified name. This method, unlikely tovalueOf(String)
method, uses a cache.- Parameters:
name
- the name.- Returns:
- the constant associated with
name
.
-
getPrevious
public 天干 getPrevious()
Returns the previous value of this 天干.- Returns:
- the previous value of this 天干.
-
getNext
public 天干 getNext()
Returns the next value of this 天干.- Returns:
- the next value of this 天干.
-
-