Package com.webfirmframework.wffweb.css
Enum Class CssTimeUnit
- All Implemented Interfaces:
TimeUnit
,Serializable
,Comparable<CssTimeUnit>
,Constable
- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CssTimeUnit
gets the corresponding object for the givenunitName
or null for invalid unit name.getUnit()
toString()
static CssTimeUnit
Returns the enum constant of this class with the specified name.static CssTimeUnit[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MS
represents milliseconds. -
S
represents seconds.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
toString
- Overrides:
toString
in classEnum<CssTimeUnit>
-
getUnit
-
getThis
gets the corresponding object for the givenunitName
or null for invalid unit name. TheunitName
is case insensitive. If the passingunitName
is always in upper case then it will be better to useCssTimeUnit.valueOf(String)
method because this method internally converts theunitName
string to upper case (uses a bit optimized way of conversion) and gets the object byCssTimeUnit.valueOf(String)
method.- Parameters:
unitName
- the name of the unit eg:-s
orms
.- Returns:
- the corresponding object for the given
unitName
or null for invalid unitName. - Since:
- 1.0.0
-