|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.data.Tag
public final class Tag
Validation tag equivalent to an HTTP entity tag (E-Tag). "A strong entity tag
may be shared by two entities of a resource only if they are equivalent by
octet equality.
A weak entity tag may be shared by two entities of a resource only if the
entities are equivalent and could be substituted for each other with no
significant change in semantics."
RepresentationInfo.getTag()
,
HTTP
Entity Tags,
HTTP
Entity Tag Cache ValidatorsField Summary | |
---|---|
static Tag |
ALL
Tag matching any other tag, used in call's condition data. |
Constructor Summary | |
---|---|
Tag()
Default constructor. |
|
Tag(String opaqueTag)
Constructor of weak tags. |
|
Tag(String opaqueTag,
boolean weak)
Constructor. |
Method Summary | |
---|---|
boolean |
equals(Object object)
Indicates if both tags are equal. |
boolean |
equals(Object object,
boolean checkWeakness)
Indicates if both tags are equal. |
String |
format()
Returns tag formatted as an HTTP tag string. |
String |
getName()
Returns the name, corresponding to an HTTP opaque tag value. |
int |
hashCode()
|
boolean |
isWeak()
Indicates if the tag is weak. |
static Tag |
parse(String httpTag)
Parses a tag formatted as defined by the HTTP standard. |
String |
toString()
Returns the name. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Tag ALL
Constructor Detail |
---|
public Tag()
public Tag(String opaqueTag)
opaqueTag
- The tag value.public Tag(String opaqueTag, boolean weak)
opaqueTag
- The tag value.weak
- The weakness indicator.Method Detail |
---|
public static Tag parse(String httpTag)
httpTag
- The HTTP tag string; if it starts with 'W/' the tag will be
marked as weak and the data following the 'W/' used as the
tag; otherwise it should be surrounded with quotes (e.g.,
"sometag").
public boolean equals(Object object)
equals
in class Object
object
- The object to compare to.
public boolean equals(Object object, boolean checkWeakness)
object
- The object to compare to.checkWeakness
- The equality test takes care or not of the weakness.
public String format()
public String getName()
public int hashCode()
hashCode
in class Object
public boolean isWeak()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |