@Test public void testGetInterfaces() { String nodeName = "nodeName"; String int1 = "int1"; String int2 = "int2"; Map<String, Configuration> configs = new HashMap<>(); Configuration config = createTestConfiguration(nodeName, ConfigurationFormat.HOST, int1, int2); configs.put(nodeName, config); assertThat( getInterfaces(configs), equalTo( ImmutableSet.of( NodeInterfacePair.of(nodeName, int1), NodeInterfacePair.of(nodeName, int2)))); }
public static Set<NodeInterfacePair> getInterfaces(Map<String, Configuration> configurations) { ImmutableSet.Builder<NodeInterfacePair> interfaces = ImmutableSet.builder(); configurations .values() .forEach( configuration -> configuration.getAllInterfaces().values().stream() .map(NodeInterfacePair::of) .forEach(interfaces::add)); return interfaces.build(); }
CompletionMetadataUtils { public static Set<NodeInterfacePair> getInterfaces(Map<String, Configuration> configurations) { ImmutableSet.Builder<NodeInterfacePair> interfaces = ImmutableSet.builder(); configurations .values() .forEach( configuration -> configuration.getAllInterfaces().values().stream() .map(NodeInterfacePair::of) .forEach(interfaces::add)); return interfaces.build(); } }
CompletionMetadataUtils { public static Set<NodeInterfacePair> getInterfaces(Map<String, Configuration> configurations) { ImmutableSet.Builder<NodeInterfacePair> interfaces = ImmutableSet.builder(); configurations .values() .forEach( configuration -> configuration.getAllInterfaces().values().stream() .map(NodeInterfacePair::of) .forEach(interfaces::add)); return interfaces.build(); } private  CompletionMetadataUtils(); }
CompletionMetadataUtils { public static Set<NodeInterfacePair> getInterfaces(Map<String, Configuration> configurations) { ImmutableSet.Builder<NodeInterfacePair> interfaces = ImmutableSet.builder(); configurations .values() .forEach( configuration -> configuration.getAllInterfaces().values().stream() .map(NodeInterfacePair::of) .forEach(interfaces::add)); return interfaces.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<NodeInterfacePair> getInterfaces(Map<String, Configuration> configurations) { ImmutableSet.Builder<NodeInterfacePair> interfaces = ImmutableSet.builder(); configurations .values() .forEach( configuration -> configuration.getAllInterfaces().values().stream() .map(NodeInterfacePair::of) .forEach(interfaces::add)); return interfaces.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; }