class Groups {

    public synchronized Group get( String name )
    {
        if ( isGlobalGroup( name ) )
        {
            return Group.GLOBAL;
        }

        Group group = byName.get( name );
        if ( group == null )
        {
            throw new HeaderException( "Group '" + name + "' not found. Available groups are: " + groupNames() );
        }
        return group;
    }

}