equals
Returns true
if the other object is an EmailAddress having the same string representation as this email address, or returns false
otherwise.
Calling from Kotlin
Here's an example of calling this function from Kotlin code:
val value = "contact@kotools.org"
val first = EmailAddress(value)
val second = EmailAddress(value)
val result: Boolean = first == second // or first.equals(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 = "contact@kotools.org";
final EmailAddress first = new EmailAddress(value);
final EmailAddress second = new EmailAddress(value);
final boolean result = first.equals(second);
System.out.println(result); // true
Content copied to clipboard