Package org.javacord.api.entity.channel
Enum AutoArchiveDuration
- java.lang.Object
-
- java.lang.Enum<AutoArchiveDuration>
-
- org.javacord.api.entity.channel.AutoArchiveDuration
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<AutoArchiveDuration>
public enum AutoArchiveDuration extends java.lang.Enum<AutoArchiveDuration>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ONE_DAYONE_HOURONE_WEEKTHREE_DAYS
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intasInt()Gets the duration in minutes.static AutoArchiveDurationvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static AutoArchiveDuration[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ONE_HOUR
public static final AutoArchiveDuration ONE_HOUR
-
ONE_DAY
public static final AutoArchiveDuration ONE_DAY
-
THREE_DAYS
public static final AutoArchiveDuration THREE_DAYS
-
ONE_WEEK
public static final AutoArchiveDuration ONE_WEEK
-
-
Method Detail
-
values
public static AutoArchiveDuration[] 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 (AutoArchiveDuration c : AutoArchiveDuration.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AutoArchiveDuration valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
asInt
public int asInt()
Gets the duration in minutes.- Returns:
- The duration in minutes.
-
-