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

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

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

/**
 * A class that represents a path parameter descriptor.
 */
public final class PathParameter extends Parameter {
    int index;

    /**
     * Constructs an {@link PathParameter} instance with given name, type and parameter index.
     *
     * @param name  the specified path parameter name, must be non-null
     * @param index the specified parameter index, must be >= 0
     * @param type  the specified path parameter type, may be null
     */
    public PathParameter(String name, int index, String type) {
        super(name, type);
        this.index = index;
    }

    /**
     * Gets path parameter position in path.
     *
     * @return the parameter position
     */
    public int getIndex() {
        return index;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy