@Override public void pushTemplates(final UriTemplate resourceTemplate, final UriTemplate methodTemplate) { final Iterator<MatchResult> matchResultIterator = matchResults.iterator(); templates.push(resourceTemplate); if (methodTemplate != null) { templates.push(methodTemplate); // fast-forward the match result iterator to second element in the stack matchResultIterator.next(); } pushMatchedTemplateValues(resourceTemplate, matchResultIterator.next()); if (methodTemplate != null) { // use the match result from the top of the stack pushMatchedTemplateValues(methodTemplate, matchResults.peek()); } }
@Override public void pushTemplates(final UriTemplate resourceTemplate, final UriTemplate methodTemplate) { final Iterator<MatchResult> matchResultIterator = matchResults.iterator(); templates.push(resourceTemplate); if (methodTemplate != null) { templates.push(methodTemplate); // fast-forward the match result iterator to second element in the stack matchResultIterator.next(); } pushMatchedTemplateValues(resourceTemplate, matchResultIterator.next()); if (methodTemplate != null) { // use the match result from the top of the stack pushMatchedTemplateValues(methodTemplate, matchResults.peek()); } }
@Override public void pushTemplates(final UriTemplate resourceTemplate, final UriTemplate methodTemplate) { final Iterator<MatchResult> matchResultIterator = matchResults.iterator(); templates.push(resourceTemplate); if (methodTemplate != null) { templates.push(methodTemplate); // fast-forward the match result iterator to second element in the stack matchResultIterator.next(); } pushMatchedTemplateValues(resourceTemplate, matchResultIterator.next()); if (methodTemplate != null) { // use the match result from the top of the stack pushMatchedTemplateValues(methodTemplate, matchResults.peek()); } }
@Override public void pushTemplates(final UriTemplate resourceTemplate, final UriTemplate methodTemplate) { final Iterator<MatchResult> matchResultIterator = matchResults.iterator(); templates.push(resourceTemplate); if (methodTemplate != null) { templates.push(methodTemplate); // fast-forward the match result iterator to second element in the stack matchResultIterator.next(); } pushMatchedTemplateValues(resourceTemplate, matchResultIterator.next()); if (methodTemplate != null) { // use the match result from the top of the stack pushMatchedTemplateValues(methodTemplate, matchResults.peek()); } }
@Override public void pushTemplates(final UriTemplate resourceTemplate, final UriTemplate methodTemplate) { final Iterator<MatchResult> matchResultIterator = matchResults.iterator(); templates.push(resourceTemplate); if (methodTemplate != null) { templates.push(methodTemplate); // fast-forward the match result iterator to second element in the stack matchResultIterator.next(); } pushMatchedTemplateValues(resourceTemplate, matchResultIterator.next()); if (methodTemplate != null) { // use the match result from the top of the stack pushMatchedTemplateValues(methodTemplate, matchResults.peek()); } }
@Override public void pushTemplates(final UriTemplate resourceTemplate, final UriTemplate methodTemplate) { final Iterator<MatchResult> matchResultIterator = matchResults.iterator(); templates.push(resourceTemplate); if (methodTemplate != null) { templates.push(methodTemplate); // fast-forward the match result iterator to second element in the stack matchResultIterator.next(); } pushMatchedTemplateValues(resourceTemplate, matchResultIterator.next()); if (methodTemplate != null) { // use the match result from the top of the stack pushMatchedTemplateValues(methodTemplate, matchResults.peek()); } }
@Override public void pushTemplates(final UriTemplate resourceTemplate, final UriTemplate methodTemplate) { final Iterator<MatchResult> matchResultIterator = matchResults.iterator(); templates.push(resourceTemplate); if (methodTemplate != null) { templates.push(methodTemplate); // fast-forward the match result iterator to second element in the stack matchResultIterator.next(); } pushMatchedTemplateValues(resourceTemplate, matchResultIterator.next()); if (methodTemplate != null) { // use the match result from the top of the stack pushMatchedTemplateValues(methodTemplate, matchResults.peek()); } }