Class City

java.lang.Object
collection.City.City
All Implemented Interfaces:
Comparable<City>

public class City extends Object implements Comparable<City>
Main class for City objects, stored in TreeSet collection
Author:
boris
  • Constructor Details

  • Method Details

    • getId

      public long getId()
    • setId

      public void setId(long id)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getCoordinates

      public Coordinates getCoordinates()
    • setCoordinates

      public void setCoordinates(Coordinates coordinates)
    • getCreationDate

      public Date getCreationDate()
    • setCreationDate

      public void setCreationDate(Date creationDate)
    • getArea

      public int getArea()
    • setArea

      public void setArea(int area)
    • getPopulation

      public Integer getPopulation()
    • setPopulation

      public void setPopulation(Integer population)
    • getMetersAboveSeaLevel

      public Double getMetersAboveSeaLevel()
    • setMetersAboveSeaLevel

      public void setMetersAboveSeaLevel(Double metersAboveSeaLevel)
    • getClimate

      public Climate getClimate()
    • setClimate

      public void setClimate(Climate climate)
    • getGovernment

      public Government getGovernment()
    • setGovernment

      public void setGovernment(Government government)
    • getStandardOfLiving

      public StandardOfLiving getStandardOfLiving()
    • setStandardOfLiving

      public void setStandardOfLiving(StandardOfLiving standardOfLiving)
    • getGovernor

      public Human getGovernor()
    • setGovernor

      public void setGovernor(Human governor)
    • compareTo

      public int compareTo(City o)
      Method of Comparable interface
      Specified by:
      compareTo in interface Comparable<City>
      Parameters:
      o - the object to be compared.
      Returns:
      result of comparison in int
    • toString

      public String toString()
      Overrides:
      toString in class Object