@Test public void testGetInterface() { String iface = "iface"; InterfaceRuntimeData ifaceData = InterfaceRuntimeData.EMPTY_INTERFACE_RUNTIME_DATA; RuntimeData data = RuntimeData.builder().setInterfaces(ImmutableMap.of(iface, ifaceData)).build(); assertThat(data.getInterface(iface), equalTo(ifaceData)); assertNull(data.getInterface("other")); }
@JsonIgnore @Nullable public InterfaceRuntimeData getInterface(String ifaceName) { return _interfaces.get(ifaceName); }
RuntimeData { @JsonIgnore @Nullable public InterfaceRuntimeData getInterface(String ifaceName) { return _interfaces.get(ifaceName); } }
RuntimeData { @JsonIgnore @Nullable public InterfaceRuntimeData getInterface(String ifaceName) { return _interfaces.get(ifaceName); } @VisibleForTesting private  RuntimeData(@Nonnull Map<String, InterfaceRuntimeData> interfaces); }
RuntimeData { @JsonIgnore @Nullable public InterfaceRuntimeData getInterface(String ifaceName) { return _interfaces.get(ifaceName); } @VisibleForTesting private  RuntimeData(@Nonnull Map<String, InterfaceRuntimeData> interfaces); static Builder builder(); @JsonIgnore @Nullable InterfaceRuntimeData getInterface(String ifaceName); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override String toString(); }
RuntimeData { @JsonIgnore @Nullable public InterfaceRuntimeData getInterface(String ifaceName) { return _interfaces.get(ifaceName); } @VisibleForTesting private  RuntimeData(@Nonnull Map<String, InterfaceRuntimeData> interfaces); static Builder builder(); @JsonIgnore @Nullable InterfaceRuntimeData getInterface(String ifaceName); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override String toString(); static final RuntimeData EMPTY_RUNTIME_DATA; }