class OriginMatchUtil {

    public boolean matches(String origin) {
        
        if(Objects.isNull(origin) || Objects.equals("", origin)) {
            return false;
        }

        Predicate<String> subdomainMatch = s -> origin.toLowerCase().matches(s);
        Predicate<String> matchingCritera = wildcardMatch.or(subdomainMatch);

        return tokens.stream().anyMatch(matchingCritera);
    }

    public  OriginMatchUtil(List<String> tokens);

}