private JsonArrayBuilder createBandStatsJsonArrayObject(List<BandStat> bandStats) { JsonArrayBuilder jsonArrayObject = factory.createArrayBuilder(); for (BandStat bandStat : bandStats) { jsonArrayObject.add(factory.createObjectBuilder() .add(properties.getProperty("BAND_ID"), bandStat.getBandId().getValue()) .add(properties.getProperty("BYT_BAND_COUNT"), bandStat.getByteBandCount().getValue()) .add(properties.getProperty("KEY"), bandStat.getKey().getBandId().getValue()) .add(properties.getProperty("PCK_BAND_COUNT"), bandStat.getPacketBandCount().getValue())); } return jsonArrayObject; }
public BandStatBuilder(BandStat base) { if (base.getKey() == null) { this._key = new BandStatKey( base.getBandId() ); this._bandId = base.getBandId(); } else { this._key = base.getKey(); this._bandId = _key.getBandId(); } this._byteBandCount = base.getByteBandCount(); this._packetBandCount = base.getPacketBandCount(); if (base instanceof BandStatImpl) { BandStatImpl _impl = (BandStatImpl) base; this.augmentation = new HashMap<>(_impl.augmentation); } }