public class UnbluCookie
extends java.lang.Object
used together with the UnbluApiConfiguration.Builder.setCustomCookies(Set) of the configuration
| Constructor and Description |
|---|
UnbluCookie(java.net.HttpCookie cookie)
constructs UnbluCookie object from a java.net.HttpCookie object
|
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
|
| Modifier and Type | Method and 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() |
public UnbluCookie(@NonNull
java.net.HttpCookie cookie)
cookie - the java.net.HttpCookie objectpublic UnbluCookie(@NonNull
java.lang.String key,
@NonNull
java.lang.String value,
@Nullable
java.util.Date expires)
key - the cookie keyvalue - the cookie valueexpires - the cookie Expires parameterpublic UnbluCookie(@NonNull
java.lang.String key,
@NonNull
java.lang.String value)
key - the cookie keyvalue - the cookie value@NonNull public java.lang.String getKey()
@Nullable public java.lang.String getValue()
@Nullable public java.util.Date getExpires()
public static java.util.Set<UnbluCookie> from(@NonNull java.util.Map<java.lang.String,java.lang.String> cookies)
cookies - The Custom cookie Map<key,value>public static java.util.Set<UnbluCookie> from(@NonNull java.util.List<java.net.HttpCookie> cookies)
cookies - The HttpCookie List<HttpCookie>public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object