toString

override fun toString(): String

Returns the string representation of this email address.


Calling from Kotlin

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

val value: Any = "[email protected]"
val address: EmailAddress = EmailAddress.fromString(value)
val addressAsString: String = address.toString()
println(addressAsString == value) // true

Calling from Java

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

final Object value = "[email protected]";
final EmailAddress address = EmailAddress.fromString(value);
final String addressAsString = address.toString();
System.out.println(addressAsString == value); // true