private void appendOptionalElementIDFromHint(StringBuilder sb) {
        String elementID = (String) this.hints.get(SVGHints.KEY_ELEMENT_ID);
        if (elementID != null) {
            this.hints.put(SVGHints.KEY_ELEMENT_ID, null); // clear it
            if (this.elementIDs.contains(elementID)) {
                throw new IllegalStateException("The element id " 
                        + elementID + " is already used.");
            } else {
                this.elementIDs.add(elementID);
            }
            this.sb.append("id=\"").append(elementID).append("\" ");
        }
    }
private void appendOptionalElementIDFromHint(StringBuilder sb) {
        String elementID = (String) this.hints.get(SVGHints.KEY_ELEMENT_ID);
        if (elementID != null) {
            this.hints.put(SVGHints.KEY_ELEMENT_ID, null); 
            if (this.elementIDs.contains(elementID)) {
                throw new IllegalStateException("The element id " 
                        + elementID + " is already used.");
            } else {
                this.elementIDs.add(elementID);
            }
            this.sb.append("id=\"").append(elementID).append("\" ");
        }
    }
private void appendOptionalElementIDFromHint ( StringBuilder sb ) { String elementID = ( String ) this . hints . get ( SVGHints . KEY_ELEMENT_ID ) ; if ( elementID != null ) { this . hints . put ( SVGHints . KEY_ELEMENT_ID , null ) ; // clear it if ( this . elementIDs . contains ( elementID ) ) { throw new IllegalStateException ( "The element id " + elementID + " is already used." ) ; } else { this . elementIDs . add ( elementID ) ; } this . sb . append ( "id=\"" ) . append ( elementID ) . append ( "\" " ) ; } }
A utility method that appends an optional element id if one is
specified via the rendering hints.

@param sb  the string builder ({@code null} not permitted).
A utility method that appends an optional element id if one is specified via the rendering hints .