Package rocks.xmpp.im.roster.model
Class ContactGroup
- java.lang.Object
-
- rocks.xmpp.im.roster.model.ContactGroup
-
- All Implemented Interfaces:
Comparable<ContactGroup>
public final class ContactGroup extends Object implements Comparable<ContactGroup>
Represents a contact group in the user's roster. A group consists of contacts and may contain nested sub-groups.This class is conditionally thread-safe.
-
-
Constructor Summary
Constructors Constructor Description ContactGroup(String name, String fullName, ContactGroup parentGroup)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(ContactGroup o)
boolean
equals(Object o)
Collection<Contact>
getContacts()
Gets the contacts in this group.String
getFullName()
Gets the full name of the group.Collection<ContactGroup>
getGroups()
Gets the nested sub-groups of this group.String
getName()
Gets the name of the group.ContactGroup
getParentGroup()
Gets the parent group.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
ContactGroup
public ContactGroup(String name, String fullName, ContactGroup parentGroup)
-
-
Method Detail
-
getName
public final String getName()
Gets the name of the group.- Returns:
- The name.
-
getFullName
public final String getFullName()
Gets the full name of the group.- Returns:
- The full name.
-
getGroups
public final Collection<ContactGroup> getGroups()
Gets the nested sub-groups of this group. The returned collection is mutable and not thread-safe.- Returns:
- The nested groups.
-
getContacts
public final Collection<Contact> getContacts()
Gets the contacts in this group. The returned collection is mutable and not thread-safe.- Returns:
- The contacts.
-
getParentGroup
public final ContactGroup getParentGroup()
Gets the parent group.- Returns:
- The parent group or null, if it has no parent.
-
compareTo
public final int compareTo(ContactGroup o)
- Specified by:
compareTo
in interfaceComparable<ContactGroup>
-
-