Class Country

java.lang.Object
org.deltava.beans.schedule.Country
All Implemented Interfaces:
Serializable, Comparable<Country>, ComboAlias

public class Country extends Object implements Serializable, Comparable<Country>, ComboAlias
A bean to store country names and ISO-3316 codes.
Since:
3.2
Version:
11.0
Author:
Luke
See Also:
  • Field Details

    • INTL

      public static final Country INTL
      International Airspace.
    • UNKNOWN

      public static final Country UNKNOWN
      Unknown Country.
  • Method Details

    • init

      public static void init(String code, String name, Continent cont)
      Initializes a country bean.
      Parameters:
      code - the ISO-3316 country code
      name - the country name
      cont - the continent
    • get

      public static Country get(String code)
      Returns a country.
      Parameters:
      code - the ISO-3316 country code
      Returns:
      a Country, or null if not found
      Throws:
      NullPointerException - if code is null
    • getAll

      public static Collection<Country> getAll()
      Returns all Countries.
      Returns:
      a Collection of Country beans
    • getCode

      public String getCode()
      Returns the ISO-3316 country code.
      Returns:
      the code
    • getName

      public String getName()
      Returns the country name.
      Returns:
      the name
    • getContinent

      public Continent getContinent()
      Returns the continent.
      Returns:
      the continent
    • getComboName

      public String getComboName()
      Description copied from interface: ComboAlias
      Returns the visible name to use in the HTML <OPTION> element.
      Specified by:
      getComboName in interface ComboAlias
      Returns:
      The visible name for this entry
    • getComboAlias

      public String getComboAlias()
      Description copied from interface: ComboAlias
      Returns the alias to use in the HTML <OPTION> element.
      Specified by:
      getComboAlias in interface ComboAlias
      Returns:
      The alias for this entry
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(Country c2)
      Specified by:
      compareTo in interface Comparable<Country>