class RepoPackage {

    public final void setAllMeasurements(final Set<IMABaselineRecord> packageRecords,
                                         final Digest packageMeasurement) {
        if (packageRecords == null) {
            throw new IllegalArgumentException("Measurements cannot be null.");
        }

        if (packageMeasurement == null) {
            throw new IllegalArgumentException("Package measurement cannot be null.");
        }

        if (!measured) {
            this.packageRecords = new HashSet<>(packageRecords);
            this.packageMeasurement = packageMeasurement;
            measured = true;
            measurementDate = new Date();
        } else {
            throw new IllegalStateException("RepoPackage measurements already set.");
        }
    }

    public  RepoPackage(final String name, final String version, final String release,
                       final String architecture, final Repository sourceRepository);
    protected  RepoPackage();

}