public class EntityTag
extends java.lang.Object
Constructor and Description |
---|
EntityTag(java.lang.String value)
Creates a new instance of a strong
EntityTag . |
EntityTag(java.lang.String value,
boolean weak)
Creates a new instance of an
EntityTag . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Compares
obj to this tag to see if they are the same considering weakness and value. |
java.lang.String |
getValue()
Get the value of an
EntityTag . |
int |
hashCode()
Generate hashCode based on value and weakness.
|
boolean |
isWeak()
Check the strength of an
EntityTag . |
java.lang.String |
toString()
Deprecated.
The format of the toString() method is subject to change in a future version. Please use
RuntimeDelegate.getInstance().createHeaderDelegate(EntityTag.class).toString(value) instead if you rely on the format
of this method.
|
static EntityTag |
valueOf(java.lang.String value)
Deprecated.
This method will be removed in a future version. Please use
RuntimeDelegate.getInstance().createHeaderDelegate(EntityTag.class).fromString(value) instead.
|
public EntityTag(java.lang.String value)
EntityTag
.value
- the value of the tag, quotes not included.java.lang.IllegalArgumentException
- if value is null
.public EntityTag(java.lang.String value, boolean weak)
EntityTag
.value
- the value of the tag, quotes not included.weak
- true
if this represents a weak tag, false
otherwise.java.lang.IllegalArgumentException
- if value is null
.@Deprecated public static EntityTag valueOf(java.lang.String value)
EntityTag
by parsing the supplied string.value
- the entity tag string.java.lang.IllegalArgumentException
- if the supplied string cannot be parsed or is null
.public boolean isWeak()
EntityTag
.true
if this represents a weak tag, false
otherwise.public java.lang.String getValue()
EntityTag
.public boolean equals(java.lang.Object obj)
obj
to this tag to see if they are the same considering weakness and value.equals
in class java.lang.Object
obj
- the object to compare to.true
if the two tags are the same, false
otherwise.public int hashCode()
hashCode
in class java.lang.Object
@Deprecated public java.lang.String toString()
toString
in class java.lang.Object