question: public static String buildSelectorFromElementDifferentFromAndAttribute ( String elementName , String attributeName ) { StringBuilder selector = new StringBuilder ( ) ; selector . append ( NOT_PREFIX ) ; selector . append ( elementName ) ; selector . append ( CLOSE_PARENTHESE ) ; if ( attributeName != null && ! attributeName . isEmpty ( ) ) { selector . append ( OPEN_BRACKET ) ; selector . append ( attributeName ) ; selector . append ( CLOSE_BRACKET ) ; } return selector . toString ( ) ; }
target:  Build a JQuery selector to retrieve elements different from the specified type that contain a given attribute. 