|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.ws.rs.core.EntityTag
public class EntityTag
An abstraction for the value of a HTTP Entity Tag, used as the value of an ETag response header.
| Constructor Summary | |
|---|---|
EntityTag(String value)
Creates a new instance of a strong EntityTag. |
|
EntityTag(String value,
boolean weak)
Creates a new instance of an EntityTag. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Compares obj to this tag to see if they are the same considering
weakness and value. |
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. |
String |
toString()
Convert the entity tag to a string suitable for use as the value of the corresponding HTTP header. |
static EntityTag |
valueOf(String value)
Creates a new instance of EntityTag by parsing the supplied string. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EntityTag(String value)
EntityTag.
value - the value of the tag, quotes not included.
IllegalArgumentException - if value is null.
public EntityTag(String value,
boolean weak)
EntityTag.
value - the value of the tag, quotes not included.weak - true if this represents a weak tag, false otherwise.
IllegalArgumentException - if value is null.| Method Detail |
|---|
public static EntityTag valueOf(String value)
EntityTag by parsing the supplied string.
value - the entity tag string.
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 String getValue()
EntityTag.
public boolean equals(Object obj)
obj to this tag to see if they are the same considering
weakness and value.
equals in class Objectobj - the object to compare to.
true if the two tags are the same, false otherwise.public int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||