Sdk (@Nullable final Sdk modelJdk) { for (Map.Entry<Sdk, Sdk> entry : myProjectSdks.entrySet()) { Sdk jdk = entry.getKey(); if (Comparing.equal(entry.getValue(), modelJdk)) { return jdk; } } return null; }