private List<Predicate<String>> getRegistryMatchersFor(String registry) {
    Predicate<String> exactMatch = registry::equals;
    Predicate<String> withHttps = ("https://" + registry)::equals;
    Predicate<String> withSuffix = name -> name.startsWith(registry + "/");
    Predicate<String> withHttpsAndSuffix = name -> name.startsWith("https://" + registry + "/");
    return Arrays.asList(exactMatch, withHttps, withSuffix, withHttpsAndSuffix);
  }
Gets registry matchers for a registry.

<p>Matches are determined in the following order:

<ol>
  <li>Exact registry name
  <li>https:// + registry name
  <li>registry name + / + arbitrary suffix
  <li>https:// + registry name + / + arbitrary suffix
</ol>

@param registry the registry to get matchers for
@return the list of predicates to match possible aliases
jib-core/src/main/java/com/google/cloud/tools/jib/registry/credentials/DockerConfig.java