Class Query

  • Direct Known Subclasses:
    JavaQuery

    public abstract class Query
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Query EMPTY
      Returns an empty Query.
    • Constructor Summary

      Constructors 
      Constructor Description
      Query()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static Query create​(akka.japi.Pair<java.lang.String,​java.lang.String>... params)
      Returns a Query from the given parameters.
      static Query create​(java.lang.Iterable<akka.japi.Pair<java.lang.String,​java.lang.String>> params)
      Returns a Query from the given parameters.
      static Query create​(java.lang.String rawQuery)
      Returns a Query created by parsing the given undecoded string representation.
      static Query create​(java.lang.String rawQuery, Uri.ParsingMode parsingMode)
      Returns a Query created by parsing the given undecoded string representation with the provided parsing mode.
      static Query create​(java.lang.String rawQuery, java.nio.charset.Charset charset, Uri.ParsingMode parsingMode)
      Returns a Query created by parsing the given undecoded string representation with the provided charset and parsing mode.
      static Query create​(java.util.Map<java.lang.String,​java.lang.String> params)
      Returns a Query from the given parameters.
      abstract java.util.Optional<java.lang.String> get​(java.lang.String key)
      Returns the value of the first parameter with the given key if it exists.
      abstract java.util.List<java.lang.String> getAll​(java.lang.String key)
      Returns the value of all parameters with the given key.
      abstract java.lang.String getOrElse​(java.lang.String key, java.lang.String _default)
      Returns the value of the first parameter with the given key or the provided default value.
      abstract java.lang.String render​(HttpCharset charset)
      Renders this Query into its string representation using the given charset.
      abstract java.lang.String render​(HttpCharset charset, akka.parboiled2.CharPredicate keep)
      Renders this Query into its string representation using the given charset and char predicate.
      abstract java.util.List<akka.japi.Pair<java.lang.String,​java.lang.String>> toList()
      Returns a `List` of all parameters of this Query.
      abstract java.util.Map<java.lang.String,​java.lang.String> toMap()
      Returns a key/value map of the parameters of this Query.
      abstract java.util.Map<java.lang.String,​java.util.List<java.lang.String>> toMultiMap()
      Returns a `Map` of all parameters of this Query.
      abstract Query withParam​(java.lang.String key, java.lang.String value)
      Returns a copy of this instance with a query parameter added.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • EMPTY

        public static final Query EMPTY
        Returns an empty Query.
    • Constructor Detail

      • Query

        public Query()
    • Method Detail

      • get

        public abstract java.util.Optional<java.lang.String> get​(java.lang.String key)
        Returns the value of the first parameter with the given key if it exists.
      • getOrElse

        public abstract java.lang.String getOrElse​(java.lang.String key,
                                                   java.lang.String _default)
        Returns the value of the first parameter with the given key or the provided default value.
      • getAll

        public abstract java.util.List<java.lang.String> getAll​(java.lang.String key)
        Returns the value of all parameters with the given key.
      • toList

        public abstract java.util.List<akka.japi.Pair<java.lang.String,​java.lang.String>> toList()
        Returns a `List` of all parameters of this Query. Use the `toMap()` method to filter out entries with duplicated keys.
      • toMap

        public abstract java.util.Map<java.lang.String,​java.lang.String> toMap()
        Returns a key/value map of the parameters of this Query. Use the `toList()` method to return all parameters if keys may occur multiple times.
      • toMultiMap

        public abstract java.util.Map<java.lang.String,​java.util.List<java.lang.String>> toMultiMap()
        Returns a `Map` of all parameters of this Query. Use the `toMap()` method to filter out entries with duplicated keys.
      • withParam

        public abstract Query withParam​(java.lang.String key,
                                        java.lang.String value)
        Returns a copy of this instance with a query parameter added.
      • render

        public abstract java.lang.String render​(HttpCharset charset)
        Renders this Query into its string representation using the given charset.
      • render

        public abstract java.lang.String render​(HttpCharset charset,
                                                akka.parboiled2.CharPredicate keep)
        Renders this Query into its string representation using the given charset and char predicate.
      • create

        public static Query create​(java.lang.String rawQuery)
        Returns a Query created by parsing the given undecoded string representation.
      • create

        public static Query create​(java.lang.String rawQuery,
                                   Uri.ParsingMode parsingMode)
        Returns a Query created by parsing the given undecoded string representation with the provided parsing mode.
      • create

        public static Query create​(java.lang.String rawQuery,
                                   java.nio.charset.Charset charset,
                                   Uri.ParsingMode parsingMode)
        Returns a Query created by parsing the given undecoded string representation with the provided charset and parsing mode.
      • create

        @SafeVarargs
        public static Query create​(akka.japi.Pair<java.lang.String,​java.lang.String>... params)
        Returns a Query from the given parameters.
      • create

        public static Query create​(java.lang.Iterable<akka.japi.Pair<java.lang.String,​java.lang.String>> params)
        Returns a Query from the given parameters.
      • create

        public static Query create​(java.util.Map<java.lang.String,​java.lang.String> params)
        Returns a Query from the given parameters.