public class Landmark
extends java.lang.Object
This class is only a container for the information. The constructor does not validate the parameters passed in but just stores the values, except the name field is never allowed to be null. The get* methods return the values passed in the constructor or if the values are later modified by calling the set* methods, the get* methods return the modified values. The QualifiedCoordinates object inside the landmark is a mutable object and the Landmark object holds only a reference to it. Therefore, it is possible to modify the QualifiedCoordinates object inside the Landmark object by calling the set* methods in the QualifiedCoordinates object. However, any such dynamic modifications affect only the Landmark object instance, but MUST not automatically update the persistent landmark information in the landmark store. The LandmarkStore.updateLandmark method is the only way to commit the modifications to the persistent landmark store.
When the platform implementation returns Landmark objects, it MUST ensure that it only returns objects where the parameters have values set as described for their semantics in this class.
Constructor and Description |
---|
Landmark(java.lang.String name,
java.lang.String description,
QualifiedCoordinates coordinates,
AddressInfo addressInfo)
Constructs a new Landmark object with the values specified.
|
Modifier and Type | Method and Description |
---|---|
AddressInfo |
getAddressInfo()
Gets the AddressInfo of the landmark.
|
java.lang.String |
getDescription()
Gets the landmark description.
|
java.lang.String |
getName()
Gets the landmark name.
|
QualifiedCoordinates |
getQualifiedCoordinates()
Gets the QualifiedCoordinates of the landmark.
|
void |
setAddressInfo(AddressInfo addressInfo)
Sets the AddressInfo of the landmark.
|
void |
setDescription(java.lang.String description)
Sets the description of the landmark.
|
void |
setName(java.lang.String name)
Sets the name of the landmark.
|
void |
setQualifiedCoordinates(QualifiedCoordinates coordinates)
Sets the QualifiedCoordinates of the landmark.
|
public Landmark(java.lang.String name, java.lang.String description, QualifiedCoordinates coordinates, AddressInfo addressInfo) throws java.lang.NullPointerException
name
- the name of the landmarkdescription
- description of the landmark. May be null if not available.coordinates
- the Coordinates of the landmark. May be null if not known.addressInfo
- the textual address information of the landmark. May be null if not
known.java.lang.NullPointerException
- if the name is nullpublic AddressInfo getAddressInfo()
setAddressInfo(AddressInfo)
public java.lang.String getDescription()
setDescription(String)
public java.lang.String getName()
setName(String)
public QualifiedCoordinates getQualifiedCoordinates()
setQualifiedCoordinates(QualifiedCoordinates)
public void setAddressInfo(AddressInfo addressInfo)
addressInfo
- the AddressInfo of the landmarkgetAddressInfo()
public void setDescription(java.lang.String description)
description
- description for the landmark, null may be passed in to indicate that
description is not available.getDescription()
public void setName(java.lang.String name) throws java.lang.NullPointerException
name
- name for the landmarkjava.lang.NullPointerException
- if the parameter is nullgetName()
public void setQualifiedCoordinates(QualifiedCoordinates coordinates)
coordinates
- the qualified coordinates of the landmarkgetQualifiedCoordinates()