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 address: EmailAddress = EmailAddress.create("[email protected]")
val message = "$address" // or address.toString()
println(message) // [email protected]

Calling from Java

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

final EmailAddress address =
EmailAddress.Companion.create("[email protected]");
final String message = address.toString();
System.out.println(message); // [email protected]