Aspose.Barcode for PHP via Java Generation and Recognition API docs
Address Class Reference

Inherits BaseJavaClass.

Public Member Functions

 getType ()
 
 getName ()
 
 setName ($value)
 
 getAddressLine1 ()
 
 setAddressLine1 ($value)
 
 getAddressLine2 ()
 
 setAddressLine2 ($value)
 
 getStreet ()
 
 setStreet ($value)
 
 getHouseNo ()
 
 setHouseNo ($value)
 
 getPostalCode ()
 
 setPostalCode ($value)
 
 getTown ()
 
 setTown ($value)
 
 getCountryCode ()
 
 setCountryCode ($value)
 
 clear ()
 
 equals ($obj)
 
 hashCode ()
 

Detailed Description

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.

Member Function Documentation

◆ clear()

clear ( )

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

◆ equals()

equals (   $obj)

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

Returns
true if the specified object is equal to the current object; otherwise, false.
Parameters
objThe object to compare with the current object.

◆ getAddressLine1()

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.CombinedElements 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.

Value: The address line 1.

◆ getAddressLine2()

getAddressLine2 ( )

Gets the address line 2. Address line 2 contains postal code and town. Setting this field sets the address type to AddressType.CombinedElements 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. Value: The address line 2.

◆ getCountryCode()

getCountryCode ( )

Gets the two-letter ISO country code.

The country code is mandatory unless the entire address contains null or emtpy values.

Value: The ISO country code.

◆ getHouseNo()

getHouseNo ( )

Gets the house number.

Setting this field sets the address type to AddressType.Structured unless it's already AddressType.CombinedElements, in which case it becomes AddressType.Conflicting.

This field is only used for structured addresses and is optional.

Value: The house number.

◆ getName()

getName ( )

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

◆ getPostalCode()

getPostalCode ( )

Gets the postal code.

Setting this field sets the address type to AddressType.Structured unless it's already AddressType.CombinedElements, in which case it becomes AddressType.Conflicting.

This field is only used for structured addresses. For this type, it's mandatory.

Value: The postal code.

◆ getStreet()

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.CombinedElements, in which case it becomes AddressType.Conflicting. This field is only used for structured addresses and is optional. Value: The street.

◆ getTown()

getTown ( )

Gets the town or city.

Setting this field sets the address type to AddressType.Structured unless it's already AddressType.CombinedElements, in which case it becomes AddressType.Conflicting.

This field is only used for structured addresses. For this type, it's mandatory.

Value: The town or city.

◆ getType()

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.

Value: The address type.

◆ hashCode()

hashCode ( )

Gets the hash code for this instance.

Returns
A hash code for the current object.

◆ setAddressLine1()

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.CombinedElements 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.

Value: The address line 1.

◆ setAddressLine2()

setAddressLine2 (   $value)

Sets the address line 2. Address line 2 contains postal code and town. Setting this field sets the address type to AddressType.CombinedElements 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. Value: The address line 2.

◆ setCountryCode()

setCountryCode (   $value)

Sets the two-letter ISO country code.

The country code is mandatory unless the entire address contains null or emtpy values.

Value: The ISO country code.

◆ setHouseNo()

setHouseNo (   $value)

Sets the house number.

Setting this field sets the address type to AddressType.Structured unless it's already AddressType.CombinedElements, in which case it becomes AddressType.Conflicting.

This field is only used for structured addresses and is optional.

Value: The house number.

◆ setName()

setName (   $value)

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

◆ setPostalCode()

setPostalCode (   $value)

Sets the postal code.

Setting this field sets the address type to AddressType.Structured unless it's already AddressType.CombinedElements, in which case it becomes AddressType.Conflicting.

This field is only used for structured addresses. For this type, it's mandatory.

Value: The postal code.

◆ setStreet()

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.CombinedElements, in which case it becomes AddressType.Conflicting.

This field is only used for structured addresses and is optional.

Value: The street.

◆ setTown()

setTown (   $value)

Sets the town or city.

Setting this field sets the address type to AddressType.Structured unless it's already AddressType.CombinedElements, in which case it becomes AddressType.Conflicting.

This field is only used for structured addresses. For this type, it's mandatory.

Value: The town or city.