All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ringcentral.platform.metrics.samples.AbstractInstanceSample Maven / Gradle / Ivy

The newest version!
package com.ringcentral.platform.metrics.samples;

import java.util.ArrayList;
import java.util.List;

import static java.util.Objects.requireNonNull;

public class AbstractInstanceSample implements InstanceSample {

    protected final List samples;

    public AbstractInstanceSample() {
        this(new ArrayList<>());
    }

    public AbstractInstanceSample(List samples) {
        this.samples = requireNonNull(samples);
    }

    public void add(S sample) {
        samples.add(sample);
    }

    public List samples() {
        return samples;
    }
}