DefinitionMap (int varIndex, @NotNull Instruction instruction) { if (varIndex == 0) { return this; } Int2ObjectMap<IntSet> newMap = new Int2ObjectOpenHashMap<>(myMap); IntSet defs = new IntArraySet(1); newMap.put(varIndex, defs); defs.add(instruction.num()); return new DefinitionMap(newMap); }