Skip to content

Commit

Permalink
Issue #2162 - change "mapper" to "function"
Browse files Browse the repository at this point in the history
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
  • Loading branch information
JohnTimm committed Apr 8, 2021
1 parent 2d1f2e2 commit 610c0a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public Set<Concept> getConcepts(CodeSystem codeSystem) {
}

@Override
public <R> Set<R> getConcepts(CodeSystem codeSystem, Function<Concept, ? extends R> mapper) {
public <R> Set<R> getConcepts(CodeSystem codeSystem, Function<Concept, ? extends R> function) {
checkArgument(codeSystem);

Set<R> concepts = new LinkedHashSet<>(getCount(codeSystem));
Expand All @@ -138,7 +138,7 @@ public <R> Set<R> getConcepts(CodeSystem codeSystem, Function<Concept, ? extends
.timeLimit(timeLimit);
TimeLimitStep<?> timeLimitStep = getTimeLimitStep(g);

g.elementMap().toStream().forEach(elementMap -> concepts.add(mapper.apply(createConcept(elementMap))));
g.elementMap().toStream().forEach(elementMap -> concepts.add(function.apply(createConcept(elementMap))));

checkTimeLimit(timeLimitStep);

Expand All @@ -151,7 +151,7 @@ public Set<Concept> getConcepts(CodeSystem codeSystem, List<Filter> filters) {
}

@Override
public <R> Set<R> getConcepts(CodeSystem codeSystem, List<Filter> filters, Function<Concept, ? extends R> mapper) {
public <R> Set<R> getConcepts(CodeSystem codeSystem, List<Filter> filters, Function<Concept, ? extends R> function) {
checkArguments(codeSystem, filters);

Set<R> concepts = new LinkedHashSet<>();
Expand Down Expand Up @@ -203,7 +203,7 @@ public <R> Set<R> getConcepts(CodeSystem codeSystem, List<Filter> filters, Funct
g = g.timeLimit(timeLimit);
TimeLimitStep<?> timeLimitStep = getTimeLimitStep(g);

g.elementMap().toStream().forEach(elementMap -> concepts.add(mapper.apply(createConcept(elementMap))));
g.elementMap().toStream().forEach(elementMap -> concepts.add(function.apply(createConcept(elementMap))));

checkTimeLimit(timeLimitStep);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public Set<Concept> getConcepts(CodeSystem codeSystem) {
}

@Override
public <R> Set<R> getConcepts(CodeSystem codeSystem, Function<Concept, ? extends R> mapper) {
return CodeSystemSupport.getConcepts(codeSystem, mapper);
public <R> Set<R> getConcepts(CodeSystem codeSystem, Function<Concept, ? extends R> function) {
return CodeSystemSupport.getConcepts(codeSystem, function);
}

@Override
Expand All @@ -56,9 +56,9 @@ public Set<Concept> getConcepts(CodeSystem codeSystem, List<Filter> filters) {
}

@Override
public <R> Set<R> getConcepts(CodeSystem codeSystem, List<Filter> filters, Function<Concept, ? extends R> mapper) {
public <R> Set<R> getConcepts(CodeSystem codeSystem, List<Filter> filters, Function<Concept, ? extends R> function) {
try {
return CodeSystemSupport.getConcepts(codeSystem, filters, mapper);
return CodeSystemSupport.getConcepts(codeSystem, filters, function);
} catch (FHIRTermException e) {
throw new FHIRTermServiceException(e.getMessage(), e, e.getIssues());
}
Expand Down

0 comments on commit 610c0a4

Please sign in to comment.