public Builder() { this.item = new BucketComparison(); }
ComparisonStatistics jointComparison = comparison.getJointActionComparison(); if (comparison.getJointActionComparison().getClearComparisonWinner() != null) { if (comparison.getActionComparisons() != null) { actionNames.addAll(comparison.getActionComparisons().keySet()); if (bucket.getBucketComparisons() != null) { for (BucketComparison comparison : bucket.getBucketComparisons().values()) { Bucket.Label winnerName = comparison.getJointActionComparison().getClearComparisonWinner(); Bucket.Label otherBucketName = comparison.getOtherLabel(); for (BucketComparison comparison : bucket.getBucketComparisons().values()) { ActionComparisonStatistics action = comparison.getActionComparisons().get(actionName); if (action != null) { if (action.getClearComparisonWinner() != null) { if (bucket.getBucketComparisons() != null) { for (BucketComparison comparison : bucket.getBucketComparisons().values()) { ActionComparisonStatistics action = comparison.getActionComparisons().get(actionName); if (action != null) { Bucket.Label winnerName = action.getClearComparisonWinner(); Bucket.Label otherBucketName = comparison.getOtherLabel();
@Override public BucketComparison clone() { BucketComparison cloned; try { cloned = (BucketComparison) super.clone(); } catch (CloneNotSupportedException e) { // Should never happen throw new AnalyticsException("BucketComparison clone not supported: " + e.getMessage(), e); } if (jointActionComparison != null) { cloned.setJointActionComparison(jointActionComparison.clone()); } if (actionComparisons != null) { Map<Event.Name, ActionComparisonStatistics> clonedActions = new HashMap<>(); for (Entry<Name, ActionComparisonStatistics> entry : actionComparisons.entrySet()) { clonedActions.put(entry.getKey(), entry.getValue().clone()); } cloned.setActionComparisons(clonedActions); } return cloned; }
@Override public BucketStatistics clone() { BucketStatistics cloned = (BucketStatistics) super.clone(); if (bucketComparisons != null) { Map<Bucket.Label, BucketComparison> clonedComparisons = new HashMap<>(); for (Entry<Label, BucketComparison> entry : bucketComparisons.entrySet()) { clonedComparisons.put(entry.getKey(), entry.getValue().clone()); } cloned.setBucketComparisons(clonedComparisons); } return cloned; } }