class X509BundleSet implements BundleSource<X509Bundle> {

    public static X509BundleSet of(@NonNull final Collection<X509Bundle> bundles) {
        if (bundles.size() == 0) {
            throw new IllegalArgumentException("X509Bundles collection is empty");
        }

        final Map<TrustDomain, X509Bundle> bundleMap = new ConcurrentHashMap<>();
        for (X509Bundle bundle : bundles) {
            bundleMap.put(bundle.getTrustDomain(), bundle);
        }
        return new X509BundleSet(bundleMap);
    }

    private  X509BundleSet(final Map<TrustDomain, X509Bundle> bundles);
    private  X509BundleSet();

}