Class MultiMap

java.lang.Object
io.vertx.mutiny.core.MultiMap
All Implemented Interfaces:
MutinyDelegate, Iterable<Map.Entry<String,String>>

public class MultiMap extends Object implements MutinyDelegate, Iterable<Map.Entry<String,String>>
This class represents a MultiMap of String keys to a List of String values.

It's useful in Vert.x to represent things in Vert.x like HTTP headers and HTTP parameters which allow multiple values for keys.

NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

  • Field Details

  • Constructor Details

    • MultiMap

      public MultiMap(io.vertx.core.MultiMap delegate)
    • MultiMap

      public MultiMap(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.core.MultiMap getDelegate()
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • iterator

      public Iterator<Map.Entry<String,String>> iterator()
      Specified by:
      iterator in interface Iterable<Map.Entry<String,String>>
    • toMulti

      @CheckReturnValue public io.smallrye.mutiny.Multi<Map.Entry<String,String>> toMulti()
    • caseInsensitiveMultiMap

      public static MultiMap caseInsensitiveMultiMap()
      Returns:
      the multi-map
    • get

      public String get(String name)
      Parameters:
      name - The name of the header to search
      Returns:
      The first header value or null if there is no such entry
    • getAll

      public List<String> getAll(String name)
      Parameters:
      name - The name to search
      Returns:
      A immutable List of values which will be empty if no values are found
    • contains

      public boolean contains(String name)
      Parameters:
      name - The name to search for
      Returns:
      true if at least one entry is found
    • contains

      public boolean contains(String name, String value, boolean caseInsensitive)
      Parameters:
      name - the name to search for
      value - the value to search for
      caseInsensitive -
      Returns:
      true if at least one entry is found
    • isEmpty

      public boolean isEmpty()
      Returns:
    • names

      public Set<String> names()
      Returns:
      A Set of all names
    • add

      public MultiMap add(String name, String value)
      Parameters:
      name - The name
      value - The value being added
      Returns:
      a reference to this, so the API can be used fluently
    • addAll

      public MultiMap addAll(MultiMap map)
      Parameters:
      map -
      Returns:
      a reference to this, so the API can be used fluently
    • set

      public MultiMap set(String name, String value)
      Parameters:
      name - The name
      value - The value
      Returns:
      a reference to this, so the API can be used fluently
    • setAll

      public MultiMap setAll(MultiMap map)
      Parameters:
      map -
      Returns:
      a reference to this, so the API can be used fluently
    • remove

      public MultiMap remove(String name)
      Parameters:
      name - The name of the value to remove
      Returns:
      a reference to this, so the API can be used fluently
    • clear

      public MultiMap clear()
      Returns:
      a reference to this, so the API can be used fluently
    • size

      public int size()
      Returns:
    • get

      public String get(CharSequence name)
    • getAll

      public List<String> getAll(CharSequence name)
      Parameters:
      name -
      Returns:
    • forEach

      public void forEach(BiConsumer<String,String> action)
      Parameters:
      action -
    • entries

      public List<Map.Entry<String,String>> entries()
      Returns:
      A immutable List of the name-value entries, which will be empty if no pairs are found
    • contains

      public boolean contains(CharSequence name)
      Parameters:
      name -
      Returns:
    • contains

      public boolean contains(CharSequence name, CharSequence value, boolean caseInsensitive)
      Parameters:
      name -
      value -
      caseInsensitive -
      Returns:
    • add

      public MultiMap add(CharSequence name, CharSequence value)
      Parameters:
      name -
      value -
      Returns:
      the instance of MultiMap to chain method calls.
    • add

      public MultiMap add(String name, Iterable<String> values)
      Parameters:
      name - The name being set
      values - The values
      Returns:
      a reference to this, so the API can be used fluently
    • add

      public MultiMap add(CharSequence name, Iterable<CharSequence> values)
      Parameters:
      name -
      values -
      Returns:
      the instance of MultiMap to chain method calls.
    • addAll

      public MultiMap addAll(Map<String,String> headers)
      Parameters:
      headers -
      Returns:
      a reference to this, so the API can be used fluently
    • set

      public MultiMap set(CharSequence name, CharSequence value)
      Parameters:
      name -
      value -
      Returns:
      the instance of MultiMap to chain method calls.
    • set

      public MultiMap set(String name, Iterable<String> values)
      Parameters:
      name - The name of the headers being set
      values - The values of the headers being set
      Returns:
      a reference to this, so the API can be used fluently
    • set

      public MultiMap set(CharSequence name, Iterable<CharSequence> values)
      Parameters:
      name -
      values -
      Returns:
      the instance of MultiMap to chain method calls.
    • setAll

      public MultiMap setAll(Map<String,String> headers)
      Parameters:
      headers -
      Returns:
      a reference to this, so the API can be used fluently
    • remove

      public MultiMap remove(CharSequence name)
      Parameters:
      name -
      Returns:
      the instance of MultiMap to chain method calls.
    • newInstance

      public static MultiMap newInstance(io.vertx.core.MultiMap arg)