@Test public void testCloneObjectsEqual() { ExperimentBasicStatistics ebs1 = new ExperimentBasicStatistics.Builder() .withJointActionCounts(new Counts.Builder().withEventCount(1).build()).build(); ExperimentBasicStatistics ebs2 = ebs1.clone(); assertThat(ebs1, equalTo(ebs2)); }
@Override public ExperimentBasicStatistics clone() { ExperimentBasicStatistics cloned = (ExperimentBasicStatistics) super.clone(); if (buckets != null) { Map<Bucket.Label, BucketBasicStatistics> clonedBuckets = new HashMap<>(); for (Entry<Label, BucketBasicStatistics> entry : buckets.entrySet()) { clonedBuckets.put(entry.getKey(), entry.getValue().clone()); } cloned.setBuckets(clonedBuckets); } return cloned; }
ExperimentBasicStatistics extends AbstractContainerStatistics { @Override public ExperimentBasicStatistics clone() { ExperimentBasicStatistics cloned = (ExperimentBasicStatistics) super.clone(); if (buckets != null) { Map<Bucket.Label, BucketBasicStatistics> clonedBuckets = new HashMap<>(); for (Entry<Label, BucketBasicStatistics> entry : buckets.entrySet()) { clonedBuckets.put(entry.getKey(), entry.getValue().clone()); } cloned.setBuckets(clonedBuckets); } return cloned; } }
ExperimentBasicStatistics extends AbstractContainerStatistics { @Override public ExperimentBasicStatistics clone() { ExperimentBasicStatistics cloned = (ExperimentBasicStatistics) super.clone(); if (buckets != null) { Map<Bucket.Label, BucketBasicStatistics> clonedBuckets = new HashMap<>(); for (Entry<Label, BucketBasicStatistics> entry : buckets.entrySet()) { clonedBuckets.put(entry.getKey(), entry.getValue().clone()); } cloned.setBuckets(clonedBuckets); } return cloned; }  }
ExperimentBasicStatistics extends AbstractContainerStatistics { @Override public ExperimentBasicStatistics clone() { ExperimentBasicStatistics cloned = (ExperimentBasicStatistics) super.clone(); if (buckets != null) { Map<Bucket.Label, BucketBasicStatistics> clonedBuckets = new HashMap<>(); for (Entry<Label, BucketBasicStatistics> entry : buckets.entrySet()) { clonedBuckets.put(entry.getKey(), entry.getValue().clone()); } cloned.setBuckets(clonedBuckets); } return cloned; }  Map<Bucket.Label, BucketBasicStatistics> getBuckets(); void setBuckets(Map<Bucket.Label, BucketBasicStatistics> value); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override ExperimentBasicStatistics clone(); }
ExperimentBasicStatistics extends AbstractContainerStatistics { @Override public ExperimentBasicStatistics clone() { ExperimentBasicStatistics cloned = (ExperimentBasicStatistics) super.clone(); if (buckets != null) { Map<Bucket.Label, BucketBasicStatistics> clonedBuckets = new HashMap<>(); for (Entry<Label, BucketBasicStatistics> entry : buckets.entrySet()) { clonedBuckets.put(entry.getKey(), entry.getValue().clone()); } cloned.setBuckets(clonedBuckets); } return cloned; }  Map<Bucket.Label, BucketBasicStatistics> getBuckets(); void setBuckets(Map<Bucket.Label, BucketBasicStatistics> value); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override ExperimentBasicStatistics clone();  }