@Test public void testGetFilterNames() { String filter1 = "filter1"; String filter2 = "filter2"; IpAccessList ipAccessList1 = IpAccessList.builder().setName(filter1).build(); IpAccessList ipAccessList2 = IpAccessList.builder().setName(filter2).build(); Map<String, Configuration> configs = new HashMap<>(); Configuration config = createTestConfiguration("config1", ConfigurationFormat.HOST); config.setIpAccessLists(ImmutableSortedMap.of(filter1, ipAccessList1, filter2, ipAccessList2)); configs.put("config1", config); assertThat(getFilterNames(configs), equalTo(ImmutableSet.of(filter1, filter2))); }
public static Set<String> getFilterNames(Map<String, Configuration> configurations) { ImmutableSet.Builder<String> filterNames = ImmutableSet.builder(); configurations .values() .forEach(configuration -> filterNames.addAll(configuration.getIpAccessLists().keySet())); return filterNames.build(); }
CompletionMetadataUtils { public static Set<String> getFilterNames(Map<String, Configuration> configurations) { ImmutableSet.Builder<String> filterNames = ImmutableSet.builder(); configurations .values() .forEach(configuration -> filterNames.addAll(configuration.getIpAccessLists().keySet())); return filterNames.build(); } }
CompletionMetadataUtils { public static Set<String> getFilterNames(Map<String, Configuration> configurations) { ImmutableSet.Builder<String> filterNames = ImmutableSet.builder(); configurations .values() .forEach(configuration -> filterNames.addAll(configuration.getIpAccessLists().keySet())); return filterNames.build(); } private  CompletionMetadataUtils(); }
CompletionMetadataUtils { public static Set<String> getFilterNames(Map<String, Configuration> configurations) { ImmutableSet.Builder<String> filterNames = ImmutableSet.builder(); configurations .values() .forEach(configuration -> filterNames.addAll(configuration.getIpAccessLists().keySet())); return filterNames.build(); } private  CompletionMetadataUtils(); static Set<String> getFilterNames(Map<String, Configuration> configurations); static Set<NodeInterfacePair> getInterfaces(Map<String, Configuration> configurations); static Map<Ip, IpCompletionMetadata> getIps(Map<String, Configuration> configurations); static Set<String> getMlagIds(Map<String, Configuration> configurations); static Map<String, NodeCompletionMetadata> getNodes(
      Map<String, Configuration> configurations); static Set<String> getPrefixes(Map<String, Configuration> configurations); static Set<String> getRoutingPolicyNames(Map<String, Configuration> configurations); static Set<Location> getSourceLocationsWithSrcIps(
      Map<Location, LocationInfo> locationInfo); static Set<String> getStructureNames(Map<String, Configuration> configurations); static Set<String> getVrfs(Map<String, Configuration> configurations); static Set<String> getZones(Map<String, Configuration> configurations); }
CompletionMetadataUtils { public static Set<String> getFilterNames(Map<String, Configuration> configurations) { ImmutableSet.Builder<String> filterNames = ImmutableSet.builder(); configurations .values() .forEach(configuration -> filterNames.addAll(configuration.getIpAccessLists().keySet())); return filterNames.build(); } private  CompletionMetadataUtils(); static Set<String> getFilterNames(Map<String, Configuration> configurations); static Set<NodeInterfacePair> getInterfaces(Map<String, Configuration> configurations); static Map<Ip, IpCompletionMetadata> getIps(Map<String, Configuration> configurations); static Set<String> getMlagIds(Map<String, Configuration> configurations); static Map<String, NodeCompletionMetadata> getNodes(
      Map<String, Configuration> configurations); static Set<String> getPrefixes(Map<String, Configuration> configurations); static Set<String> getRoutingPolicyNames(Map<String, Configuration> configurations); static Set<Location> getSourceLocationsWithSrcIps(
      Map<Location, LocationInfo> locationInfo); static Set<String> getStructureNames(Map<String, Configuration> configurations); static Set<String> getVrfs(Map<String, Configuration> configurations); static Set<String> getZones(Map<String, Configuration> configurations); static Map<Ip, String> WELL_KNOWN_IPS; }