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

    Constructors
    Constructor
    Description
    MultiValuesQueryParameters(io.micronaut.core.convert.value.MutableConvertibleMultiValuesMap<String> queryParams)
    Creates an instance of a MultiValuesQueryParameters record class.
    MultiValuesQueryParameters(Map<CharSequence,List<String>> parameters, io.micronaut.core.convert.ConversionService conversionService)
    Construct the query parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    io.micronaut.http.MutableHttpParameters
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    @Nullable String
     
    <T> Optional<T>
    get(CharSequence name, io.micronaut.core.convert.ArgumentConversionContext<T> conversionContext)
     
     
    final int
    Returns a hash code value for this object.
     
    io.micronaut.core.convert.value.MutableConvertibleMultiValuesMap<String>
    Returns the value of the queryParams record component.
    void
    setConversionService(@NonNull io.micronaut.core.convert.ConversionService conversionService)
     
    final String
    Returns a string representation of this record class.
     

    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 a MultiValuesQueryParameters record class.
      Parameters:
      queryParams - the value for the queryParams record component
  • Method Details

    • getAll

      public List<String> getAll(CharSequence name)
      Specified by:
      getAll in interface io.micronaut.core.convert.value.ConvertibleMultiValues<String>
    • get

      @Nullable public @Nullable String get(CharSequence name)
      Specified by:
      get in interface io.micronaut.core.convert.value.ConvertibleMultiValues<String>
    • names

      public Set<String> names()
      Specified by:
      names in interface io.micronaut.core.convert.value.ConvertibleValues<List<String>>
    • values

      public Collection<List<String>> values()
      Specified by:
      values in interface io.micronaut.core.convert.value.ConvertibleValues<List<String>>
    • get

      public <T> Optional<T> get(CharSequence name, io.micronaut.core.convert.ArgumentConversionContext<T> conversionContext)
      Specified by:
      get in interface io.micronaut.core.value.ValueResolver<CharSequence>
    • add

      public io.micronaut.http.MutableHttpParameters add(CharSequence name, List<CharSequence> values)
      Specified by:
      add in interface io.micronaut.http.MutableHttpParameters
    • setConversionService

      public void setConversionService(@NonNull @NonNull io.micronaut.core.convert.ConversionService conversionService)
      Specified by:
      setConversionService in interface io.micronaut.core.convert.ConversionServiceAware
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • queryParams

      public io.micronaut.core.convert.value.MutableConvertibleMultiValuesMap<String> queryParams()
      Returns the value of the queryParams record component.
      Returns:
      the value of the queryParams record component