Aspose.BarCode for Python via Java  24.11
Aspose.Barcode for Python via Java Generation and Recognition API docs
Address Class Reference

Address of creditor or debtor. More...

Inherits BaseJavaClass.

Public Member Functions

None __init__ (self)
 
bool __eq__ (self, Address other)
 Determines whether the specified object is equal to the current object. More...
 
int __hash__ (self)
 Returns the hash code for the current instance. More...
 
None clear (self)
 Clears all fields and sets the type to AddressType.Undetermined. More...
 
Optional[str] getAddressLine1 (self)
 Gets the address line 1. More...
 
Optional[str] getAddressLine2 (self)
 Gets the address line 2. More...
 
Optional[str] getCountryCode (self)
 Gets the two-letter ISO country code. More...
 
Optional[str] getHouseNo (self)
 Gets the house number. More...
 
Optional[str] getName (self)
 Gets the name, either the first and last name of a natural person or the company name of a legal person. More...
 
Optional[str] getPostalCode (self)
 Gets the postal code. More...
 
Optional[str] getStreet (self)
 Gets the street. More...
 
Optional[str] getTown (self)
 Gets the town or city. More...
 
int getType (self)
 Gets the address type. More...
 
None init (self)
 
None setAddressLine1 (self, Optional[str] value)
 Sets the address line 1. More...
 
None setAddressLine2 (self, Optional[str] value)
 Sets the address line 2. More...
 
None setCountryCode (self, Optional[str] value)
 Sets the two-letter ISO country code. More...
 
None setHouseNo (self, Optional[str] value)
 Sets the house number. More...
 
None setName (self, Optional[str] value)
 Sets the name, either the first and last name of a natural person or the company name of a legal person. More...
 
None setPostalCode (self, Optional[str] value)
 Sets the postal code. More...
 
None setStreet (self, Optional[str] value)
 Sets the street. More...
 
None setTown (self, Optional[str] value)
 Sets the town or city. More...
 
- Public Member Functions inherited from BaseJavaClass
None __init__ (self, javaClass)
 
def getJavaClass (self)
 
str getJavaClassName (self)
 
bool isNull (self)
 
None printJavaClassName (self)
 
None setJavaClass (self, javaClass)
 

Static Public Member Functions

Address construct (javaClass)
 

Static Public Attributes

string javaClassName = "com.aspose.mw.barcode.complexbarcode.MwAddress"
 

Additional Inherited Members

- Public Attributes inherited from BaseJavaClass
 javaClass
 
 javaClassName
 

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.

Constructor & Destructor Documentation

◆ __init__()

None __init__ (   self)

Member Function Documentation

◆ __eq__()

bool __eq__ (   self,
Address  other 
)

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.

◆ __hash__()

int __hash__ (   self)

Returns the hash code for the current instance.

Returns
A hash code for the current object.

◆ clear()

None clear (   self)

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

◆ construct()

Address construct (   javaClass)
static

◆ getAddressLine1()

Optional[str] getAddressLine1 (   self)

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.

Returns
:The address line 1.

◆ getAddressLine2()

Optional[str] getAddressLine2 (   self)

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.

Returns
: The address line 2.

◆ getCountryCode()

Optional[str] getCountryCode (   self)

Gets the two-letter ISO country code.

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

Returns
:The ISO country code.

◆ getHouseNo()

Optional[str] getHouseNo (   self)

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.

Returns
:The house number.

◆ getName()

Optional[str] getName (   self)

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()

Optional[str] getPostalCode (   self)

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.

Returns
:The postal code.

◆ getStreet()

Optional[str] getStreet (   self)

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.

Returns
:The street.

◆ getTown()

Optional[str] getTown (   self)

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.

Returns
:The town or city.

◆ getType()

int getType (   self)

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.

◆ init()

None init (   self)

Reimplemented from BaseJavaClass.

◆ setAddressLine1()

None setAddressLine1 (   self,
Optional[str]  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.

Parameters
:Theaddress line 1.

◆ setAddressLine2()

None setAddressLine2 (   self,
Optional[str]  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.

Parameters
:Theaddress line 2.

◆ setCountryCode()

None setCountryCode (   self,
Optional[str]  value 
)

Sets the two-letter ISO country code.

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

Parameters
:TheISO country code.

◆ setHouseNo()

None setHouseNo (   self,
Optional[str]  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.

Parameters
:Thehouse number.

◆ setName()

None setName (   self,
Optional[str]  value 
)

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

Parameters
:Thename.

◆ setPostalCode()

None setPostalCode (   self,
Optional[str]  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.

Parameters
:Thepostal code.

◆ setStreet()

None setStreet (   self,
Optional[str]  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.

Parameters
:Thestreet.

◆ setTown()

None setTown (   self,
Optional[str]  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.

Parameters
:Thetown or city.

Member Data Documentation

◆ javaClassName

string javaClassName = "com.aspose.mw.barcode.complexbarcode.MwAddress"
static