GeoSoft API

no.geosoft.cc.country
Class Country

Object
  |
  +--Country
All Implemented Interfaces:
Comparable

public class Country
extends Object
implements Comparable

Class reprenting a country (according to ISO 3166-1). The class consist of both ISO code and name, where name is a localized version of the official country name.

Author:
GeoSoft
See Also:
CountryManager

Constructor Summary
Country(Country country)
          Create a copy of the country instance specified.
Country(String isoCode)
          Create a country instance with given ISO code.
 
Method Summary
 int compareTo(Object object)
          Lexiographically compare this country to the specified object.
 boolean equals(Object object)
          Check if this object equals the specified object.
 String getIsoCode()
          Retur ISO code of this country.
 String getName()
          Return localized name of this country.
 String getShortName()
          Return localized short name of this country.
 int hashCode()
          Return hash code for this object.
 void setName(String name)
          Set localized name of this country.
 void setShortName(String shortName)
          Set localized short name of this country.
 String toString()
          Retrun a string representation of this country.
 
Methods inherited from class Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Country

public Country(String isoCode)
Create a country instance with given ISO code.

Parameters:
isoCode - ISO code of country.

Country

public Country(Country country)
Create a copy of the country instance specified.

Parameters:
country - Country to copy.
Method Detail

getIsoCode

public String getIsoCode()
Retur ISO code of this country.

Returns:

getName

public String getName()
Return localized name of this country.

Returns:
Localized name of this country.

setName

public void setName(String name)
Set localized name of this country.

Parameters:
name - Localized name of this country.

getShortName

public String getShortName()
Return localized short name of this country.

Returns:
Localized short name of this country.

setShortName

public void setShortName(String shortName)
Set localized short name of this country.

Parameters:
shortName - Localized short name of this country.

toString

public String toString()
Retrun a string representation of this country.

Overrides:
toString in class Object
Returns:
String representation of this country.

compareTo

public int compareTo(Object object)
Lexiographically compare this country to the specified object.

Specified by:
compareTo in interface Comparable
Parameters:
object - Country to compare to.
Returns:
A negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
See Also:
Comparable

hashCode

public int hashCode()
Return hash code for this object.

Overrides:
hashCode in class Object
Returns:
Hash code for this object.

equals

public boolean equals(Object object)
Check if this object equals the specified object.

Overrides:
equals in class Object
Parameters:
object - Object to compare to.
Returns:
True if this equals to the specified object, false otherwise.

GeoSoft API

Copyright © 2004 - Geotechnical Software Services     geosoft.no