Address

Address class

Address of creditor or debtor. You can either set street, house number, postal code and town (type structured address) or address line 1 and 2 (type combined address elements). The type is automatically set once any of these fields is set. Before setting the fields, the address type is undetermined. If fields of both types are set, the address type becomes conflicting. Name and country code must always be set unless all fields are empty.

new Address()

Methods

NameDescription
clear()Clears all fields and sets the type to AddressType.UNDETERMINED.
equals(obj)Determines whether the specified object is equal to the current object.
getAddressLine1()Gets the address line 1. Address line 1 contains street name, house number or P.O. box. Setting this field sets the addr
getAddressLine2()Gets the address line 2. Address line 2 contains postal code and town. Setting this field sets the address type to Addre
getCountryCode()Gets the two-letter ISO country code. The country code is mandatory unless the entire address contains null or emtpy val
getHouseNo()Gets the house number. Setting this field sets the address type to AddressType.STRUCTURED unless it’s already AddressTyp
getName()Gets the name, either the first and last name of a natural person or the company name of a legal person.
getPostalCode()Gets the postal code. Setting this field sets the address type to AddressType.STRUCTURED unless it’s already AddressType
getStreet()Gets the street. The street must be speicfied without house number. Setting this field sets the address type to AddressT
getTown()Gets the town or city. Setting this field sets the address type to AddressType.STRUCTURED unless it’s already AddressTyp
getType()Gets the address type. The address type is automatically set by either setting street / house number or address line 1 a
hashCode()Gets the hash code for this instance.
setAddressLine1(value:)Sets the address line 1. Address line 1 contains street name, house number or P.O. box. Setting this field sets the addr
setAddressLine2(value:)Sets the address line 2. Address line 2 contains postal code and town. Setting this field sets the address type to Addre
setCountryCode(value)Sets the two-letter ISO country code. The country code is mandatory unless the entire address contains null or emtpy val
setHouseNo(value:)Sets the house number. Setting this field sets the address type to AddressType.STRUCTURED unless it’s already AddressTyp
setName(value:)Sets the name, either the first and last name of a natural person or the company name of a legal person.
setPostalCode(value)Sets the postal code. Setting this field sets the address type to AddressType.STRUCTURED unless it’s already AddressType
setStreet(value:)Sets the street. The street must be speicfied without house number. Setting this field sets the address type to AddressT
setTown(value)Sets the town or city. Setting this field sets the address type to AddressType.STRUCTURED unless it’s already AddressTyp

clear()

Clears all fields and sets the type to AddressType.UNDETERMINED.

equals(obj)

Determines whether the specified object is equal to the current object.

ParameterDescription
objThe object to compare with the current object.

Returns: true if the specified object is equal to the current object; otherwise, false.

getAddressLine1()

Gets the address line 1. Address line 1 contains street name, house number or P.O. box. Setting this field sets the address type to AddressType.COMBINED_ELEMENTS unless it’s already AddressType.STRUCTURED, in which case it becomes AddressType.CONFLICTING. This field is only used for combined elements addresses and is optional.

Returns: The address line 1.

getAddressLine2()

Gets the address line 2. Address line 2 contains postal code and town. Setting this field sets the address type to AddressType.COMBINED_ELEMENTS unless it’s already AddressType.STRUCTURED, in which case it becomes AddressType.CONFLICTING. This field is only used for combined elements addresses. For this type, it’s mandatory.

Returns: The address line 2.

getCountryCode()

Gets the two-letter ISO country code. The country code is mandatory unless the entire address contains null or emtpy values.

Returns: The ISO country code.

getHouseNo()

Gets the house number. Setting this field sets the address type to AddressType.STRUCTURED unless it’s already AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING. This field is only used for structured addresses and is optional.

Returns: The house number.

getName()

Gets the name, either the first and last name of a natural person or the company name of a legal person.

Returns: The name.

getPostalCode()

Gets the postal code. Setting this field sets the address type to AddressType.STRUCTURED unless it’s already AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING. This field is only used for structured addresses. For this type, it’s mandatory.

Returns: The postal code.

getStreet()

Gets the street. The street must be speicfied without house number. Setting this field sets the address type to AddressType.STRUCTURED unless it’s already AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING. This field is only used for structured addresses and is optional.

Returns: The street.

getTown()

Gets the town or city. Setting this field sets the address type to AddressType.STRUCTURED unless it’s already AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING. This field is only used for structured addresses. For this type, it’s mandatory.

Returns: The town or city.

getType()

Gets the address type. The address type is automatically set by either setting street / house number or address line 1 and 2. Before setting the fields, the address type is Undetermined. If fields of both types are set, the address type becomes Conflicting.

Returns: The address type.

hashCode()

Gets the hash code for this instance.

Returns: A hash code for the current object .

setAddressLine1(value:)

Sets the address line 1. Address line 1 contains street name, house number or P.O. box. Setting this field sets the address type to AddressType.COMBINED_ELEMENTS unless it’s already AddressType.STRUCTURED, in which case it becomes AddressType.CONFLICTING. This field is only used for combined elements addresses and is optional.

ParameterDescription
value:The address line 1.

setAddressLine2(value:)

Sets the address line 2. Address line 2 contains postal code and town. Setting this field sets the address type to AddressType.COMBINED_ELEMENTS unless it’s already AddressType.STRUCTURED, in which case it becomes AddressType.CONFLICTING. This field is only used for combined elements addresses. For this type, it’s mandatory.

ParameterDescription
value:The address line 2.

setCountryCode(value)

Sets the two-letter ISO country code. The country code is mandatory unless the entire address contains null or emtpy values.

ParameterDescription
valueThe ISO country code.

setHouseNo(value:)

Sets the house number. Setting this field sets the address type to AddressType.STRUCTURED unless it’s already AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING. This field is only used for structured addresses and is optional.

ParameterDescription
value:The house number.

setName(value:)

Sets the name, either the first and last name of a natural person or the company name of a legal person.

ParameterDescription
value:The name.

setPostalCode(value)

Sets the postal code. Setting this field sets the address type to AddressType.STRUCTURED unless it’s already AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING. This field is only used for structured addresses. For this type, it’s mandatory.

ParameterDescription
valueThe postal code.

setStreet(value:)

Sets the street. The street must be speicfied without house number. Setting this field sets the address type to AddressType.STRUCTURED unless it’s already AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING. This field is only used for structured addresses and is optional.

ParameterDescription
value:The street.

setTown(value)

Sets the town or city. Setting this field sets the address type to AddressType.STRUCTURED unless it’s already AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING. This field is only used for structured addresses. For this type, it’s mandatory.

ParameterDescription
valueThe town or city.