ProfileNode (String profileName) { for (ProfileNode each : myProfileNodes) { if (each.getProfileName().equals(profileName)) return each; } return new ProfileNode(myMavenProjectsStructure, this, profileName); }