Enum Class EthiopianMonth

java.lang.Object
java.lang.Enum<EthiopianMonth>
net.time4j.calendar.EthiopianMonth
All Implemented Interfaces:
Serializable, Comparable<EthiopianMonth>, java.lang.constant.Constable, Predicate<EthiopianCalendar>, ChronoCondition<EthiopianCalendar>

public enum EthiopianMonth extends Enum<EthiopianMonth> implements ChronoCondition<EthiopianCalendar>

The Ethiopian calendar defines 13 months like the Coptic calendar.

Since:
3.11/4.8
Author:
Meno Hochschild
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The 9th month of Ethiopian calendar with 30 days.
    The 11th month of Ethiopian calendar with 30 days.
    The 3rd month of Ethiopian calendar with 30 days.
    The 7th month of Ethiopian calendar with 30 days.
    The 1st month of Ethiopian calendar with 30 days.
    The 8th month of Ethiopian calendar with 30 days.
    The 12th month of Ethiopian calendar with 30 days.
    The 13th month of Ethiopian calendar with 5 or 6 days (if in leap year).
    The 10th month of Ethiopian calendar with 30 days.
    The 4th month of Ethiopian calendar with 30 days.
    The 2nd month of Ethiopian calendar with 30 days.
    The 5th month of Ethiopian calendar with 30 days.
    The 6th month of Ethiopian calendar with 30 days.
  • Method Summary

    Modifier and Type
    Method
    Description
    Equivalent to the expression getDisplayName(locale, TextWidth.WIDE, OutputContext.FORMAT).
    getDisplayName​(Locale locale, TextWidth width, OutputContext context)
    Gets the description text dependent on the locale and style parameters.
    int
    Gets the corresponding numerical value.
    boolean
    test​(EthiopianCalendar context)
    Decides if given context matches this condition.
    valueOf​(int month)
    Gets the enum-constant which corresponds to the given numerical value.
    valueOf​(String name)
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.function.Predicate

    and, negate, or
  • Enum Constant Details

    • MESKEREM

      public static final EthiopianMonth MESKEREM
      The 1st month of Ethiopian calendar with 30 days.
    • TEKEMT

      public static final EthiopianMonth TEKEMT
      The 2nd month of Ethiopian calendar with 30 days.
    • HEDAR

      public static final EthiopianMonth HEDAR
      The 3rd month of Ethiopian calendar with 30 days.
    • TAHSAS

      public static final EthiopianMonth TAHSAS
      The 4th month of Ethiopian calendar with 30 days.
    • TER

      public static final EthiopianMonth TER
      The 5th month of Ethiopian calendar with 30 days.
    • YEKATIT

      public static final EthiopianMonth YEKATIT
      The 6th month of Ethiopian calendar with 30 days.
    • MEGABIT

      public static final EthiopianMonth MEGABIT
      The 7th month of Ethiopian calendar with 30 days.
    • MIAZIA

      public static final EthiopianMonth MIAZIA
      The 8th month of Ethiopian calendar with 30 days.
    • GENBOT

      public static final EthiopianMonth GENBOT
      The 9th month of Ethiopian calendar with 30 days.
    • SENE

      public static final EthiopianMonth SENE
      The 10th month of Ethiopian calendar with 30 days.
    • HAMLE

      public static final EthiopianMonth HAMLE
      The 11th month of Ethiopian calendar with 30 days.
    • NEHASSE

      public static final EthiopianMonth NEHASSE
      The 12th month of Ethiopian calendar with 30 days.
    • PAGUMEN

      public static final EthiopianMonth PAGUMEN
      The 13th month of Ethiopian calendar with 5 or 6 days (if in leap year).
  • Method Details

    • values

      public static EthiopianMonth[] 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 EthiopianMonth 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
    • valueOf

      public static EthiopianMonth valueOf(int month)

      Gets the enum-constant which corresponds to the given numerical value.

      Parameters:
      month - Ethiopian month in the range [1-13]
      Returns:
      Ethiopian month of year as enum
      Throws:
      IllegalArgumentException - if given argument is out of range
      Since:
      3.11/4.8
    • getValue

      public int getValue()

      Gets the corresponding numerical value.

      Returns:
      number of month in the range [1-13]
      Since:
      3.11/4.8
    • getDisplayName

      public String getDisplayName(Locale locale)

      Equivalent to the expression getDisplayName(locale, TextWidth.WIDE, OutputContext.FORMAT).

      Parameters:
      locale - language setting
      Returns:
      descriptive text (long form, never null)
      Since:
      3.11/4.8
      See Also:
      getDisplayName(Locale, TextWidth, OutputContext)
    • getDisplayName

      public String getDisplayName(Locale locale, TextWidth width, OutputContext context)

      Gets the description text dependent on the locale and style parameters.

      The second argument controls the width of description while the third argument is only relevant for languages which make a difference between stand-alone forms and embedded text forms (does not matter in English).

      Parameters:
      locale - language setting
      width - text width
      context - output context
      Returns:
      descriptive text for given locale and style (never null)
      Since:
      3.11/4.8
    • test

      public boolean test(EthiopianCalendar context)
      Description copied from interface: ChronoCondition

      Decides if given context matches this condition.

      Due to better readability it is recommended to use following equivalent approach instead of this method::

        import static net.time4j.Weekday.SATURDAY;
        import static net.time4j.Month.JANUARY;
      
        PlainDate date = PlainDate.of(2014, JANUARY, 25);
        System.out.println(SATURDAY.test(date)); // direct use
        System.out.println(date.matches(SATURDAY)); // recommended callback
       
      Specified by:
      test in interface ChronoCondition<EthiopianCalendar>
      Specified by:
      test in interface Predicate<EthiopianCalendar>
      Parameters:
      context - context as base of testing this condition
      Returns:
      true if given time context matches this condition else false