package com.applovin.impl.mediation; import com.applovin.mediation.MaxSegment; import com.applovin.mediation.MaxSegmentCollection; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /* loaded from: classes2.dex */ public class MaxSegmentCollectionImpl implements MaxSegmentCollection { private final List a; private final Map b; public static class BuilderImpl implements MaxSegmentCollection.Builder { private final List a = new ArrayList(); @Override // com.applovin.mediation.MaxSegmentCollection.Builder public MaxSegmentCollection.Builder addSegment(MaxSegment maxSegment) { this.a.add(maxSegment); return this; } @Override // com.applovin.mediation.MaxSegmentCollection.Builder public MaxSegmentCollection build() { return new MaxSegmentCollectionImpl(this); } } public Map> getJsonData() { return this.b; } @Override // com.applovin.mediation.MaxSegmentCollection public List getSegments() { return this.a; } public String toString() { return "MaxSegmentColletionImpl{segments=" + this.a + "}"; } private MaxSegmentCollectionImpl(BuilderImpl builderImpl) { List list = builderImpl.a; this.a = list; this.b = new HashMap(); for (MaxSegment maxSegment : list) { this.b.put("segment_" + maxSegment.getKey(), maxSegment.getValues()); } } }