public TechUsageStatSum add(TechnologyUsageStatisticsModel stat) { if (!"".equals(this.name) && !this.name.equals(stat.getName())) throw new IllegalArgumentException("Can't add up stats, " + this.name + " != " + stat.getName()); this.count += stat.getOccurrenceCount(); this.tags.addAll(stat.getTags()); return this; }
public TechUsageStatSum add(TechnologyUsageStatisticsModel stat) { if (!"".equals(this.name) && !this.name.equals(stat.getName())) throw new IllegalArgumentException("Can't add up stats, " + this.name + " != " + stat.getName()); this.count += stat.getOccurrenceCount(); this.tags.addAll(stat.getTags()); return this; }
private boolean matchesExpectations(TechnologyUsageStatisticsModel model) { if (!StringUtils.equals(this.technologyName, model.getName())) return false; if (this.expectedCount != model.getOccurrenceCount()) return false; return model.getTags().containsAll(this.expectedTags); }
private boolean matchesExpectations(TechnologyUsageStatisticsModel model) { if (!StringUtils.equals(this.technologyName, model.getName())) return false; if (this.expectedCount != model.getOccurrenceCount()) return false; return model.getTags().containsAll(this.expectedTags); }