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

com.uid2.client.Site Maven / Gradle / Ivy

package com.uid2.client;

import java.util.Set;

public class Site {
    private final int id;

    private final Set domainOrAppNames;

    public int getId() { return id;}

    public Site(int id, Set domainOrAppNames) {
        this.id = id;
        this.domainOrAppNames = domainOrAppNames;
    }

    public boolean allowDomainOrAppName(String domainOrAppName) {
        // Using streams because HashSet's contains() is case sensitive
        return domainOrAppNames.stream().anyMatch(domainOrAppName::equalsIgnoreCase);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy