docs: public boolean matches(String pattern, String itemName) {
          final int index = pattern.indexOf('*');
          if (index == -1) {
              return itemName.equals(pattern);
          }
  
          final String firstPart = pattern.substring(0, index);
          if (!itemName.startsWith(firstPart)) {
              return false;
          }
  
          final String secondPart = pattern.substring(index + 1);
          if (!itemName.endsWith(secondPart)) {
              return false;
          }
  
          return true;
      }