public class RootContactGroupJabberImpl extends AbstractContactGroupJabberImpl
Constructor and Description |
---|
RootContactGroupJabberImpl(ProtocolProviderServiceJabberImpl protocolProvider)
Creates a ContactGroup instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addContact(ContactJabberImpl contact)
Adds the specified contact to the end of this group.
|
(package private) void |
addSubGroup(ContactGroupJabberImpl group)
Adds the specified group to the end of the list of sub groups.
|
boolean |
canContainSubgroups()
The ContactListRoot is the only group that can contain subgroups.
|
java.util.Iterator<Contact> |
contacts()
Returns an Iterator over all contacts, member of this
ContactGroup.
|
int |
countContacts()
Returns the number, which is always 0, of Contact members
of this ContactGroup
|
int |
countSubgroups()
Returns the number of subgroups contained by this
RootContactGroupImpl.
|
(package private) ContactJabberImpl |
findContact(java.lang.String id)
Returns the contact encapsulating with the spcieified name or
null if no such contact was found.
|
Contact |
getContact(java.lang.String id)
Returns the Contact with the specified address or
identifier.
|
ContactGroup |
getGroup(int index)
Returns the subgroup with the specified index.
|
ContactGroup |
getGroup(java.lang.String groupName)
Returns the subgroup with the specified name.
|
java.lang.String |
getGroupName()
Returns the name of this group which is always
ROOT_CONTACT_GROUP_NAME.
|
ContactGroup |
getParentContactGroup()
Returns null as this is the root contact group.
|
java.lang.String |
getPersistentData()
Returns null as no persistent data is required and the group name is
sufficient for restoring the contact.
|
ProtocolProviderService |
getProtocolProvider()
Returns the protocol provider that this group belongs to.
|
java.lang.String |
getUID()
Returns a String that uniquely represnets the group.
|
boolean |
isPersistent()
Determines whether or not this contact group is being stored by the
server.
|
boolean |
isResolved()
Determines whether or not this group has been resolved against the
server.
|
(package private) void |
removeContact(ContactJabberImpl contact)
Removes the specified contact from this contact group
|
(package private) void |
removeSubGroup(ContactGroupJabberImpl group)
Removes the specified from the list of sub groups
|
(package private) void |
removeSubGroup(int index)
Removes the sub group with the specified index.
|
java.util.Iterator<ContactGroup> |
subgroups()
Returns an iterator over the sub groups that this
ContactGroup contains.
|
java.lang.String |
toString()
Returns a string representation of the root contact group that contains
all subgroups and subcontacts of this group.
|
RootContactGroupJabberImpl(ProtocolProviderServiceJabberImpl protocolProvider)
public boolean canContainSubgroups()
public java.lang.String getGroupName()
void removeContact(ContactJabberImpl contact)
contact
- the contact to remove.public void addContact(ContactJabberImpl contact)
addContact
in class AbstractContactGroupJabberImpl
contact
- the new contact to add to this groupvoid addSubGroup(ContactGroupJabberImpl group)
group
- the group to add.void removeSubGroup(ContactGroupJabberImpl group)
group
- the group to remove.void removeSubGroup(int index)
index
- the index of the group to removepublic int countSubgroups()
public ContactGroup getParentContactGroup()
public ContactGroup getGroup(int index)
index
- the index of the ContactGroup to retrieve.public ContactGroup getGroup(java.lang.String groupName)
groupName
- the name of the ContactGroup to retrieve.public Contact getContact(java.lang.String id)
id
- the addres or identifier of the Contact we are
looking for.ContactJabberImpl findContact(java.lang.String id)
id
- the id for the contact we're looking for.public java.util.Iterator<ContactGroup> subgroups()
public int countContacts()
public java.util.Iterator<Contact> contacts()
public java.lang.String toString()
toString
in class java.lang.Object
public ProtocolProviderService getProtocolProvider()
public boolean isPersistent()
public java.lang.String getPersistentData()
public boolean isResolved()
public java.lang.String getUID()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.