Class URIQuery


  • public final class URIQuery
    extends java.lang.Object
    Represents URI parameters described with ?param=value&param2=value2 in the URL.
    • Constructor Summary

      Constructors 
      Constructor Description
      URIQuery​(java.lang.String fromURI)  
      URIQuery​(java.util.Map<java.lang.String,​java.lang.String> byKey)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String asString()  
      java.util.Optional<java.lang.String> get​(java.lang.String key)
      Obtain an URI parameter by key.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • URIQuery

        public URIQuery​(java.util.Map<java.lang.String,​java.lang.String> byKey)
      • URIQuery

        public URIQuery​(java.lang.String fromURI)
    • Method Detail

      • get

        public java.util.Optional<java.lang.String> get​(java.lang.String key)
        Obtain an URI parameter by key.
        Parameters:
        key - Case-sensitive key, eg. 'param' in ?param=value&param2=value2
        Returns:
        The value in the URL or empty if key is not specified in the URL.
      • asString

        public java.lang.String asString()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object