public class RootContactGroupIcqImpl extends AbstractContactGroupIcqImpl
Constructor and Description |
---|
RootContactGroupIcqImpl(ProtocolProviderServiceIcqImpl protocolProvider)
Creates a ContactGroup instance.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addSubGroup(ContactGroupIcqImpl group)
Adds the specified group to the end of the list of sub groups.
|
(package private) void |
addSubGroup(int index,
ContactGroupIcqImpl group)
Adds the specified group at the specified position in the list of sub
groups.
|
boolean |
canContainSubgroups()
The ContactListRoot in ICQ 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
RootContactGroupIcqImpl.
|
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 |
removeSubGroup(ContactGroupIcqImpl group)
Removes the specified from the list of sub groups
|
(package private) void |
removeSubGroup(int index)
Removes the sub group with the specified index.
|
(package private) void |
reorderSubGroups(java.util.List<ContactGroupIcqImpl> newOrder)
Removes all contact sub groups and reinsterts them as specified
by the newOrder param.
|
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.
|
RootContactGroupIcqImpl(ProtocolProviderServiceIcqImpl protocolProvider)
public boolean canContainSubgroups()
public java.lang.String getGroupName()
void addSubGroup(int index, ContactGroupIcqImpl group)
index
- the position at which the specified group should be added.group
- the ContactGroup to addvoid addSubGroup(ContactGroupIcqImpl group)
group
- the group to add.void removeSubGroup(ContactGroupIcqImpl group)
group
- the group to remove.void removeSubGroup(int index)
index
- the index of the group to removevoid reorderSubGroups(java.util.List<ContactGroupIcqImpl> newOrder)
newOrder
- a list containing all contact groups in the order that is
to be applied.public 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.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.