public class GeoObject extends Location implements java.lang.Comparable<GeoObject>
Constructor and Description |
---|
GeoObject(java.lang.String name)
Create a new GeoObject with the given name
|
GeoObject(java.lang.String name,
GeoFeatureType geoType)
Create a new GeoObject with the given name and type
|
Modifier and Type | Method and Description |
---|---|
void |
addAltName(java.lang.String altName)
Add an alternate name for this object
|
int |
compareTo(GeoObject other)
Compare this geographic object to another geographic object.
|
java.util.Set<java.lang.String> |
getAltNames()
Get the set of alternate names
|
java.lang.String |
getCountry()
Get the country this object is included in.
|
long |
getPopulation()
Get the population for this object
|
GeoFeatureType |
getType()
Get the geographic feature type for this object
|
void |
setCountry(java.lang.String cntryName)
Set the country name for this object.
|
void |
setFeatureType(GeoFeatureType featureType)
Set the geographic feature type
|
void |
setPopulation(long pop)
Set the population
|
public GeoObject(java.lang.String name)
name
- the name of the GeoObjectpublic GeoObject(java.lang.String name, GeoFeatureType geoType)
name
- the name of the GeoObjectgeoType
- the geographic typepublic void addAltName(java.lang.String altName)
altName
- the alternate namepublic int compareTo(GeoObject other)
compareTo
in interface java.lang.Comparable<GeoObject>
other
- the other geographic object to comparepublic java.util.Set<java.lang.String> getAltNames()
public java.lang.String getCountry()
public long getPopulation()
public GeoFeatureType getType()
public void setCountry(java.lang.String cntryName)
cntryName
- the country this object is contained inpublic void setFeatureType(GeoFeatureType featureType)
featureType
- the feature typepublic void setPopulation(long pop)
pop
- the population