Enum Class CssTimeUnit

java.lang.Object
java.lang.Enum<CssTimeUnit>
com.webfirmframework.wffweb.css.CssTimeUnit
All Implemented Interfaces:
TimeUnit, Serializable, Comparable<CssTimeUnit>, Constable

public enum CssTimeUnit extends Enum<CssTimeUnit> implements TimeUnit
Since:
1.0.0
  • Enum Constant Details

    • MS

      public static final CssTimeUnit MS
      represents milliseconds.
    • S

      public static final CssTimeUnit S
      represents seconds.
  • Method Details

    • values

      public static CssTimeUnit[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CssTimeUnit valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<CssTimeUnit>
    • getUnit

      public String getUnit()
      Specified by:
      getUnit in interface TimeUnit
    • getThis

      public static CssTimeUnit getThis(String unitName)
      gets the corresponding object for the given unitName or null for invalid unit name. The unitName is case insensitive. If the passing unitName is always in upper case then it will be better to use CssTimeUnit.valueOf(String) method because this method internally converts the unitName string to upper case (uses a bit optimized way of conversion) and gets the object by CssTimeUnit.valueOf(String) method.
      Parameters:
      unitName - the name of the unit eg:- s or ms.
      Returns:
      the corresponding object for the given unitName or null for invalid unitName.
      Since:
      1.0.0