class AzureBlobStoreFileSystem extends FileSystem<AzfsResourceId> {

  @Override
  protected List<MatchResult> match(List<String> specs) {
    List<AzfsResourceId> paths =
        specs.stream().map(AzfsResourceId::fromUri).collect(Collectors.toList());
    List<AzfsResourceId> globs = new ArrayList<>();
    List<AzfsResourceId> nonGlobs = new ArrayList<>();
    List<Boolean> isGlobBooleans = new ArrayList<>();

    for (AzfsResourceId path : paths) {
      if (path.isWildcard()) {
        globs.add(path);
        isGlobBooleans.add(true);
      } else {
        nonGlobs.add(path);
        isGlobBooleans.add(false);
      }
    }

    Iterator<MatchResult> globMatches = matchGlobPaths(globs).iterator();
    Iterator<MatchResult> nonGlobMatches = matchNonGlobPaths(nonGlobs).iterator();

    ImmutableList.Builder<MatchResult> matchResults = ImmutableList.builder();
    for (Boolean isGlob : isGlobBooleans) {
      if (isGlob) {
        checkState(
            globMatches.hasNext(),
            "Internal error encountered in AzureBlobStoreFileSystem: expected more elements in globMatches.");
        matchResults.add(globMatches.next());
      } else {
        checkState(
            nonGlobMatches.hasNext(),
            "Internal error encountered in AzureBlobStoreFileSystem: expected more elements in nonGlobMatches.");
        matchResults.add(nonGlobMatches.next());
      }
    }
    checkState(
        !globMatches.hasNext(),
        "Internal error encountered in AzureBlobStoreFileSystem: expected no more elements in globMatches.");
    checkState(
        !nonGlobMatches.hasNext(),
        "Internal error encountered in AzureBlobStoreFileSystem: expected no more elements in nonGlobMatches.");

    return matchResults.build();
  }

    AzureBlobStoreFileSystem(BlobstoreOptions options);

}