Added toString method.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2063 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2003-08-24 03:59:54 +00:00 committed by mtucker
parent 4bec02e810
commit 948ab3cbb8
1 changed files with 12 additions and 0 deletions

View File

@ -225,6 +225,18 @@ public class Presence extends Packet {
return buf.toString();
}
public String toString() {
StringBuffer buf = new StringBuffer();
buf.append(type);
if (mode != null) {
buf.append(": ").append(mode);
}
if (status != null) {
buf.append(" (").append(status).append(")");
}
return buf.toString();
}
/**
* A typsafe enum class to represent the presecence type.
*/