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
ConstructorDescriptionMultiValuesQueryParameters
(io.micronaut.core.convert.value.MutableConvertibleMultiValuesMap<String> queryParams) Creates an instance of aMultiValuesQueryParameters
record class.MultiValuesQueryParameters
(Map<CharSequence, List<String>> parameters, io.micronaut.core.convert.ConversionService conversionService) Construct the query parameters. -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.http.MutableHttpParameters
add
(CharSequence name, List<CharSequence> values) final boolean
Indicates whether some other object is "equal to" this one.@Nullable String
get
(CharSequence name) <T> Optional<T>
get
(CharSequence name, io.micronaut.core.convert.ArgumentConversionContext<T> conversionContext) getAll
(CharSequence name) final int
hashCode()
Returns a hash code value for this object.names()
io.micronaut.core.convert.value.MutableConvertibleMultiValuesMap<String>
Returns the value of thequeryParams
record component.void
setConversionService
(@NonNull io.micronaut.core.convert.ConversionService conversionService) final String
toString()
Returns a string representation of this record class.values()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.micronaut.core.convert.value.ConvertibleMultiValues
forEach, forEachValue, getFirst, getFirst, getFirst, getFirst, getFirst, isEmpty, iterator
Methods inherited from interface io.micronaut.core.convert.value.ConvertibleValues
asMap, asMap, asProperties, contains, getConversionService, getValue, getValueType, subMap, subMap, subMap
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface io.micronaut.http.MutableHttpParameters
add
Methods 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 aMultiValuesQueryParameters
record class.- Parameters:
queryParams
- the value for thequeryParams
record component
-
-
Method Details
-
getAll
- Specified by:
getAll
in interfaceio.micronaut.core.convert.value.ConvertibleMultiValues<String>
-
get
- Specified by:
get
in 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:
get
in interfaceio.micronaut.core.value.ValueResolver<CharSequence>
-
add
- Specified by:
add
in interfaceio.micronaut.http.MutableHttpParameters
-
setConversionService
public void setConversionService(@NonNull @NonNull io.micronaut.core.convert.ConversionService conversionService) - Specified by:
setConversionService
in 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 thequeryParams
record component.- Returns:
- the value of the
queryParams
record component
-