@Override public BucketCounts clone() { return (BucketCounts) super.clone(); }
@Override public AbstractContainerCounts clone() { AbstractContainerCounts cloned; try { cloned = (AbstractContainerCounts) super.clone(); } catch (CloneNotSupportedException e) { // Should never happen throw new AnalyticsException("AbstractContainerCounts clone not supported: " + e.getMessage(), e); } if (impressionCounts != null) { cloned.setImpressionCounts(impressionCounts.clone()); } if (jointActionCounts != null) { cloned.setJointActionCounts(jointActionCounts.clone()); } if (actionCounts != null) { Map<Event.Name, ActionCounts> clonedActions = new HashMap<>(); for (Entry<Name, ActionCounts> entry : actionCounts.entrySet()) { clonedActions.put(entry.getKey(), entry.getValue().clone()); } cloned.setActionCounts(clonedActions); } return cloned; } }
@Override public ExperimentCounts clone() { ExperimentCounts cloned = (ExperimentCounts) super.clone(); if (buckets != null) { Map<Bucket.Label, BucketCounts> clonedBuckets = new HashMap<>(); for (Entry<Label, BucketCounts> entry : buckets.entrySet()) { clonedBuckets.put(entry.getKey(), entry.getValue().clone()); } cloned.setBuckets(clonedBuckets); } return cloned; }
@Override public AbstractContainerStatistics clone() { AbstractContainerStatistics cloned = (AbstractContainerStatistics) super.clone(); if (jointActionRate != null) { cloned.setJointActionRate(jointActionRate.clone()); } if (actionRates != null) { Map<Event.Name, ActionRate> clonedActions = new HashMap<>(); for (Entry<Name, ActionRate> entry : actionRates.entrySet()) { clonedActions.put(entry.getKey(), entry.getValue().clone()); } cloned.setActionRates(clonedActions); } return cloned; } }