@Test public void testFindTypes() throws Exception{ Set<String> expected_set = new HashSet<String>(Arrays.asList( "ubuntu12", "debian12" )); Set<String> actual_set = os_family.findTypes("ubuntu12"); Assert.assertNotNull(actual_set); Assert.assertEquals(expected_set, actual_set); }
public Set<String> findTypes(String os) { Map<String,String> pos = parse_os(os); for ( String family : osMap.keySet()) { JsonOsFamilyEntry fam = osMap.get(family); if (fam.getDistro().contains(pos.get(OS_DISTRO)) && fam.getVersions().contains(pos.get(OS_VERSION))){ Set<String> data=new HashSet<String>(); for (String item: fam.getDistro()) { data.add(item + pos.get(OS_VERSION)); } return Collections.unmodifiableSet(data); } } return Collections.emptySet(); }
OsFamily { public Set<String> findTypes(String os) { Map<String,String> pos = parse_os(os); for ( String family : osMap.keySet()) { JsonOsFamilyEntry fam = osMap.get(family); if (fam.getDistro().contains(pos.get(OS_DISTRO)) && fam.getVersions().contains(pos.get(OS_VERSION))){ Set<String> data=new HashSet<String>(); for (String item: fam.getDistro()) { data.add(item + pos.get(OS_VERSION)); } return Collections.unmodifiableSet(data); } } return Collections.emptySet(); } }
OsFamily { public Set<String> findTypes(String os) { Map<String,String> pos = parse_os(os); for ( String family : osMap.keySet()) { JsonOsFamilyEntry fam = osMap.get(family); if (fam.getDistro().contains(pos.get(OS_DISTRO)) && fam.getVersions().contains(pos.get(OS_VERSION))){ Set<String> data=new HashSet<String>(); for (String item: fam.getDistro()) { data.add(item + pos.get(OS_VERSION)); } return Collections.unmodifiableSet(data); } } return Collections.emptySet(); } OsFamily(Configuration conf);  OsFamily(Properties properties); }
OsFamily { public Set<String> findTypes(String os) { Map<String,String> pos = parse_os(os); for ( String family : osMap.keySet()) { JsonOsFamilyEntry fam = osMap.get(family); if (fam.getDistro().contains(pos.get(OS_DISTRO)) && fam.getVersions().contains(pos.get(OS_VERSION))){ Set<String> data=new HashSet<String>(); for (String item: fam.getDistro()) { data.add(item + pos.get(OS_VERSION)); } return Collections.unmodifiableSet(data); } } return Collections.emptySet(); } OsFamily(Configuration conf);  OsFamily(Properties properties); Set<String> findTypes(String os); String find(String os); String find_family(String os); Set<String> os_list(); boolean isUbuntuFamily(String osType); boolean isSuseFamily(String osType); boolean isRedhatFamily(String osType); boolean isOsInFamily(String osType, String osFamily); Map<String, String> getAliases(); }
OsFamily { public Set<String> findTypes(String os) { Map<String,String> pos = parse_os(os); for ( String family : osMap.keySet()) { JsonOsFamilyEntry fam = osMap.get(family); if (fam.getDistro().contains(pos.get(OS_DISTRO)) && fam.getVersions().contains(pos.get(OS_VERSION))){ Set<String> data=new HashSet<String>(); for (String item: fam.getDistro()) { data.add(item + pos.get(OS_VERSION)); } return Collections.unmodifiableSet(data); } } return Collections.emptySet(); } OsFamily(Configuration conf);  OsFamily(Properties properties); Set<String> findTypes(String os); String find(String os); String find_family(String os); Set<String> os_list(); boolean isUbuntuFamily(String osType); boolean isSuseFamily(String osType); boolean isRedhatFamily(String osType); boolean isOsInFamily(String osType, String osFamily); Map<String, String> getAliases();  }