Interface QueryParameters


public interface QueryParameters

Represents the query parameters of a request.

Since:
1.0
Author:
Jeremy Kuhn
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determines whether a parameter with the specified name is present.
    get(String name)
    Returns the query parameter with the specified name.
    Returns all query parameters sent in the request.
    getAll(String name)
    Returns all query parameters with the specified name.
    Returns the names of the query parameters sent in the request.
  • Method Details

    • contains

      boolean contains(String name)

      Determines whether a parameter with the specified name is present.

      Parameters:
      name - a query parameter name
      Returns:
      true if a parameter is present, false otherwise
    • getNames

      Set<String> getNames()

      Returns the names of the query parameters sent in the request.

      Returns:
      a list of header names
    • get

      Returns the query parameter with the specified name.

      If there are multiple parameters with the same name, this method returns the first one.

      Parameters:
      name - a query parameter name
      Returns:
      an optional returning the parameter or an empty optional if there's no parameter with the specified name
    • getAll

      List<Parameter> getAll(String name)

      Returns all query parameters with the specified name.

      Parameters:
      name - a query parameter name
      Returns:
      a list of parameters or an empty list if there's no parameter with the specified name
    • getAll

      Map<String,List<Parameter>> getAll()

      Returns all query parameters sent in the request.

      Returns:
      the parameters grouped by name