All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.amayaframework.router.StaticRouter Maven / Gradle / Ivy

There is a newer version: 1.0.1
Show newest version
package io.github.amayaframework.router;

import io.github.amayaframework.tokenize.Tokenizer;

import java.util.Map;
import java.util.function.Supplier;

final class StaticRouter extends AbstractRouter {
    private final Map> statics;

    StaticRouter(Tokenizer tokenizer, Map> statics) {
        super(tokenizer);
        this.statics = statics;
    }

    @Override
    public PathContext process(String path, Supplier> supplier) {
        return statics.get(PathUtil.normalize(path));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy