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