public static String joinFilter( char operator, List<String> parts )
    {
        final StringBuilder result = new StringBuilder();
        result.append('(').append(operator);
        for ( final String part : parts )
        {
            result.append('(').append(part).append(')');
        }
        result.append(')');
        return result.toString();
    }
Joins individual strings into one, formatted as an LDAP filter, such as <code>(&(part-a)(part-b)(part-c))</code>.

@param operator the second character of the resulting string.
@param parts    The parts to be joined into one string.
@return The joined string value.
xmppserver/src/main/java/org/jivesoftware/openfire/ldap/LdapManager.java