Package collection.City
Class City
java.lang.Object
collection.City.City
- All Implemented Interfaces:
Comparable<City>
Main class for City objects, stored in TreeSet collection
- Author:
- boris
-
Constructor Summary
ConstructorsConstructorDescriptionCity()
City
(long id, String name, Coordinates coordinates, Date creationDate, Integer area, int population, Double metersAboveSeaLevel, Climate climate, Government government, StandardOfLiving standardOfLiving, Human governor) -
Method Summary
Modifier and TypeMethodDescriptionint
Method of Comparable interfaceint
getArea()
long
getId()
getName()
void
setArea
(int area) void
setClimate
(Climate climate) void
setCoordinates
(Coordinates coordinates) void
setCreationDate
(Date creationDate) void
setGovernment
(Government government) void
setGovernor
(Human governor) void
setId
(long id) void
setMetersAboveSeaLevel
(Double metersAboveSeaLevel) void
void
setPopulation
(Integer population) void
setStandardOfLiving
(StandardOfLiving standardOfLiving) toString()
-
Constructor Details
-
City
public City(long id, String name, Coordinates coordinates, Date creationDate, Integer area, int population, Double metersAboveSeaLevel, Climate climate, Government government, StandardOfLiving standardOfLiving, Human governor) -
City
public City()
-
-
Method Details
-
getId
public long getId() -
setId
public void setId(long id) -
getName
-
setName
-
getCoordinates
-
setCoordinates
-
getCreationDate
-
setCreationDate
-
getArea
public int getArea() -
setArea
public void setArea(int area) -
getPopulation
-
setPopulation
-
getMetersAboveSeaLevel
-
setMetersAboveSeaLevel
-
getClimate
-
setClimate
-
getGovernment
-
setGovernment
-
getStandardOfLiving
-
setStandardOfLiving
-
getGovernor
-
setGovernor
-
compareTo
Method of Comparable interface- Specified by:
compareTo
in interfaceComparable<City>
- Parameters:
o
- the object to be compared.- Returns:
- result of comparison in int
-
toString
-