Package org.greenbytes.http.sfv
Class TokenItem
- java.lang.Object
-
- org.greenbytes.http.sfv.TokenItem
-
- All Implemented Interfaces:
Supplier<String>,Item<String>,ListElement<String>,Parameterizable<String>,Type<String>
public class TokenItem extends Object implements Item<String>
Represents a Token.- See Also:
- Section 3.3.4 of RFC 9651
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringget()ParametersgetParams()Get theParametersof thisItem.Stringserialize()Serialize.StringBuilderserializeTo(StringBuilder sb)Serialize to an existingStringBuilder.static TokenItemvalueOf(String value)Creates aTokenIteminstance representing the specifiedStringvalue.TokenItemwithParams(Parameters params)Given an existingItem, return a new instance with the specifiedParameters.
-
-
-
Method Detail
-
valueOf
public static TokenItem valueOf(String value)
Creates aTokenIteminstance representing the specifiedStringvalue.- Parameters:
value- aStringvalue.- Returns:
- a
TokenItemrepresentingvalue.
-
withParams
public TokenItem withParams(Parameters params)
Description copied from interface:ParameterizableGiven an existingItem, return a new instance with the specifiedParameters.- Specified by:
withParamsin interfaceItem<String>- Specified by:
withParamsin interfaceParameterizable<String>- Parameters:
params-Parametersto set (must be non-null)- Returns:
- new instance with specified
Parameters.
-
getParams
public Parameters getParams()
Description copied from interface:ParameterizableGet theParametersof thisItem.- Specified by:
getParamsin interfaceParameterizable<String>- Returns:
- the parameters.
-
serializeTo
public StringBuilder serializeTo(StringBuilder sb)
Description copied from interface:TypeSerialize to an existingStringBuilder.- Specified by:
serializeToin interfaceType<String>- Parameters:
sb- where to serialize to- Returns:
- the
StringBuilderso calls can be chained.
-
-