Enum Class MilitaryZone

java.lang.Object
java.lang.Enum<MilitaryZone>
net.time4j.tz.other.MilitaryZone
All Implemented Interfaces:
Serializable, Comparable<MilitaryZone>, java.lang.constant.Constable, TZID

public enum MilitaryZone extends Enum<MilitaryZone> implements TZID

Represents a military timezone (used by US) where the globe is divided into fixed offset zones using the NATO phonetic alphabet.

Since:
2.2
Author:
Meno Hochschild
  • Enum Constant Details

    • ALPHA

      public static final MilitaryZone ALPHA

      Offset UTC+01:00

    • BRAVO

      public static final MilitaryZone BRAVO

      Offset UTC+02:00

    • CHARLIE

      public static final MilitaryZone CHARLIE

      Offset UTC+03:00

    • DELTA

      public static final MilitaryZone DELTA

      Offset UTC+04:00

    • ECHO

      public static final MilitaryZone ECHO

      Offset UTC+05:00

    • FOXTROT

      public static final MilitaryZone FOXTROT

      Offset UTC+06:00

    • GOLF

      public static final MilitaryZone GOLF

      Offset UTC+07:00

    • HOTEL

      public static final MilitaryZone HOTEL

      Offset UTC+08:00

    • INDIA

      public static final MilitaryZone INDIA

      Offset UTC+09:00

    • KILO

      public static final MilitaryZone KILO

      Offset UTC+10:00

    • LIMA

      public static final MilitaryZone LIMA

      Offset UTC+11:00

    • MIKE

      public static final MilitaryZone MIKE

      Offset UTC+12:00

    • NOVEMBER

      public static final MilitaryZone NOVEMBER

      Offset UTC-01:00

    • OSCAR

      public static final MilitaryZone OSCAR

      Offset UTC-02:00

    • PAPA

      public static final MilitaryZone PAPA

      Offset UTC-03:00

    • QUEBEC

      public static final MilitaryZone QUEBEC

      Offset UTC-04:00

    • ROMEO

      public static final MilitaryZone ROMEO

      Offset UTC-05:00

    • SIERRA

      public static final MilitaryZone SIERRA

      Offset UTC-06:00

    • TANGO

      public static final MilitaryZone TANGO

      Offset UTC-07:00

    • UNIFORM

      public static final MilitaryZone UNIFORM

      Offset UTC-08:00

    • VICTOR

      public static final MilitaryZone VICTOR

      Offset UTC-09:00

    • WHISKEY

      public static final MilitaryZone WHISKEY

      Offset UTC-10:00

    • X_RAY

      public static final MilitaryZone X_RAY

      Offset UTC-11:00

    • YANKEE

      public static final MilitaryZone YANKEE

      Offset UTC-12:00

    • ZULU

      public static final MilitaryZone ZULU

      Equivalent to ZonalOffset.UTC.

  • Method Details

    • values

      public static MilitaryZone[] 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 MilitaryZone 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
    • getOffset

      public ZonalOffset getOffset()

      Yields the associated timezone offset.

      Returns:
      ZonalOffset in full hours
      Since:
      2.2
    • getSymbol

      public String getSymbol()

      Yields the first letter of the full name (for example "A").

      Returns:
      String
      Since:
      2.2
    • toString

      public String toString()

      Yields the full name (for example "Alpha").

      Overrides:
      toString in class Enum<MilitaryZone>
      Returns:
      String
    • canonical

      public String canonical()

      Yields a canonical form of this timezone identifier, for example "MILITARY~UTC+01:00".

      Specified by:
      canonical in interface TZID
      Returns:
      String in format "MILITARY~{offset}"