com.vaadin.flow.router.

Class QueryParameters

    • Constructor Detail

      • QueryParameters

        public QueryParameters(Map<String,List<String>> parameters)

        Creates query parameters from parameter map.

        Parameters:

        parameters - the parameter map

    • Method Detail

      • empty

        public static QueryParameters empty()

        Creates an empty query parameters information.

        Returns:

        query parameters information

      • full

        public static QueryParameters full(Map<String,String[]> parameters)

        Creates parameters from full representation, where each parameter name may correspond to multiple values.

        Parameters:

        parameters - query parameters map

        Returns:

        query parameters information

      • simple

        public static QueryParameters simple(Map<String,String> parameters)

        Creates parameters from simple representation, where each parameter name corresponds to a single value.

        Parameters:

        parameters - query parameters map

        Returns:

        query parameters information

      • fromString

        public static QueryParameters fromString(String queryString)

        Creates parameters from a query string.

        Note that no length checking is done for the string. It is the responsibility of the caller (or the server) to limit the length of the query string.

        Parameters:

        queryString - the query string

        Returns:

        query parameters information

      • getParameters

        public Map<String,List<String>> getParameters()

        Returns query parameters information with support for multiple values corresponding to single parameter name.

        Example: https://example.com/?one=1&two=2&one=3 will result in the corresponding map: {"one" : [1, 3], "two": [2]}

        Returns:

        query parameters information

      • getQueryString

        public String getQueryString()

        Turns query parameters into query string that contains all parameter names and their values. No guarantee on parameters' appearance order is made.

        Returns:

        query string