public String expand ( Map < String , Object > parameters ) { StringBuilder builder = new StringBuilder ( ) ; boolean previousHasContent = false ; boolean anyPreviousHasOperator = false ; for ( PathSegment segment : segments ) { String result = segment . expand ( parameters , previousHasContent , anyPreviousHasOperator ) ; if ( result == null ) { break ; } if ( segment instanceof UriTemplateParser . VariablePathSegment ) { if ( result . contains ( String . valueOf ( ( ( UriTemplateParser . VariablePathSegment ) segment ) . getOperator ( ) ) ) ) { anyPreviousHasOperator = true ; } } previousHasContent = result . length ( ) > 0 ; builder . append ( result ) ; } return builder . toString ( ) ; }
Expand the string with the given parameters .