private void parsePresences() { if (preferences == null) { preferences = new HashMap<String, String>(); for (final IPacket child : getChildren()) { preferences.put(child.getName(), child.getText()); } } }
/** * Return true if the given packet is a message * * @param packet * @return */ public static boolean is(final IPacket packet) { return PACKET_NAME.equals(packet.getName()); }
public void setBody(final String msg) { if (msg != null) { final IPacket body = addChild("body", null); body.setText(msg); } }