Skip to content

Commit

Permalink
better variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
msridhar committed Dec 4, 2018
1 parent 9c8bd33 commit 05b2707
Showing 1 changed file with 8 additions and 8 deletions.
Expand Up @@ -630,18 +630,18 @@ private NameIndexedMap<Boolean> makeOptimizedBoolLookup(
}

private <T> NameIndexedMap<T> makeOptimizedLookup(
Names names, Set<MethodRef> refs, Function<MethodRef, T> fun) {
Map<Name, Map<MethodRef, T>> finalThing = new LinkedHashMap<>();
Names names, Set<MethodRef> refs, Function<MethodRef, T> getValForRef) {
Map<Name, Map<MethodRef, T>> nameMapping = new LinkedHashMap<>();
for (MethodRef ref : refs) {
Name methodName = names.fromString(ref.methodName);
Map<MethodRef, T> forName = finalThing.get(methodName);
if (forName == null) {
forName = new LinkedHashMap<>();
finalThing.put(methodName, forName);
Map<MethodRef, T> mapForName = nameMapping.get(methodName);
if (mapForName == null) {
mapForName = new LinkedHashMap<>();
nameMapping.put(methodName, mapForName);
}
forName.put(ref, fun.apply(ref));
mapForName.put(ref, getValForRef.apply(ref));
}
return new NameIndexedMap<>(finalThing);
return new NameIndexedMap<>(nameMapping);
}

/**
Expand Down

0 comments on commit 05b2707

Please sign in to comment.