EmailAddress

Inheritance: java.lang.Object, com.aspose.email.MailAddress

All Implemented Interfaces: java.lang.Comparable, com.aspose.ms.System.IEquatable

public class EmailAddress extends MailAddress implements Comparable<EmailAddress>, System.IEquatable<EmailAddress>

Represents an email address

Constructors

Constructor Description
EmailAddress() Initializes a new instance of the EmailAddress class.
EmailAddress(String address) Initializes a new instance of the EmailAddress class.
EmailAddress(String address, String displayName) Initializes a new instance of the EmailAddress class.

Methods

Method Description
getPrefered() Gets or sets a value which defines whether email address is preferred.
setPrefered(boolean value) Gets or sets a value which defines whether email address is preferred.
getCategory() Gets or sets an object category
setCategory(EmailAddressCategory value) Gets or sets an object category
getRoutingType() Gets or sets a routing type for an email
setRoutingType(String value) Gets or sets a routing type for an email
toString() Returns a string that represents the current object.
hashCode() GetHashCode returns a hash function for this object.
hashCode(EmailAddress obj) GetHashCode returns a hash function for specified object.
equals(Object obj) Determines whether the specified Object is equal to the current Object.
equals(EmailAddress obj) Determines whether the specified Object is equal to the current Object.
equals(EmailAddress x, EmailAddress y) Determines whether the specified object instances are considered equal.
op_Equality(EmailAddress a, EmailAddress b) Determines whether the specified objects are equal.
op_Inequality(EmailAddress a, EmailAddress b) Determines whether the specified objects are not equal.
compareTo(EmailAddress 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.

EmailAddress()

public EmailAddress()

Initializes a new instance of the EmailAddress class.

EmailAddress(String address)

public EmailAddress(String address)

Initializes a new instance of the EmailAddress class.

Parameters:

Parameter Type Description
address java.lang.String The mail address.

EmailAddress(String address, String displayName)

public EmailAddress(String address, String displayName)

Initializes a new instance of the EmailAddress class.

Parameters:

Parameter Type Description
address java.lang.String The mail address.
displayName java.lang.String The display name.

getPrefered()

public final boolean getPrefered()

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

Returns: boolean

setPrefered(boolean value)

public final void setPrefered(boolean value)

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

Parameters:

Parameter Type Description
value boolean

getCategory()

public final EmailAddressCategory getCategory()

Gets or sets an object category

Returns: EmailAddressCategory

setCategory(EmailAddressCategory value)

public final void setCategory(EmailAddressCategory value)

Gets or sets an object category

Parameters:

Parameter Type Description
value EmailAddressCategory

getRoutingType()

public final String getRoutingType()

Gets or sets a routing type for an email

Returns: java.lang.String

setRoutingType(String value)

public final void setRoutingType(String value)

Gets or sets a routing type for an email

Parameters:

Parameter Type Description
value java.lang.String

toString()

public String toString()

Returns a string that represents the current object.

Returns: java.lang.String - Returns a string that represents the current object.

hashCode()

public int hashCode()

GetHashCode returns a hash function for this object.

Returns: int - Returns a hash function for this object.

hashCode(EmailAddress obj)

public final int hashCode(EmailAddress obj)

GetHashCode returns a hash function for specified object.

Parameters:

Parameter Type Description
obj EmailAddress The Object for which a hash code is to be returned.

Returns: int - Returns a hash function for specified object.

equals(Object obj)

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.

equals(EmailAddress obj)

public final boolean equals(EmailAddress obj)

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

Parameters:

Parameter Type Description
obj EmailAddress The Object to compare with the current Object.

Returns: boolean - Returns a boolean indicating if the passed in object obj is Equal to this.

equals(EmailAddress x, EmailAddress y)

public final boolean equals(EmailAddress x, EmailAddress y)

Determines whether the specified object instances are considered equal.

Parameters:

Parameter Type Description
x EmailAddress The first object to compare.
y EmailAddress 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.

op_Equality(EmailAddress a, EmailAddress b)

public static boolean op_Equality(EmailAddress a, EmailAddress b)

Determines whether the specified objects are equal.

Parameters:

Parameter Type Description
a EmailAddress First object to compare
b EmailAddress Second object to compare

Returns: boolean - Returns true if objects are equal, otherwise false.

op_Inequality(EmailAddress a, EmailAddress b)

public static boolean op_Inequality(EmailAddress a, EmailAddress b)

Determines whether the specified objects are not equal.

Parameters:

Parameter Type Description
a EmailAddress First object to compare
b EmailAddress Second object to compare

Returns: boolean - Returns true if objects are not equal, otherwise false.

compareTo(EmailAddress obj)

public int compareTo(EmailAddress 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 EmailAddress 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