Object2FloatMap<String> (@NotNull Set<String> accessorNameTracker) { Object2FloatMap<String> weights = new Object2FloatOpenHashMap<>(accessorNameTracker.size()); float weight = 0; float step = (float)bindings.length / (float)accessorNameTracker.size(); for (String name : accessorNameTracker) { weights.put(name, weight); weight += step; } weight = 0; for (NestedBinding binding : bindings) { String name = binding.getAccessor().getName(); if (!weights.containsKey(name)) { weights.put(name, weight); } weight++; } return weights; }