public RosterGroup createGroup(String name) {
        final XMPPConnection connection = connection();
        if (groups.containsKey(name)) {
            return groups.get(name);
        }

        RosterGroup group = new RosterGroup(name, connection);
        groups.put(name, group);
        return group;
    }
public RosterGroup createGroup ( String name ) { final XMPPConnection connection = connection ( ) ; if ( groups . containsKey ( name ) ) { return groups . get ( name ) ; } RosterGroup group = new RosterGroup ( name , connection ) ; groups . put ( name , group ) ; return group ; }
Creates a new group.
<p>
Note: you must add at least one entry to the group for the group to be kept
after a logout/login. This is due to the way that XMPP stores group information.
</p>

@param name the name of the group.
@return a new group, or null if the group already exists