hashCode

override fun hashCode(): Int

Returns a hash code value for this email address.


Calling from Kotlin

Here's an example of calling this function from Kotlin code:

val text: Any = "[email protected]"
val first: EmailAddress = EmailAddress.fromString(text)
val second: EmailAddress = EmailAddress.fromString(text)
val actual: Boolean = first.hashCode() == second.hashCode()
assertTrue(actual)

Calling from Java

Here's an example of calling this function from Java code:

final Object text = "[email protected]";
final int first = EmailAddress.fromString(text)
.hashCode();
final int second = EmailAddress.fromString(text)
.hashCode();
final boolean actual = first == second;
Assertions.assertTrue(actual);