
org.continuity.api.rest.PathPar Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of continuity.api Show documentation
Show all versions of continuity.api Show documentation
Library of continuITy defining exchange entities
The newest version!
package org.continuity.api.rest;
/**
* Represents a path variable, e.g., {id}
in /my/path/{id}
.
*
* @author Henning Schulz
*
*/
public class PathPar {
private final String name;
private PathPar(String name) {
this.name = name;
}
/**
* Creates a new instance.
*
* @param name
* The name of the parameter.
* @return The instance.
*/
public static PathPar of(String name) {
return new PathPar(name);
}
/**
* Returns a string representation of this parameter for usage in a generic path, e.g.,
* /my/path/{id}
..
*
* @return {parameter-name}
*/
public String generic() {
return "{" + name + "}";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy