List<Parameters> (@NotNull Target target) { ArrayList<Parameters> result = new ArrayList<>(); synchronized (myProcMap) { for (Pair<Target, Parameters> pair : myProcMap.keySet()) { if (pair.first == target) { result.add(pair.second); } } } if (RemoteObject.IN_PROCESS) { synchronized (myInProcMap) { for (Pair<Target, Parameters> pair : myInProcMap.keySet()) { if (pair.first == target) { result.add(pair.second); } } } } return result; }