Enum Class KarmaUnit

java.lang.Object
java.lang.Enum<KarmaUnit>
ml.karmaconfigs.api.common.utils.string.util.KarmaUnit
All Implemented Interfaces:
Serializable, Comparable<KarmaUnit>, java.lang.constant.Constable

public enum KarmaUnit extends Enum<KarmaUnit>
Karma units
  • Enum Constant Details

    • MILLISECOND

      public static final KarmaUnit MILLISECOND
      Single millisecond
    • MILLISECONDS

      public static final KarmaUnit MILLISECONDS
      More than 1 millisecond
    • SECOND

      public static final KarmaUnit SECOND
      Single second
    • SECONDS

      public static final KarmaUnit SECONDS
      More than 1 second
    • MINUTE

      public static final KarmaUnit MINUTE
      Single minute
    • MINUTES

      public static final KarmaUnit MINUTES
      More than 1 minute
    • HOUR

      public static final KarmaUnit HOUR
      Single hour
    • HOURS

      public static final KarmaUnit HOURS
      More than 1 hour
    • DAY

      public static final KarmaUnit DAY
      Single day
    • DAYS

      public static final KarmaUnit DAYS
      More than 1 day
    • WEEK

      public static final KarmaUnit WEEK
      Single week
    • WEEKS

      public static final KarmaUnit WEEKS
      More than 1 week
    • MONTH

      public static final KarmaUnit MONTH
      Single month
    • MONTHS

      public static final KarmaUnit MONTHS
      More than 1 month
    • YEAR

      public static final KarmaUnit YEAR
      Single year
    • YEARS

      public static final KarmaUnit YEARS
      More than 1 year
  • Method Details

    • values

      public static KarmaUnit[] 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 KarmaUnit 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
    • getUnit

      public String getUnit()
      Get the unit name
      Returns:
      the unit name