@Test public void addToActionComparisonsTest() { Bucket.Label label = Bucket.Label.valueOf("TestLabel"); ComparisonStatistics comparisonStatistics = new ComparisonStatistics(); BucketComparison bucketComparison = new BucketComparison.Builder().withOtherLabel(label) .withJointActionComparison(comparisonStatistics).withActionComparisons(null).build(); bucketComparison.addToActionComparisons(Event.Name.valueOf("TestName"), new ActionComparisonStatistics()); assertThat(bucketComparison.getActionComparisons().size(), is(1)); }
@JsonIgnore public void addToActionComparisons(Event.Name actionName, ActionComparisonStatistics item) { if (this.actionComparisons == null) { this.actionComparisons = new HashMap<>(); } this.actionComparisons.put(actionName, item); }
BucketComparison implements Cloneable { @JsonIgnore public void addToActionComparisons(Event.Name actionName, ActionComparisonStatistics item) { if (this.actionComparisons == null) { this.actionComparisons = new HashMap<>(); } this.actionComparisons.put(actionName, item); } }
BucketComparison implements Cloneable { @JsonIgnore public void addToActionComparisons(Event.Name actionName, ActionComparisonStatistics item) { if (this.actionComparisons == null) { this.actionComparisons = new HashMap<>(); } this.actionComparisons.put(actionName, item); }  }
BucketComparison implements Cloneable { @JsonIgnore public void addToActionComparisons(Event.Name actionName, ActionComparisonStatistics item) { if (this.actionComparisons == null) { this.actionComparisons = new HashMap<>(); } this.actionComparisons.put(actionName, item); }  Bucket.Label getOtherLabel(); void setOtherLabel(Bucket.Label value); ComparisonStatistics getJointActionComparison(); void setJointActionComparison(ComparisonStatistics value); Map<Event.Name, ActionComparisonStatistics> getActionComparisons(); void setActionComparisons(Map<Event.Name, ActionComparisonStatistics> value); @JsonIgnore void addToActionComparisons(Event.Name actionName, ActionComparisonStatistics item); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override BucketComparison clone(); }
BucketComparison implements Cloneable { @JsonIgnore public void addToActionComparisons(Event.Name actionName, ActionComparisonStatistics item) { if (this.actionComparisons == null) { this.actionComparisons = new HashMap<>(); } this.actionComparisons.put(actionName, item); }  Bucket.Label getOtherLabel(); void setOtherLabel(Bucket.Label value); ComparisonStatistics getJointActionComparison(); void setJointActionComparison(ComparisonStatistics value); Map<Event.Name, ActionComparisonStatistics> getActionComparisons(); void setActionComparisons(Map<Event.Name, ActionComparisonStatistics> value); @JsonIgnore void addToActionComparisons(Event.Name actionName, ActionComparisonStatistics item); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override BucketComparison clone();  }