Move from src to test source tree.

cusax-fix
Emil Ivov 20 years ago
parent 5d7203d575
commit 9310576584

@ -46,7 +46,7 @@ public String getAddress()
* @return a String that can be used for referring to this contact when
* interacting with the user.
*/
public String getAlias()
public String getDisplayName()
{
return contactID;
}
@ -92,4 +92,19 @@ public boolean isLocal()
{
return false;
}
/**
* Returns a string representation of this contact, containing most of its
* representative details.
*
* @return a string representation of this contact.
*/
public String toString()
{
StringBuffer buff = new StringBuffer("MetaContact[ DisplayName=")
.append(getDisplayName()).append("]");
return buff.toString();
}
}

@ -179,4 +179,39 @@ public Iterator subGroups()
{
return subGroups.iterator();
}
/**
* Returns a String representation of this group and the contacts it
* contains (may turn out to be a relatively long string).
* @return a String representing this group and its child contacts.
*/
public String toString()
{
StringBuffer buff = new StringBuffer(getGroupName());
buff.append(".subGroups=" + countSubGroups() + ":\n");
Iterator subGroups = subGroups();
while (subGroups.hasNext())
{
MockContactGroup group = (MockContactGroup)subGroups.next();
buff.append(group.toString());
if (subGroups.hasNext())
buff.append("\n");
}
buff.append("\nChildContacts="+countContacts()+":[");
Iterator contacts = contacts();
while (contacts.hasNext())
{
MockContact contact = (MockContact) contacts.next();
buff.append(contact.toString());
if(contacts.hasNext())
buff.append(", ");
}
return buff.append("]").toString();
}
}
Loading…
Cancel
Save