Enum RSTimeUnit

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<RSTimeUnit>, java.time.temporal.TemporalUnit

    public enum RSTimeUnit
    extends java.lang.Enum<RSTimeUnit>
    implements java.time.temporal.TemporalUnit
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <R extends java.time.temporal.Temporal>
      R
      addTo​(R temporal, long amount)  
      long between​(java.time.temporal.Temporal temporal1Inclusive, java.time.temporal.Temporal temporal2Exclusive)  
      java.time.Duration getDuration()  
      java.lang.String getName()  
      boolean isDateBased()  
      boolean isDurationEstimated()  
      boolean isSupportedBy​(java.time.temporal.Temporal temporal)  
      boolean isTimeBased()  
      java.lang.String toString()  
      static RSTimeUnit valueOf​(java.lang.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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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​(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 name
        java.lang.NullPointerException - if the argument is null
      • isDurationEstimated

        public boolean isDurationEstimated()
        Specified by:
        isDurationEstimated in interface java.time.temporal.TemporalUnit
      • isDateBased

        public boolean isDateBased()
        Specified by:
        isDateBased in interface java.time.temporal.TemporalUnit
      • isTimeBased

        public boolean isTimeBased()
        Specified by:
        isTimeBased in interface java.time.temporal.TemporalUnit
      • isSupportedBy

        public boolean isSupportedBy​(java.time.temporal.Temporal temporal)
        Specified by:
        isSupportedBy in interface java.time.temporal.TemporalUnit
      • addTo

        public <R extends java.time.temporal.Temporal> R addTo​(R temporal,
                                                               long amount)
        Specified by:
        addTo in interface java.time.temporal.TemporalUnit
      • between

        public long between​(java.time.temporal.Temporal temporal1Inclusive,
                            java.time.temporal.Temporal temporal2Exclusive)
        Specified by:
        between in interface java.time.temporal.TemporalUnit
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface java.time.temporal.TemporalUnit
        Overrides:
        toString in class java.lang.Enum<RSTimeUnit>
      • getName

        public java.lang.String getName()
      • getDuration

        public java.time.Duration getDuration()
        Specified by:
        getDuration in interface java.time.temporal.TemporalUnit