@Test void expectedExactlyTwoColumnsArray() { CovarianceFlux flux = Flux.from("telegraf").covariance(); Assertions.assertThatThrownBy(() -> flux.withColumns(new String[]{})) .isInstanceOf(IllegalArgumentException.class) .hasMessage("Exactly two columns must be provided."); Assertions.assertThatThrownBy(() -> flux.withColumns(new String[]{"val1"})) .isInstanceOf(IllegalArgumentException.class) .hasMessage("Exactly two columns must be provided."); Assertions.assertThatThrownBy(() -> flux.withColumns(new String[]{"val1", "val2", "val3"})) .isInstanceOf(IllegalArgumentException.class) .hasMessage("Exactly two columns must be provided."); }
@Nonnull public CovarianceFlux withColumns(@Nonnull final String[] columns) { Arguments.checkNotNull(columns, "Columns are required"); if (columns.length != 2) { throw new IllegalArgumentException("Exactly two columns must be provided."); } this.withPropertyValue("columns", columns); return this; }
CovarianceFlux extends AbstractParametrizedFlux { @Nonnull public CovarianceFlux withColumns(@Nonnull final String[] columns) { Arguments.checkNotNull(columns, "Columns are required"); if (columns.length != 2) { throw new IllegalArgumentException("Exactly two columns must be provided."); } this.withPropertyValue("columns", columns); return this; } }
CovarianceFlux extends AbstractParametrizedFlux { @Nonnull public CovarianceFlux withColumns(@Nonnull final String[] columns) { Arguments.checkNotNull(columns, "Columns are required"); if (columns.length != 2) { throw new IllegalArgumentException("Exactly two columns must be provided."); } this.withPropertyValue("columns", columns); return this; } CovarianceFlux(@Nonnull final Flux source); }
CovarianceFlux extends AbstractParametrizedFlux { @Nonnull public CovarianceFlux withColumns(@Nonnull final String[] columns) { Arguments.checkNotNull(columns, "Columns are required"); if (columns.length != 2) { throw new IllegalArgumentException("Exactly two columns must be provided."); } this.withPropertyValue("columns", columns); return this; } CovarianceFlux(@Nonnull final Flux source); @Nonnull CovarianceFlux withColumns(@Nonnull final String[] columns); @Nonnull CovarianceFlux withColumns(@Nonnull final Collection<String> columns); @Nonnull CovarianceFlux withPearsonr(final boolean pearsonr); @Nonnull CovarianceFlux withValueDst(@Nonnull final String valueDst); }
CovarianceFlux extends AbstractParametrizedFlux { @Nonnull public CovarianceFlux withColumns(@Nonnull final String[] columns) { Arguments.checkNotNull(columns, "Columns are required"); if (columns.length != 2) { throw new IllegalArgumentException("Exactly two columns must be provided."); } this.withPropertyValue("columns", columns); return this; } CovarianceFlux(@Nonnull final Flux source); @Nonnull CovarianceFlux withColumns(@Nonnull final String[] columns); @Nonnull CovarianceFlux withColumns(@Nonnull final Collection<String> columns); @Nonnull CovarianceFlux withPearsonr(final boolean pearsonr); @Nonnull CovarianceFlux withValueDst(@Nonnull final String valueDst);  }