public class GroupJID
extends org.xmpp.packet.JID
Constructor and Description |
---|
GroupJID(String name)
Construct a JID representing a Group.
|
Modifier and Type | Method and Description |
---|---|
org.xmpp.packet.JID |
asBareJID()
Override the base class implementation to retain the resource
identifier for group JIDs.
|
int |
compareTo(org.xmpp.packet.JID jid) |
static org.xmpp.packet.JID |
fromJID(org.xmpp.packet.JID jid)
Returns a JID from the given JID.
|
static org.xmpp.packet.JID |
fromString(String jid)
Creates a JID from the given string.
|
String |
getGroupName()
Returns the group name corresponding to this JID.
|
static boolean |
isGroup(org.xmpp.packet.JID jid)
Check a JID to determine whether it represents a group.
|
static boolean |
isGroup(org.xmpp.packet.JID jid,
boolean groupMustExist)
Check a JID to determine whether it represents a group.
|
String |
toBareJID()
Override the base class implementation to retain the resource
identifier for group JIDs.
|
public GroupJID(String name)
name
- A group name for the local domainpublic String getGroupName()
public org.xmpp.packet.JID asBareJID()
asBareJID
in class org.xmpp.packet.JID
public String toBareJID()
toBareJID
in class org.xmpp.packet.JID
public int compareTo(org.xmpp.packet.JID jid)
compareTo
in interface Comparable<org.xmpp.packet.JID>
compareTo
in class org.xmpp.packet.JID
public static boolean isGroup(org.xmpp.packet.JID jid)
jid
- A JID, possibly representing a grouppublic static boolean isGroup(org.xmpp.packet.JID jid, boolean groupMustExist) throws GroupNotFoundException
jid
- A JID, possibly representing a groupgroupMustExist
- If true, validate that the corresponding group actually existsGroupNotFoundException
- The JID represents a group, but the group does not existpublic static org.xmpp.packet.JID fromJID(org.xmpp.packet.JID jid)
jid
- A JID, possibly representing a grouppublic static org.xmpp.packet.JID fromString(String jid)
jid
- A JID, possibly representing a groupIllegalArgumentException
- the given string is not a valid JIDCopyright © 2003-2008 Jive Software.