@Test @SuppressWarnings("null") public void testOfKeyValue() { assertThatThrownBy(() -> DataSource.of(null, VERSION, K1, V1)).isInstanceOf(NullPointerException.class); assertThatThrownBy(() -> DataSource.of(PNAME, null, K1, V1)).isInstanceOf(NullPointerException.class); assertThatThrownBy(() -> DataSource.of(PNAME, VERSION, null, V1)).isInstanceOf(NullPointerException.class); assertThatThrownBy(() -> DataSource.of(PNAME, VERSION, K1, null)).isInstanceOf(NullPointerException.class); assertThat(DataSource.of(PNAME, VERSION, K1, V1)).isEqualTo(ONE); }
@NonNull public static DataSource of(@NonNull String providerName, @NonNull String version) { Objects.requireNonNull(providerName, "providerName"); Objects.requireNonNull(version, "version"); return new DataSource(providerName, version, ImmutableSortedMap.of()); }
DataSource implements IConfig, Serializable { @NonNull public static DataSource of(@NonNull String providerName, @NonNull String version) { Objects.requireNonNull(providerName, "providerName"); Objects.requireNonNull(version, "version"); return new DataSource(providerName, version, ImmutableSortedMap.of()); } }
DataSource implements IConfig, Serializable { @NonNull public static DataSource of(@NonNull String providerName, @NonNull String version) { Objects.requireNonNull(providerName, "providerName"); Objects.requireNonNull(version, "version"); return new DataSource(providerName, version, ImmutableSortedMap.of()); } @VisibleForTesting  DataSource(@NonNull String providerName, @NonNull String version, @NonNull ImmutableSortedMap<String, String> params); }
DataSource implements IConfig, Serializable { @NonNull public static DataSource of(@NonNull String providerName, @NonNull String version) { Objects.requireNonNull(providerName, "providerName"); Objects.requireNonNull(version, "version"); return new DataSource(providerName, version, ImmutableSortedMap.of()); } @VisibleForTesting  DataSource(@NonNull String providerName, @NonNull String version, @NonNull ImmutableSortedMap<String, String> params); @NonNull String getProviderName(); @NonNull String getVersion(); @Override SortedMap<String, String> getParams(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); @NonNull Builder toBuilder(); @NonNull static DataSource of(@NonNull String providerName, @NonNull String version); @NonNull static DataSource of(@NonNull String providerName, @NonNull String version, @NonNull String key, @NonNull String value); @NonNull static DataSource deepCopyOf(@NonNull String providerName, @NonNull String version, @NonNull Map<String, String> params); @NonNull static Builder builder(@NonNull String providerName, @NonNull String version); @Deprecated @NonNull static Builder builder(@NonNull DataSource dataSource); static Formatters.@NonNull Formatter<DataSource> xmlFormatter(boolean formattedOutput); static Parsers.@NonNull Parser<DataSource> xmlParser(); static Formatters.@NonNull Formatter<DataSource> uriFormatter(); static Parsers.@NonNull Parser<DataSource> uriParser(); }
DataSource implements IConfig, Serializable { @NonNull public static DataSource of(@NonNull String providerName, @NonNull String version) { Objects.requireNonNull(providerName, "providerName"); Objects.requireNonNull(version, "version"); return new DataSource(providerName, version, ImmutableSortedMap.of()); } @VisibleForTesting  DataSource(@NonNull String providerName, @NonNull String version, @NonNull ImmutableSortedMap<String, String> params); @NonNull String getProviderName(); @NonNull String getVersion(); @Override SortedMap<String, String> getParams(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); @NonNull Builder toBuilder(); @NonNull static DataSource of(@NonNull String providerName, @NonNull String version); @NonNull static DataSource of(@NonNull String providerName, @NonNull String version, @NonNull String key, @NonNull String value); @NonNull static DataSource deepCopyOf(@NonNull String providerName, @NonNull String version, @NonNull Map<String, String> params); @NonNull static Builder builder(@NonNull String providerName, @NonNull String version); @Deprecated @NonNull static Builder builder(@NonNull DataSource dataSource); static Formatters.@NonNull Formatter<DataSource> xmlFormatter(boolean formattedOutput); static Parsers.@NonNull Parser<DataSource> xmlParser(); static Formatters.@NonNull Formatter<DataSource> uriFormatter(); static Parsers.@NonNull Parser<DataSource> uriParser();  }