Package com.marcpg.libpg.data.time
Enum Class Time.Unit
- All Implemented Interfaces:
Serializable
,Comparable<Time.Unit>
,Constable
- Enclosing class:
- Time
- Since:
- 0.0.1
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionOne century - 100 years / 10 decadesOne day - 24 hoursOne decade - 10 yearsOne hour - 60 minutes / 3600 secondsOne minute - 60 secondsOne month - ~4.34 weeksOne second - 1000 millisecondsOne week - 7 daysOne year - 12 months / 365.25 days -
Field Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull String
eng()
GetpluralEng()
but as singular.@NotNull String
Geteng()
but as plural.@NotNull String
toString()
Just the same aseng()
.static Time.Unit
Returns the enum constant of this class with the specified name.static Time.Unit[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SECONDS
One second - 1000 milliseconds -
MINUTES
One minute - 60 seconds -
HOURS
One hour - 60 minutes / 3600 seconds -
DAYS
One day - 24 hours -
WEEKS
One week - 7 days -
MONTHS
One month - ~4.34 weeks -
YEARS
One year - 12 months / 365.25 days -
DECADES
One decade - 10 years -
CENTURIES
One century - 100 years / 10 decades
-
-
Field Details
-
sec
public final long sec -
abb
Theunit
's abbreviation.
-
-
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
-
eng
GetpluralEng()
but as singular.
The full english name of theunit
as listed in the english dictionary.- Returns:
- The english name.
-
pluralEng
Geteng()
but as plural.
Most times just with an s, but changes for century = centuries- Returns:
- Plural form of
eng()
- Since:
- 0.0.1
-
toString
Just the same aseng()
.
-