class ResultSetMapperComponentImpl implements ResultSetMapperComponent {

    private final Map<Class<?>, ResultSetMapping<?>> map;
    private final Map<DbmsType, Map<Class<?>, ResultSetMapping<?>>> dbmsTypeMap;

    public ResultSetMapperComponentImpl() {
        map         = newConcurrentMap();
        dbmsTypeMap = newConcurrentMap();
        StandardJavaTypeMapping.stream().forEach(this::put);
    }

    public ResultSetMapping<?> put(ResultSetMapping<?> item) {
        requireNonNull(item);
        return map.put(item.getJavaClass(), item);
    }

    public ResultSetMapping<?> put(DbmsType dbmsType, ResultSetMapping<?> item) {
        requireNonNulls(dbmsType, item);
        return dbmsTypeMap.computeIfAbsent(dbmsType, k -> new ConcurrentHashMap<>()).put(item.getJavaClass(), item);
    }

    @Override
    public <T> ResultSetMapping<T> apply(DbmsType dbmsType, Class<T> javaClass) {<FILL_FUNCTION_BODY>}

    @Override
    public <T> ResultSetMapping<T> apply(Class<T> javaClass) {
        requireNonNull(javaClass);
        return getFromMapOrThrow(map, javaClass, javaClass::getName);
    }

    @SuppressWarnings("unchecked")
    private <T> ResultSetMapping<T> getFromMapOrThrow(Map<Class<?>, ResultSetMapping<?>> map, Class<T> javaClass, Supplier<String> throwMessageSupplier) {
        requireNonNulls(map, javaClass, throwMessageSupplier);
        return Optional.ofNullable((ResultSetMapping<T>) map.get(javaClass))
            .orElseThrow(() -> new NullPointerException("The " + ResultSetMapperComponent.class.getSimpleName() + " does not have a mapping for " + throwMessageSupplier.get()));
    }

    private <K, V> Map<K, V> newConcurrentMap() {
        return new ConcurrentHashMap<>();
    }

}

        requireNonNulls(dbmsType, javaClass);
        return getFromMapOrThrow(dbmsTypeMap.getOrDefault(dbmsType, map), javaClass, () -> dbmsType + ", " + javaClass.getName());
    
<no_super_class>