@Override public List<BulletRecord> getRecords() { List<BulletRecord> list = new ArrayList<>(); list.add(data.getMetricsAsBulletRecord(provider)); return list; }
/** * Gets the metrics and the group values stored as a {@link BulletRecord}. * * @param mapping An non-null new name mapping for the names of the group fields. * @param provider A BulletRecordProvider to generate BulletRecords. * @return A non-null {@link BulletRecord} containing the data stored in this object. */ public BulletRecord getAsBulletRecord(Map<String, String> mapping, BulletRecordProvider provider) { BulletRecord record = getMetricsAsBulletRecord(provider); for (Map.Entry<String, String> e : groupFields.entrySet()) { String field = e.getKey(); String mapped = mapping.get(field); record.setString(Utilities.isEmpty(mapped) ? field : mapped, e.getValue()); } return record; }
private boolean isEqual(GroupData actual, BulletRecord expected) { return actual.getMetricsAsBulletRecord(provider).equals(expected); }