@Test public void testClone() { Date date = new Date(); Parameters parameters = new Parameters(); parameters.setMetric(BinomialMetrics.NORMAL_APPROX_SYM); parameters.setConfidenceLevel(0.6); parameters.setEffectSize(-0.9); parameters.setSingleShot(false); parameters.setTimeZone(TimeZone.getTimeZone("PST")); parameters.setToTime(date); parameters.setFromTime(date); Parameters clonedParameters = parameters.clone(); assertThat(clonedParameters.hashCode(), is(parameters.hashCode())); assertThat(clonedParameters.getMode(), is(parameters.getMode())); assertThat(clonedParameters.getActions(), is(parameters.getActions())); assertThat(clonedParameters.getContext(), is(parameters.getContext())); assertThat(clonedParameters.equals(parameters), is(true)); clonedParameters.setContext(Context.valueOf("TEST")); assertThat(clonedParameters.getContext(), is(Context.valueOf("TEST"))); List<String> acts = new ArrayList<>(); clonedParameters.setActions(acts); assertThat(clonedParameters.getActions(), is(acts)); }
@Override public Parameters clone() { try { return (Parameters) super.clone(); } catch (CloneNotSupportedException e) { throw new AnalyticsException("Parameters clone not supported: " + e.getMessage(), e); } }
Parameters implements Cloneable { @Override public Parameters clone() { try { return (Parameters) super.clone(); } catch (CloneNotSupportedException e) { throw new AnalyticsException("Parameters clone not supported: " + e.getMessage(), e); } } }
Parameters implements Cloneable { @Override public Parameters clone() { try { return (Parameters) super.clone(); } catch (CloneNotSupportedException e) { throw new AnalyticsException("Parameters clone not supported: " + e.getMessage(), e); } }  }
Parameters implements Cloneable { @Override public Parameters clone() { try { return (Parameters) super.clone(); } catch (CloneNotSupportedException e) { throw new AnalyticsException("Parameters clone not supported: " + e.getMessage(), e); } }  TimeZone getTimeZone(); void setTimeZone(TimeZone timeZone); Date getFromTime(); void setFromTime(Date fromTime); Date getToTime(); void setToTime(Date toTime); Context getContext(); void setContext(Context value); List<String> getActions(); void setActions(List<String> acts); BinomialMetrics getMetric(); void setMetric(BinomialMetrics met); Double getConfidenceLevel(); void setConfidenceLevel(Double confidenceLevel); Double getEffectSize(); void setEffectSize(Double effectSize); Boolean isSingleShot(); void setSingleShot(Boolean singleShot); Mode getMode(); BinomialMetric getMetricImpl(); void parse(); @Override Parameters clone(); @Override boolean equals(Object obj); @Override int hashCode(); }
Parameters implements Cloneable { @Override public Parameters clone() { try { return (Parameters) super.clone(); } catch (CloneNotSupportedException e) { throw new AnalyticsException("Parameters clone not supported: " + e.getMessage(), e); } }  TimeZone getTimeZone(); void setTimeZone(TimeZone timeZone); Date getFromTime(); void setFromTime(Date fromTime); Date getToTime(); void setToTime(Date toTime); Context getContext(); void setContext(Context value); List<String> getActions(); void setActions(List<String> acts); BinomialMetrics getMetric(); void setMetric(BinomialMetrics met); Double getConfidenceLevel(); void setConfidenceLevel(Double confidenceLevel); Double getEffectSize(); void setEffectSize(Double effectSize); Boolean isSingleShot(); void setSingleShot(Boolean singleShot); Mode getMode(); BinomialMetric getMetricImpl(); void parse(); @Override Parameters clone(); @Override boolean equals(Object obj); @Override int hashCode();  }