Class: IWAddress

IWAddress

A class representing a structured address defined by a city, a postal code, a street name and a house number.

new IWAddress()

Creates a new address.

Extends

Methods


equals(anotherAddress)

Compares this address with another.
Parameters:
Name Type Description
anotherAddress IWAddress
Returns:
Type
boolean

getCity()

Returns the city. The default value is an empty String.
Returns:
Type
String

getCoordinate()

Returns the coordinate of the geocoded address.
Inherited From:
Returns:
the coordinate
Type
IWCoordinate

getCountry()

Returns the full name of the country.
Inherited From:
Returns:
Type
String

getCountryCode()

Returns the country code.
Inherited From:
Deprecated:
  • use getIso3166Code instead
Returns:
Type
String

getDegree()

Returns the coordinate of the geocoded address.
Inherited From:
Deprecated:
  • use getCoordinate instead
Returns:
the coordinate
Type
IWCoordinate

getDistrict()

Returns the name of the district.
Returns:
the name of the district
Type
String

getHouseNumber()

Returns the housenumber.
Returns:
Type
String

getIdentifier()

Gets the identifier of this address
Inherited From:
Returns:
Type
string

getIso3166Code()

Returns the ISO 3166 ALPHA-3 country code.
Inherited From:
Returns:
Type
String

getLCC()

Returns the coordinate of the geocoded address.
Inherited From:
Deprecated:
  • use getCoordinate instead
Returns:
the coordinate
Type
IWCoordinate

getMeter()

Returns the coordinate of the geocoded address.
Inherited From:
Deprecated:
  • use getCoordinate instead
Returns:
the coordinate
Type
IWCoordinate

getPart()

Returns the part (district in town) of the address.
Returns:
Type
String

getStreet()

Returns the street of the address.
Returns:
Type
String

getWGS84()

Returns the coordinate of the geocoded address.
Inherited From:
Deprecated:
  • use getCoordinate instead
Returns:
the coordinate
Type
IWCoordinate

getZipCode()

Returns the zip code of the address.
Returns:
Type
String

hasHouseNumber()

Returns true if the housenumber attribute is not empty.
Returns:
Type
boolean

isEmpty()

Returns true if no components (street, city, district, country etc.) of the address are defined, false otherwise.
Returns:
true for empty addresses, false otherwise
Type
boolean

setCity(newCity)

Sets the city of the address.
Parameters:
Name Type Description
newCity String name of the city
Returns:
Type
void

setCoordinate(coord)

Sets the coordinate on which the address has been located.
Parameters:
Name Type Description
coord IWCoordinate the coordinate
Inherited From:
Returns:
Type
void

setCountry(newCountry)

Sets the full name of the country.
Parameters:
Name Type Description
newCountry String the full country name, e.g. 'Germany'
Inherited From:
Returns:
Type
void

setCountryCode(newCountryCode)

Sets the country code of the address.
Parameters:
Name Type Description
newCountryCode String the country code
Inherited From:
Deprecated:
  • use setIso3166Code instead
Returns:
Type
void

setDegree(coord)

Sets the coordinate on which the address has been located.
Parameters:
Name Type Description
coord IWCoordinate the coordinate
Inherited From:
Deprecated:
  • use setCoordinate instead
Returns:
Type
void

setDistrict(newDistrict)

Sets the district name of the located address.
Parameters:
Name Type Description
newDistrict String the name of the district
Returns:
Type
void

setHouseNumber(newHouseNumber)

Sets the housenumber of the address.
Parameters:
Name Type Description
newHouseNumber String the house number
Returns:
Type
void

setIdentifier(identifier)

Sets the identifier for this address
Parameters:
Name Type Description
identifier string
Inherited From:

setIso3166Code(newIso3166Code)

Sets the ISO 3166 ALPHA-3 country code of the address.
Parameters:
Name Type Description
newIso3166Code String the country code
Inherited From:
Returns:
Type
void

setLCC(newCoordinate)

Sets the coordinate on which the address has been located.
Parameters:
Name Type Description
newCoordinate IWCoordinate the coordinate
Inherited From:
Deprecated:
  • use setCoordinate instead
Returns:
Type
void

setMeter(coord)

Sets the coordinate on which the address has been located.
Parameters:
Name Type Description
coord IWCoordinate the coordinate
Inherited From:
Deprecated:
  • use setCoordinate instead
Returns:
Type
void

setPart((String})

Sets the part (district in town) of the address.
Parameters:
Name Type Description
(String} newPart
Returns:
Type
void

setStreet(newStreet)

Sets the street of the address.
Parameters:
Name Type Description
newStreet String name of the street
Returns:
Type
void

setWGS84(coord)

Sets the coordinate on which the address has been located.
Parameters:
Name Type Description
coord IWCoordinate the coordinate
Inherited From:
Deprecated:
  • use setCoordinate instead
Returns:
Type
void

setZipCode(newZipCode)

Sets the zipcode of the address.
Parameters:
Name Type Description
newZipCode String the zipcode
Returns:
Type
void

toFormattedString()

Returns a string representation of the address.

This consists of street, house number, zip code, and city.
Example: Riemenschneiderstr. 11, 53175 Bonn
Returns:
the address string
Type
String

toFullFormattedString()

Returns a detailed string representation of the address.

Additional to IWAddress.toFormattedString() city parts, districts and country code are returned if present.
Example: Riemenschneiderstr., 53175 Bonn / Plittersdorf D
Returns:
the address string
Type
String

toString()

Returns a string representation of this address.
Returns:
Type
String