Package collection.City
Class Human
java.lang.Object
collection.City.Human
- All Implemented Interfaces:
Comparable<Human>
Class representing a human
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Human
-
Human
public Human()
-
-
Method Details
-
getName
-
setName
-
compareTo
Compares two Human objects by their names- Specified by:
compareTo
in interfaceComparable<Human>
- Parameters:
o
- - Human object to compare- Returns:
- - negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object
-
toString
-