/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.objectmodel.folder.Folder
 *  com.l7tech.policy.Policy
 *  com.l7tech.util.Functions$Nullary
 */
package com.l7tech.server.policy;

import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.folder.Folder;
import com.l7tech.policy.Policy;
import com.l7tech.server.policy.PolicyUniqueIdentifier;
import com.l7tech.server.policy.ServerPolicyMetadata;
import com.l7tech.util.Functions;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

final class am
implements ServerPolicyMetadata {
    private final Policy a;
    private final PolicyUniqueIdentifier b;
    private final Set<Goid> c;
    private final Functions.Nullary<Collection<Folder>> d;

    private am(Policy policy, PolicyUniqueIdentifier policyUniqueIdentifier, Set<Goid> set, Functions.Nullary<Collection<Folder>> nullary) {
        this.a = policy;
        this.b = policyUniqueIdentifier;
        this.c = set;
        this.d = nullary;
    }

    @Override
    public String getPolicyUniqueIdentifier() {
        return this.b.getPolicyUniqueIdentifer();
    }

    @Override
    public Policy getPolicy() {
        return this.a;
    }

    @Override
    public Set<Goid> getUsedPolicyIds(boolean bl2) {
        if (!bl2) {
            return this.c;
        }
        HashSet<Goid> hashSet = new HashSet<Goid>(this.c);
        hashSet.add(this.getPolicy().getGoid());
        return Collections.unmodifiableSet(hashSet);
    }

    @Override
    public Map<Goid, Integer> getDependentVersions(boolean bl2) {
        return this.b.getUsedPoliciesAndVersions(bl2);
    }

    @Override
    public Functions.Nullary<Collection<Folder>> getFolderPath() {
        return this.d;
    }
}

