@Test public void testAddCount() { Counts addCounter = new Counts.Builder().withEventCount(eventCount).withUniqueUserCount(uniqueUserCount).build(); assertThat(counter, equalTo(addCounter)); long addEventValue = 100000; long addUserValue = 100000; addCounter = new Counts.Builder().withEventCount(addEventValue).withUniqueUserCount(addUserValue).build(); counter.addCount(addCounter); assertThat(counter.getEventCount(), equalTo(eventCount + addEventValue)); assertThat(counter.getUniqueUserCount(), equalTo(uniqueUserCount + addUserValue)); }
@JsonIgnore public void addCount(Counts value) { this.eventCount = this.eventCount + value.getEventCount(); this.uniqueUserCount = this.uniqueUserCount + value.getUniqueUserCount(); }
Counts implements Cloneable { @JsonIgnore public void addCount(Counts value) { this.eventCount = this.eventCount + value.getEventCount(); this.uniqueUserCount = this.uniqueUserCount + value.getUniqueUserCount(); } }
Counts implements Cloneable { @JsonIgnore public void addCount(Counts value) { this.eventCount = this.eventCount + value.getEventCount(); this.uniqueUserCount = this.uniqueUserCount + value.getUniqueUserCount(); } Counts();  Counts(long eventCount, long uniqueUserCount); }
Counts implements Cloneable { @JsonIgnore public void addCount(Counts value) { this.eventCount = this.eventCount + value.getEventCount(); this.uniqueUserCount = this.uniqueUserCount + value.getUniqueUserCount(); } Counts();  Counts(long eventCount, long uniqueUserCount); @JsonIgnore void addEventCount(long value); @JsonIgnore void addCount(Counts value); @JsonIgnore void addUniqueUserCount(long value); long getEventCount(); void setEventCount(long value); long getUniqueUserCount(); void setUniqueUserCount(long value); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override Counts clone(); }
Counts implements Cloneable { @JsonIgnore public void addCount(Counts value) { this.eventCount = this.eventCount + value.getEventCount(); this.uniqueUserCount = this.uniqueUserCount + value.getUniqueUserCount(); } Counts();  Counts(long eventCount, long uniqueUserCount); @JsonIgnore void addEventCount(long value); @JsonIgnore void addCount(Counts value); @JsonIgnore void addUniqueUserCount(long value); long getEventCount(); void setEventCount(long value); long getUniqueUserCount(); void setUniqueUserCount(long value); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override Counts clone();  }