Package io.micronaut.http.poja.util
Record Class MultiValuesQueryParameters
java.lang.Object
java.lang.Record
io.micronaut.http.poja.util.MultiValuesQueryParameters
- Record Components:
queryParams- The values
- All Implemented Interfaces:
io.micronaut.core.convert.ConversionServiceAware,io.micronaut.core.convert.ConversionServiceProvider,io.micronaut.core.convert.value.ConvertibleMultiValues<String>,io.micronaut.core.convert.value.ConvertibleValues<List<String>>,io.micronaut.core.value.ValueResolver<CharSequence>,io.micronaut.http.HttpParameters,io.micronaut.http.MutableHttpParameters,Iterable<Map.Entry<String,List<String>>>
public record MultiValuesQueryParameters(io.micronaut.core.convert.value.MutableConvertibleMultiValuesMap<String> queryParams)
extends Record
implements io.micronaut.http.MutableHttpParameters
Query parameters implementation.
-
Field Summary
Fields inherited from interface io.micronaut.core.convert.value.ConvertibleValues
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionMultiValuesQueryParameters(io.micronaut.core.convert.value.MutableConvertibleMultiValuesMap<String> queryParams) Creates an instance of aMultiValuesQueryParametersrecord class.MultiValuesQueryParameters(Map<CharSequence, List<String>> parameters, io.micronaut.core.convert.ConversionService conversionService) Construct the query parameters. -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.http.MutableHttpParametersadd(CharSequence name, List<CharSequence> values) final booleanIndicates whether some other object is "equal to" this one.@Nullable Stringget(CharSequence name) <T> Optional<T>get(CharSequence name, io.micronaut.core.convert.ArgumentConversionContext<T> conversionContext) getAll(CharSequence name) final inthashCode()Returns a hash code value for this object.names()io.micronaut.core.convert.value.MutableConvertibleMultiValuesMap<String>Returns the value of thequeryParamsrecord component.voidsetConversionService(@NonNull io.micronaut.core.convert.ConversionService conversionService) final StringtoString()Returns a string representation of this record class.values()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.micronaut.core.convert.value.ConvertibleMultiValues
forEach, forEachValue, getFirst, getFirst, getFirst, getFirst, getFirst, isEmpty, iteratorMethods inherited from interface io.micronaut.core.convert.value.ConvertibleValues
asMap, asMap, asProperties, contains, getConversionService, getValue, getValueType, subMap, subMap, subMapMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface io.micronaut.http.MutableHttpParameters
addMethods inherited from interface io.micronaut.core.value.ValueResolver
get, get, get
-
Constructor Details
-
MultiValuesQueryParameters
public MultiValuesQueryParameters(Map<CharSequence, List<String>> parameters, io.micronaut.core.convert.ConversionService conversionService) Construct the query parameters.- Parameters:
parameters- The parameters as a map.conversionService- The conversion service.
-
MultiValuesQueryParameters
public MultiValuesQueryParameters(io.micronaut.core.convert.value.MutableConvertibleMultiValuesMap<String> queryParams) Creates an instance of aMultiValuesQueryParametersrecord class.- Parameters:
queryParams- the value for thequeryParamsrecord component
-
-
Method Details
-
getAll
- Specified by:
getAllin interfaceio.micronaut.core.convert.value.ConvertibleMultiValues<String>
-
get
- Specified by:
getin interfaceio.micronaut.core.convert.value.ConvertibleMultiValues<String>
-
names
-
values
-
get
public <T> Optional<T> get(CharSequence name, io.micronaut.core.convert.ArgumentConversionContext<T> conversionContext) - Specified by:
getin interfaceio.micronaut.core.value.ValueResolver<CharSequence>
-
add
- Specified by:
addin interfaceio.micronaut.http.MutableHttpParameters
-
setConversionService
public void setConversionService(@NonNull @NonNull io.micronaut.core.convert.ConversionService conversionService) - Specified by:
setConversionServicein interfaceio.micronaut.core.convert.ConversionServiceAware
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
queryParams
Returns the value of thequeryParamsrecord component.- Returns:
- the value of the
queryParamsrecord component
-