Package geo
Class PointOfInterest
- java.lang.Object
-
- geo.PointOfInterest
-
public class PointOfInterest extends Object
Immutable datatype representing a place with a name, description, and location.PS1 instructions: do NOT change this class.
-
-
Constructor Summary
Constructors Constructor Description PointOfInterest(Angle latitude, Angle longitude, String name, String description)
Make a new point of interest (POI).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
description()
boolean
equals(Object obj)
int
hashCode()
Angle
latitude()
Angle
longitude()
String
name()
String
toString()
-
-
-
Method Detail
-
latitude
public Angle latitude()
- Returns:
- latitude of this point of interest
-
longitude
public Angle longitude()
- Returns:
- longitude of this point of interest
-
name
public String name()
- Returns:
- nonempty name of this point of interest
-
description
public String description()
- Returns:
- possibly-empty description of this point of interest
-
-