Package io.varhttp

Class RequestParametersImplementation

java.lang.Object
io.varhttp.RequestParametersImplementation
All Implemented Interfaces:
RequestParameters

public class RequestParametersImplementation extends Object implements RequestParameters
  • Constructor Details

    • RequestParametersImplementation

      public RequestParametersImplementation(jakarta.servlet.http.HttpServletRequest request)
  • Method Details

    • get

      public String get(String name)
      Description copied from interface: RequestParameters
      Returns first value of the parameter
      Specified by:
      get in interface RequestParameters
      Parameters:
      name - decoded parameter name
      Returns:
      decoded value or null if parameter does not exist
    • getAll

      public List<String> getAll(String name)
      Description copied from interface: RequestParameters
      Returns all the values of the parameter
      Specified by:
      getAll in interface RequestParameters
      Parameters:
      name - decoded parameter name
      Returns:
      decoded values or empty list if parameter doesn't exist
    • contains

      public boolean contains(String name)
      Description copied from interface: RequestParameters
      Checks if request has a parameter with name
      Specified by:
      contains in interface RequestParameters
      Parameters:
      name - parameter name
      Returns:
      true if request has a parameter with name, false otherwise
    • getMap

      public Map<String,List<String>> getMap()
      Description copied from interface: RequestParameters
      Map view of request parameters

      Modifying the map returned by this method will not affect the request parameters object itself

      Specified by:
      getMap in interface RequestParameters
      Returns:
      map view of request parameters