1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-23 13:07:59 +01:00

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

View file

@ -225,6 +225,18 @@ public class Presence extends Packet {
return buf.toString(); 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. * A typsafe enum class to represent the presecence type.
*/ */