Class UnbluCookie

    • Constructor Summary

      Constructors 
      Constructor Description
      UnbluCookie​(java.lang.String key, java.lang.String value)
      constructs UnbluCookie object from parameters expires parameter is desregarded because the cookie does not expire
      UnbluCookie​(java.lang.String key, java.lang.String value, java.util.Date expires)
      constructs UnbluCookie object from parameters
      UnbluCookie​(java.net.HttpCookie cookie)
      constructs UnbluCookie object from a java.net.HttpCookie object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      static java.util.Set<UnbluCookie> from​(java.util.List<java.net.HttpCookie> cookies)
      Creates Set<UnbluCookie> from Set<java.net.HttpCookie>
      static java.util.Set<UnbluCookie> from​(java.util.Map<java.lang.String,​java.lang.String> cookies)
      Creates UnbluCookie from Map<String, String>
      these cookies will never expire
      java.util.Date getExpires()  
      java.lang.String getKey()  
      java.lang.String getValue()  
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UnbluCookie

        public UnbluCookie​(@NonNull
                           java.net.HttpCookie cookie)
        constructs UnbluCookie object from a java.net.HttpCookie object
        Parameters:
        cookie - the java.net.HttpCookie object
      • UnbluCookie

        public UnbluCookie​(@NonNull
                           java.lang.String key,
                           @NonNull
                           java.lang.String value,
                           @Nullable
                           java.util.Date expires)
        constructs UnbluCookie object from parameters
        Parameters:
        key - the cookie key
        value - the cookie value
        expires - the cookie Expires parameter
      • UnbluCookie

        public UnbluCookie​(@NonNull
                           java.lang.String key,
                           @NonNull
                           java.lang.String value)
        constructs UnbluCookie object from parameters expires parameter is desregarded because the cookie does not expire
        Parameters:
        key - the cookie key
        value - the cookie value
    • Method Detail

      • getKey

        @NonNull
        public java.lang.String getKey()
        Returns:
        the key of the cookie.
      • getValue

        @Nullable
        public java.lang.String getValue()
        Returns:
        the value of the cookie.
      • getExpires

        @Nullable
        public java.util.Date getExpires()
        Returns:
        the value of the cookie Expires.
      • from

        public static java.util.Set<UnbluCookie> from​(@NonNull
                                                      java.util.Map<java.lang.String,​java.lang.String> cookies)
        Creates UnbluCookie from Map<String, String>
        these cookies will never expire
        Parameters:
        cookies - The Custom cookie Map<key,value>
        Returns:
        Set
      • from

        public static java.util.Set<UnbluCookie> from​(@NonNull
                                                      java.util.List<java.net.HttpCookie> cookies)
        Creates Set<UnbluCookie> from Set<java.net.HttpCookie>
        Parameters:
        cookies - The HttpCookie List<HttpCookie>
        Returns:
        Set
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object