Update the toString format of Domain class.