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 TypeMethodDescriptionintMethod of Comparable interfaceintgetArea()longgetId()getName()voidsetArea(int area) voidsetClimate(Climate climate) voidsetCoordinates(Coordinates coordinates) voidsetCreationDate(Date creationDate) voidsetGovernment(Government government) voidsetGovernor(Human governor) voidsetId(long id) voidsetMetersAboveSeaLevel(Double metersAboveSeaLevel) voidvoidsetPopulation(Integer population) voidsetStandardOfLiving(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:
compareToin interfaceComparable<City>- Parameters:
o- the object to be compared.- Returns:
- result of comparison in int
-
toString
-