
**Inheritance:**
java.lang.Object

**All Implemented Interfaces:**
java.lang.Comparable, com.aspose.ms.System.IEquatable
```
public class PostalAddress implements Comparable<PostalAddress>, System.IEquatable<PostalAddress>
```

Represents a postal address.
## Constructors

| Constructor | Description |
| --- | --- |
| [PostalAddress()](#PostalAddress--) |  |
## Methods

| Method | Description |
| --- | --- |
| [compareTo(PostalAddress obj)](#compareTo-com.aspose.email.PostalAddress-) | Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. |
| [equals(PostalAddress obj)](#equals-com.aspose.email.PostalAddress-) |  |
| [equals(PostalAddress x, PostalAddress y)](#equals-com.aspose.email.PostalAddress-com.aspose.email.PostalAddress-) | Determines whether the specified object instances are considered equal. |
| [equals(Object obj)](#equals-java.lang.Object-) | Determines whether the specified Object is equal to the current Object. |
| [getAddress()](#getAddress--) | Gets or sets an address |
| [getCategory()](#getCategory--) | Gets or sets an object category |
| [getCity()](#getCity--) | Gets or sets a city |
| [getClass()](#getClass--) |  |
| [getCountry()](#getCountry--) | Gets or sets a country |
| [getCountryCode()](#getCountryCode--) | Gets or sets a country code |
| [getPostOfficeBox()](#getPostOfficeBox--) | Gets or sets a post Office box |
| [getPostalCode()](#getPostalCode--) | Gets or sets a post code |
| [getPrefered()](#getPrefered--) | Gets or sets a value which defines whether postal address is preferred. |
| [getStateOrProvince()](#getStateOrProvince--) | Gets or sets a region |
| [getStreet()](#getStreet--) | Gets or sets a street |
| [hashCode()](#hashCode--) | GetHashCode returns a hash function for this object. |
| [hashCode(PostalAddress obj)](#hashCode-com.aspose.email.PostalAddress-) | GetHashCode returns a hash function for specified object. |
| [isMailingAddress()](#isMailingAddress--) | Gets or sets a value which defines whether address may be used for mailing. |
| [notify()](#notify--) |  |
| [notifyAll()](#notifyAll--) |  |
| [op_Equality(PostalAddress a, PostalAddress b)](#op-Equality-com.aspose.email.PostalAddress-com.aspose.email.PostalAddress-) | Determines whether the specified objects are equal. |
| [op_Inequality(PostalAddress a, PostalAddress b)](#op-Inequality-com.aspose.email.PostalAddress-com.aspose.email.PostalAddress-) | Determines whether the specified objects are not equal. |
| [setAddress(String value)](#setAddress-java.lang.String-) | Gets or sets an address |
| [setCategory(PostalAddressCategory value)](#setCategory-com.aspose.email.PostalAddressCategory-) | Gets or sets an object category |
| [setCity(String value)](#setCity-java.lang.String-) | Gets or sets a city |
| [setCountry(String value)](#setCountry-java.lang.String-) | Gets or sets a country |
| [setCountryCode(String value)](#setCountryCode-java.lang.String-) | Gets or sets a country code |
| [setMailingAddress(boolean value)](#setMailingAddress-boolean-) | Gets or sets a value which defines whether address may be used for mailing. |
| [setPostOfficeBox(String value)](#setPostOfficeBox-java.lang.String-) | Gets or sets a post Office box |
| [setPostalCode(String value)](#setPostalCode-java.lang.String-) | Gets or sets a post code |
| [setPrefered(boolean value)](#setPrefered-boolean-) | Gets or sets a value which defines whether postal address is preferred. |
| [setStateOrProvince(String value)](#setStateOrProvince-java.lang.String-) | Gets or sets a region |
| [setStreet(String value)](#setStreet-java.lang.String-) | Gets or sets a street |
| [toString()](#toString--) | Returns a string that represents the current object. |
| [wait()](#wait--) |  |
| [wait(long arg0)](#wait-long-) |  |
| [wait(long arg0, int arg1)](#wait-long-int-) |  |
### PostalAddress() {#PostalAddress--}
```
public PostalAddress()
```


### compareTo(PostalAddress obj) {#compareTo-com.aspose.email.PostalAddress-}
```
public int compareTo(PostalAddress obj)
```


Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| obj | [PostalAddress](../../com.aspose.email/postaladdress) | An object to compare with this instance, or null. |

**Returns:**
int - This method returns: a value less than 0 if this is less than value 0 if this is equal to value a value greater than 0 if this is greater than value
### equals(PostalAddress obj) {#equals-com.aspose.email.PostalAddress-}
```
public final boolean equals(PostalAddress obj)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| obj | [PostalAddress](../../com.aspose.email/postaladdress) |  |

**Returns:**
boolean
### equals(PostalAddress x, PostalAddress y) {#equals-com.aspose.email.PostalAddress-com.aspose.email.PostalAddress-}
```
public final boolean equals(PostalAddress x, PostalAddress y)
```


Determines whether the specified object instances are considered equal.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| x | [PostalAddress](../../com.aspose.email/postaladdress) | The first object to compare. |
| y | [PostalAddress](../../com.aspose.email/postaladdress) | The second object to compare. |

**Returns:**
boolean - true if the objects are considered equal; otherwise, false. If both objA and objB are null, the method returns true.
### equals(Object obj) {#equals-java.lang.Object-}
```
public boolean equals(Object obj)
```


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

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| obj | java.lang.Object | The Object to compare with the current Object. |

**Returns:**
boolean - Returns a boolean indicating if the passed in object obj is Equal to this.
### getAddress() {#getAddress--}
```
public final String getAddress()
```


Gets or sets an address

**Returns:**
java.lang.String
### getCategory() {#getCategory--}
```
public final PostalAddressCategory getCategory()
```


Gets or sets an object category

**Returns:**
[PostalAddressCategory](../../com.aspose.email/postaladdresscategory)
### getCity() {#getCity--}
```
public final String getCity()
```


Gets or sets a city

**Returns:**
java.lang.String
### getClass() {#getClass--}
```
public final native Class<?> getClass()
```




**Returns:**
java.lang.Class<?>
### getCountry() {#getCountry--}
```
public final String getCountry()
```


Gets or sets a country

**Returns:**
java.lang.String
### getCountryCode() {#getCountryCode--}
```
public final String getCountryCode()
```


Gets or sets a country code

**Returns:**
java.lang.String
### getPostOfficeBox() {#getPostOfficeBox--}
```
public final String getPostOfficeBox()
```


Gets or sets a post Office box

**Returns:**
java.lang.String
### getPostalCode() {#getPostalCode--}
```
public final String getPostalCode()
```


Gets or sets a post code

**Returns:**
java.lang.String
### getPrefered() {#getPrefered--}
```
public final boolean getPrefered()
```


Gets or sets a value which defines whether postal address is preferred.

**Returns:**
boolean
### getStateOrProvince() {#getStateOrProvince--}
```
public final String getStateOrProvince()
```


Gets or sets a region

**Returns:**
java.lang.String
### getStreet() {#getStreet--}
```
public final String getStreet()
```


Gets or sets a street

**Returns:**
java.lang.String
### hashCode() {#hashCode--}
```
public int hashCode()
```


GetHashCode returns a hash function for this object.

**Returns:**
int - Returns a hash function for this object.
### hashCode(PostalAddress obj) {#hashCode-com.aspose.email.PostalAddress-}
```
public int hashCode(PostalAddress obj)
```


GetHashCode returns a hash function for specified object.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| obj | [PostalAddress](../../com.aspose.email/postaladdress) | The Object for which a hash code is to be returned. |

**Returns:**
int - Returns a hash function for specified object.
### isMailingAddress() {#isMailingAddress--}
```
public final boolean isMailingAddress()
```


Gets or sets a value which defines whether address may be used for mailing.

**Returns:**
boolean
### notify() {#notify--}
```
public final native void notify()
```




### notifyAll() {#notifyAll--}
```
public final native void notifyAll()
```




### op_Equality(PostalAddress a, PostalAddress b) {#op-Equality-com.aspose.email.PostalAddress-com.aspose.email.PostalAddress-}
```
public static boolean op_Equality(PostalAddress a, PostalAddress b)
```


Determines whether the specified objects are equal.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| a | [PostalAddress](../../com.aspose.email/postaladdress) | First object to compare |
| b | [PostalAddress](../../com.aspose.email/postaladdress) | Second object to compare |

**Returns:**
boolean - Returns true if objects are equal, otherwise false.
### op_Inequality(PostalAddress a, PostalAddress b) {#op-Inequality-com.aspose.email.PostalAddress-com.aspose.email.PostalAddress-}
```
public static boolean op_Inequality(PostalAddress a, PostalAddress b)
```


Determines whether the specified objects are not equal.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| a | [PostalAddress](../../com.aspose.email/postaladdress) | First object to compare |
| b | [PostalAddress](../../com.aspose.email/postaladdress) | Second object to compare |

**Returns:**
boolean - Returns true if objects are not equal, otherwise false.
### setAddress(String value) {#setAddress-java.lang.String-}
```
public final void setAddress(String value)
```


Gets or sets an address

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String |  |

### setCategory(PostalAddressCategory value) {#setCategory-com.aspose.email.PostalAddressCategory-}
```
public final void setCategory(PostalAddressCategory value)
```


Gets or sets an object category

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [PostalAddressCategory](../../com.aspose.email/postaladdresscategory) |  |

### setCity(String value) {#setCity-java.lang.String-}
```
public final void setCity(String value)
```


Gets or sets a city

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String |  |

### setCountry(String value) {#setCountry-java.lang.String-}
```
public final void setCountry(String value)
```


Gets or sets a country

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String |  |

### setCountryCode(String value) {#setCountryCode-java.lang.String-}
```
public final void setCountryCode(String value)
```


Gets or sets a country code

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String |  |

### setMailingAddress(boolean value) {#setMailingAddress-boolean-}
```
public final void setMailingAddress(boolean value)
```


Gets or sets a value which defines whether address may be used for mailing.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | boolean |  |

### setPostOfficeBox(String value) {#setPostOfficeBox-java.lang.String-}
```
public final void setPostOfficeBox(String value)
```


Gets or sets a post Office box

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String |  |

### setPostalCode(String value) {#setPostalCode-java.lang.String-}
```
public final void setPostalCode(String value)
```


Gets or sets a post code

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String |  |

### setPrefered(boolean value) {#setPrefered-boolean-}
```
public final void setPrefered(boolean value)
```


Gets or sets a value which defines whether postal address is preferred.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | boolean |  |

### setStateOrProvince(String value) {#setStateOrProvince-java.lang.String-}
```
public final void setStateOrProvince(String value)
```


Gets or sets a region

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String |  |

### setStreet(String value) {#setStreet-java.lang.String-}
```
public final void setStreet(String value)
```


Gets or sets a street

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String |  |

### toString() {#toString--}
```
public String toString()
```


Returns a string that represents the current object.

**Returns:**
java.lang.String - Returns a string that represents the current object.
### wait() {#wait--}
```
public final void wait()
```




### wait(long arg0) {#wait-long-}
```
public final native void wait(long arg0)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | long |  |

### wait(long arg0, int arg1) {#wait-long-int-}
```
public final void wait(long arg0, int arg1)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | long |  |
| arg1 | int |  |

