Package com.google.api.client.http
Enum UriTemplate.CompositeOutput
- java.lang.Object
-
- java.lang.Enum<UriTemplate.CompositeOutput>
-
- com.google.api.client.http.UriTemplate.CompositeOutput
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<UriTemplate.CompositeOutput>
- Enclosing class:
- UriTemplate
private static enum UriTemplate.CompositeOutput extends java.lang.Enum<UriTemplate.CompositeOutput>
Contains information on how to output a composite value.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AMP
Form-style query continuation.DOT
Label expansion with dot-prefix.FORWARD_SLASH
Path segment expansion.HASH
Fragment expansion.PLUS
Reserved expansion.QUERY
Form-style query expansion.SEMI_COLON
Path segment parameter expansion.SIMPLE
Simple expansion.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
explodeJoiner
private java.lang.String
outputPrefix
private java.lang.Character
propertyPrefix
private boolean
requiresVarAssignment
private boolean
reservedExpansion
-
Constructor Summary
Constructors Modifier Constructor Description private
CompositeOutput(java.lang.Character propertyPrefix, java.lang.String outputPrefix, java.lang.String explodeJoiner, boolean requiresVarAssignment, boolean reservedExpansion)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.lang.String
getEncodedValue(java.lang.String value)
Encodes the specified value.(package private) java.lang.String
getExplodeJoiner()
Returns the delimiter used to join composite values.(package private) java.lang.String
getOutputPrefix()
Returns the string that should be prefixed to the expanded template.(package private) boolean
getReservedExpansion()
(package private) int
getVarNameStartIndex()
Returns the start index of the var name.(package private) boolean
requiresVarAssignment()
Returns whether or not the expanded template should contain an assignment with the variable.static UriTemplate.CompositeOutput
valueOf(java.lang.String name)
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 Detail
-
PLUS
public static final UriTemplate.CompositeOutput PLUS
Reserved expansion.
-
HASH
public static final UriTemplate.CompositeOutput HASH
Fragment expansion.
-
DOT
public static final UriTemplate.CompositeOutput DOT
Label expansion with dot-prefix.
-
FORWARD_SLASH
public static final UriTemplate.CompositeOutput FORWARD_SLASH
Path segment expansion.
-
SEMI_COLON
public static final UriTemplate.CompositeOutput SEMI_COLON
Path segment parameter expansion.
-
QUERY
public static final UriTemplate.CompositeOutput QUERY
Form-style query expansion.
-
AMP
public static final UriTemplate.CompositeOutput AMP
Form-style query continuation.
-
SIMPLE
public static final UriTemplate.CompositeOutput SIMPLE
Simple expansion.
-
-
Field Detail
-
propertyPrefix
private final java.lang.Character propertyPrefix
-
outputPrefix
private final java.lang.String outputPrefix
-
explodeJoiner
private final java.lang.String explodeJoiner
-
requiresVarAssignment
private final boolean requiresVarAssignment
-
reservedExpansion
private final boolean reservedExpansion
-
-
Constructor Detail
-
CompositeOutput
private CompositeOutput(java.lang.Character propertyPrefix, java.lang.String outputPrefix, java.lang.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 Detail
-
values
public static UriTemplate.CompositeOutput[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (UriTemplate.CompositeOutput c : UriTemplate.CompositeOutput.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static UriTemplate.CompositeOutput valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getOutputPrefix
java.lang.String getOutputPrefix()
Returns the string that should be prefixed to the expanded template.
-
getExplodeJoiner
java.lang.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
java.lang.String getEncodedValue(java.lang.String value)
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()
-
-