Package net.runelite.client.util
Enum RSTimeUnit
- java.lang.Object
-
- java.lang.Enum<RSTimeUnit>
-
- net.runelite.client.util.RSTimeUnit
-
- All Implemented Interfaces:
Serializable,Comparable<RSTimeUnit>,TemporalUnit
public enum RSTimeUnit extends Enum<RSTimeUnit> implements TemporalUnit
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLIENT_TICKSGAME_TICKS
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <R extends Temporal>
RaddTo(R temporal, long amount)longbetween(Temporal temporal1Inclusive, Temporal temporal2Exclusive)DurationgetDuration()StringgetName()booleanisDateBased()booleanisDurationEstimated()booleanisSupportedBy(Temporal temporal)booleanisTimeBased()StringtoString()static RSTimeUnitvalueOf(String name)Returns the enum constant of this type with the specified name.static RSTimeUnit[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CLIENT_TICKS
public static final RSTimeUnit CLIENT_TICKS
-
GAME_TICKS
public static final RSTimeUnit GAME_TICKS
-
-
Method Detail
-
values
public static RSTimeUnit[] 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 (RSTimeUnit c : RSTimeUnit.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RSTimeUnit 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
-
isDurationEstimated
public boolean isDurationEstimated()
- Specified by:
isDurationEstimatedin interfaceTemporalUnit
-
isDateBased
public boolean isDateBased()
- Specified by:
isDateBasedin interfaceTemporalUnit
-
isTimeBased
public boolean isTimeBased()
- Specified by:
isTimeBasedin interfaceTemporalUnit
-
isSupportedBy
public boolean isSupportedBy(Temporal temporal)
- Specified by:
isSupportedByin interfaceTemporalUnit
-
addTo
public <R extends Temporal> R addTo(R temporal, long amount)
- Specified by:
addToin interfaceTemporalUnit
-
between
public long between(Temporal temporal1Inclusive, Temporal temporal2Exclusive)
- Specified by:
betweenin interfaceTemporalUnit
-
toString
public String toString()
- Specified by:
toStringin interfaceTemporalUnit- Overrides:
toStringin classEnum<RSTimeUnit>
-
getName
public String getName()
-
getDuration
public Duration getDuration()
- Specified by:
getDurationin interfaceTemporalUnit
-
-