Package org.greenbytes.http.sfv
Class DisplayStringItem
- java.lang.Object
-
- org.greenbytes.http.sfv.DisplayStringItem
-
- All Implemented Interfaces:
Supplier<String>,Item<String>,ListElement<String>,Parameterizable<String>,Type<String>
public class DisplayStringItem extends Object implements Item<String>
Represents a Display String.- See Also:
- Section 3.3.8 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 DisplayStringItemvalueOf(String value)Creates aDisplayStringIteminstance representing the specifiedStringvalue.DisplayStringItemwithParams(Parameters params)Given an existingItem, return a new instance with the specifiedParameters.
-
-
-
Method Detail
-
valueOf
public static DisplayStringItem valueOf(String value)
Creates aDisplayStringIteminstance representing the specifiedStringvalue.- Parameters:
value- aStringvalue.- Returns:
- a
DisplayStringItemrepresentingvalue.
-
withParams
public DisplayStringItem 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.
-
-