MCPcopy Create free account
hub / github.com/FabricMC/Matcher / sanitizeMatches

Method sanitizeMatches

src/main/java/matcher/Matcher.java:749–762  ·  view source on GitHub ↗
(Map<T, T> matches)

Source from the content-addressed store, hash-verified

747 }
748
749 public static <T> void sanitizeMatches(Map<T, T> matches) {
750 Set<T> matched = Collections.newSetFromMap(new IdentityHashMap<>(matches.size()));
751 Set<T> conflictingMatches = Collections.newSetFromMap(new IdentityHashMap<>());
752
753 for (T cls : matches.values()) {
754 if (!matched.add(cls)) {
755 conflictingMatches.add(cls);
756 }
757 }
758
759 if (!conflictingMatches.isEmpty()) {
760 matches.values().removeAll(conflictingMatches);
761 }
762 }
763
764 public MatchingStatus getStatus(boolean inputsOnly) {
765 int totalClassCount = 0;

Callers 3

autoMatchClassesMethod · 0.95
matchMethod · 0.95
autoMatchMethodVarsMethod · 0.95

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected