ConfigFileVersion (ConfigFileMetaData metaData, String name) { for (ConfigFileVersion version : metaData.getVersions()) { if (name.equals(version.getName())) { return version; } } return metaData.getDefaultVersion(); }