Enum Class QueryParamStyle
- All Implemented Interfaces:
Serializable
,Comparable<QueryParamStyle>
,Constable
A QueryParamStyle enum is used to specify how multiple values are handled when constructing the query portion of the
URI. For example, a client interface may take a collection of strings as it's query parameter. This enum determines
the style:
public interface MultiParamClient { void sendMultipleQueryParams(@QueryParam("foo") List<String> strings); }The style selected when building this client instance will determine the format of the query portion of the URI.
- Since:
- 2.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionMultiple parameter instances with square brackets for each parameter, e.g.:foo[]=v1&foo[]=v2&foo[]=v3
A single parameter instance with multiple, comma-separated values, e.g.:foo=v1,v2,v3
Multiple parameter instances, e.g.:foo=v1&foot=v2&foo=v3
This is the default if no style is configured. -
Method Summary
Modifier and TypeMethodDescriptionstatic QueryParamStyle
Returns the enum constant of this class with the specified name.static QueryParamStyle[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MULTI_PAIRS
Multiple parameter instances, e.g.:foo=v1&foot=v2&foo=v3
This is the default if no style is configured. -
COMMA_SEPARATED
A single parameter instance with multiple, comma-separated values, e.g.:foo=v1,v2,v3
-
ARRAY_PAIRS
Multiple parameter instances with square brackets for each parameter, e.g.:foo[]=v1&foo[]=v2&foo[]=v3
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-