Package net.solarnetwork.domain
Interface Location
- All Known Implementing Classes:
BasicLocation,SimpleLocation
public interface Location
Information describing the physical location of an object.
- Version:
- 1.0
- Author:
- matt
-
Method Summary
Modifier and TypeMethodDescriptionGet the ISO 3166-1 alpha-2 character country code.Get the elevation, in meters.Get the decimal latitude.Get the locality (city, town, etc.).Get the decimal longitude.getName()A generalized name, can be used for "virtual" locations.Get a country-specific postal code.A country-specific regional identifier.Get a country-specific state or province identifier.Get the street address.Get a time zone ID, e.g.default booleanTest if any location properties have non-empty values.
-
Method Details
-
getName
String getName()A generalized name, can be used for "virtual" locations.- Returns:
- the location name
-
getCountry
String getCountry()Get the ISO 3166-1 alpha-2 character country code.- Returns:
- 2-character country code
-
getRegion
String getRegion()A country-specific regional identifier.- Returns:
- region identifier
-
getStateOrProvince
String getStateOrProvince()Get a country-specific state or province identifier.- Returns:
- state or province identifier
-
getPostalCode
String getPostalCode()Get a country-specific postal code.- Returns:
- postal code
-
getLocality
String getLocality()Get the locality (city, town, etc.).- Returns:
- locality
-
getStreet
String getStreet()Get the street address.- Returns:
- street
-
getLatitude
BigDecimal getLatitude()Get the decimal latitude.- Returns:
- latitude
-
getLongitude
BigDecimal getLongitude()Get the decimal longitude.- Returns:
- longitude
-
getElevation
BigDecimal getElevation()Get the elevation, in meters.- Returns:
- the elevation
-
getTimeZoneId
String getTimeZoneId()Get a time zone ID, e.g.Pacific/Auckland.- Returns:
- a time zone ID
-
hasLocationCriteria
default boolean hasLocationCriteria()Test if any location properties have non-empty values.- Returns:
- true if some property is not empty
-