Package com.google.api.client.http
Enum UriTemplate.CompositeOutput
- All Implemented Interfaces:
Serializable
,Comparable<UriTemplate.CompositeOutput>
- Enclosing class:
UriTemplate
Contains information on how to output a composite value.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionForm-style query continuation.Label expansion with dot-prefix.Path segment expansion.Fragment expansion.Reserved expansion.Form-style query expansion.Path segment parameter expansion.Simple expansion. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
CompositeOutput
(Character propertyPrefix, String outputPrefix, String explodeJoiner, boolean requiresVarAssignment, boolean reservedExpansion) -
Method Summary
Modifier and TypeMethodDescription(package private) String
getEncodedValue
(String value) Encodes the specified value.(package private) String
Returns the delimiter used to join composite values.(package private) String
Returns the string that should be prefixed to the expanded template.(package private) boolean
(package private) int
Returns the start index of the var name.(package private) boolean
Returns whether or not the expanded template should contain an assignment with the variable.static UriTemplate.CompositeOutput
Returns the enum constant of this type with the specified name.static UriTemplate.CompositeOutput[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
PLUS
Reserved expansion. -
HASH
Fragment expansion. -
DOT
Label expansion with dot-prefix. -
FORWARD_SLASH
Path segment expansion. -
SEMI_COLON
Path segment parameter expansion. -
QUERY
Form-style query expansion. -
AMP
Form-style query continuation. -
SIMPLE
Simple expansion.
-
-
Field Details
-
propertyPrefix
-
outputPrefix
-
explodeJoiner
-
requiresVarAssignment
private final boolean requiresVarAssignment -
reservedExpansion
private final boolean reservedExpansion
-
-
Constructor Details
-
CompositeOutput
private CompositeOutput(Character propertyPrefix, String outputPrefix, String explodeJoiner, boolean requiresVarAssignment, boolean reservedExpansion) - Parameters:
propertyPrefix
- The prefix of a parameter ornull
for none. In {+var} the prefix is '+'outputPrefix
- The string that should be prefixed to the expanded template.explodeJoiner
- The delimiter used to join composite values.requiresVarAssignment
- Denotes whether or not the expanded template should contain an assignment with the variable.reservedExpansion
- Reserved expansion allows pct-encoded triplets and characters in the reserved set.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getOutputPrefix
String getOutputPrefix()Returns the string that should be prefixed to the expanded template. -
getExplodeJoiner
String getExplodeJoiner()Returns the delimiter used to join composite values. -
requiresVarAssignment
boolean requiresVarAssignment()Returns whether or not the expanded template should contain an assignment with the variable. -
getVarNameStartIndex
int getVarNameStartIndex()Returns the start index of the var name. If the variable contains a prefix the start index will be 1 else it will be 0. -
getEncodedValue
Encodes the specified value. If reserved expansion is turned on then pct-encoded triplets and characters are allowed in the reserved set.- Parameters:
value
- The string to be encoded.- Returns:
- The encoded string.
-
getReservedExpansion
boolean getReservedExpansion()
-