hashCode
Returns a hash code value for this email address.
Calling from Kotlin
Here's an example of calling this function from Kotlin code:
val value = "[email protected]"
val first: Int = EmailAddress(value)
.hashCode()
val second: Int = EmailAddress(value)
.hashCode()
val result: Boolean = first == second
println(result) // true
Content copied to clipboard
Calling from Java
Here's an example of calling this function from Java code:
final String value = "[email protected]";
final EmailAddress first = new EmailAddress(value);
final EmailAddress second = new EmailAddress(value);
final int firstHashCode = first.hashCode();
final int secondHashCode = second.hashCode();
final boolean result = firstHashCode == secondHashCode;
System.out.println(result); // true
Content copied to clipboard