@ -53,27 +53,34 @@ public interface ApiVersionInserter {
@@ -53,27 +53,34 @@ public interface ApiVersionInserter {
/ * *
* Create a builder for a n inserter that sets a header .
* Create an inserter that sets a header .
* @param header the name of a header to hold the version
* /
static Builder from Header( @Nullable String header ) {
return new DefaultApiVersionInserterBuilder ( header , null , null ) ;
static ApiVersionInserter use Header( @Nullable String header ) {
return new DefaultApiVersionInserterBuilder ( header , null , null ) . build ( ) ;
}
/ * *
* Create a builder for a n inserter that sets a query parameter .
* Create an inserter that sets a query parameter .
* @param queryParam the name of a query parameter to hold the version
* /
static Builder from QueryParam( @Nullable String queryParam ) {
return new DefaultApiVersionInserterBuilder ( null , queryParam , null ) ;
static ApiVersionInserter use QueryParam( @Nullable String queryParam ) {
return new DefaultApiVersionInserterBuilder ( null , queryParam , null ) . build ( ) ;
}
/ * *
* Create a builder for a n inserter that inserts a path segment .
* Create an inserter that inserts a path segment .
* @param pathSegmentIndex the index of the path segment to hold the version
* /
static Builder fromPathSegment ( @Nullable Integer pathSegmentIndex ) {
return new DefaultApiVersionInserterBuilder ( null , null , pathSegmentIndex ) ;
static ApiVersionInserter usePathSegment ( @Nullable Integer pathSegmentIndex ) {
return new DefaultApiVersionInserterBuilder ( null , null , pathSegmentIndex ) . build ( ) ;
}
/ * *
* Create a builder for an { @link ApiVersionInserter } .
* /
static Builder builder ( ) {
return new DefaultApiVersionInserterBuilder ( null , null , null ) ;
}
@ -86,19 +93,19 @@ public interface ApiVersionInserter {
@@ -86,19 +93,19 @@ public interface ApiVersionInserter {
* Configure the inserter to set a header .
* @param header the name of the header to hold the version
* /
Builder from Header( @Nullable String header ) ;
Builder use Header( @Nullable String header ) ;
/ * *
* Configure the inserter to set a query parameter .
* @param queryParam the name of the query parameter to hold the version
* /
Builder from QueryParam( @Nullable String queryParam ) ;
Builder use QueryParam( @Nullable String queryParam ) ;
/ * *
* Configure the inserter to insert a path segment .
* @param pathSegmentIndex the index of the path segment to hold the version
* /
Builder from PathSegment( @Nullable Integer pathSegmentIndex ) ;
Builder use PathSegment( @Nullable Integer pathSegmentIndex ) ;
/ * *
* Format the version Object into a String using the given { @link ApiVersionFormatter } .