Class CityList
+-
+
- java.lang.Object +
-
+
-
+
- com.example.simpleparadox.listycity.CityList +
+
-
+
-
+
+public class CityList +extends java.lang.Object+This is a class that keeps track of a list of city objects+
+
-
+
-
+
+
+ + + ++ +-
+
-
+
+
+
Method Summary
++
+All Methods Instance Methods Concrete Methods ++ +Modifier and Type +Method +Description ++ + +void +add(com.example.simpleparadox.listycity.City city)+ +This adds a city to the list if the city does not exist++ + +void +delete(com.example.simpleparadox.listycity.City city)+ +This delete a city to the list if the city exists++ + +java.util.List<com.example.simpleparadox.listycity.City> +getCities()+ +This returns a sorted list of cities++ + +int +getCount()+ +This returns a number of cities+-
+
-
+
+
+
Methods inherited from class java.lang.Object
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+ -
+
+
+
+ -
+
+
+
-
+
-
+
+
+ + + ++ +-
+
-
+
+
+
Method Detail
+ + + +-
+
-
+
add
+public void add(com.example.simpleparadox.listycity.City city)
+This adds a city to the list if the city does not exist+-
+
- Parameters: +
city- This is a candidate city to add
+
+
-
+
-
+
delete
+public void delete(com.example.simpleparadox.listycity.City city)
+This delete a city to the list if the city exists+-
+
- Parameters: +
city- This is a candidate city to delete
+
+
-
+
-
+
getCities
+public java.util.List<com.example.simpleparadox.listycity.City> getCities()
+This returns a sorted list of cities+-
+
- Returns: +
- Return the sorted list +
+
-
+
-
+
getCount
+public int getCount()
+This returns a number of cities+-
+
- Returns: +
- Return the total sum of city number +
+
+ -
+
+ -
+
+
+