public final class Tag
extends java.lang.Object
RepresentationInfo.getTag()
,
HTTP Entity Tags,
HTTP Entity Tag Cache ValidatorsModifier and Type | Field and Description |
---|---|
static Tag |
ALL
Tag matching any other tag, used in call's condition data.
|
Constructor and Description |
---|
Tag()
Default constructor.
|
Tag(java.lang.String opaqueTag)
Constructor of weak tags.
|
Tag(java.lang.String opaqueTag,
boolean weak)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object)
Indicates if both tags are equal.
|
boolean |
equals(java.lang.Object object,
boolean checkWeakness)
Indicates if both tags are equal.
|
java.lang.String |
format()
Returns tag formatted as an HTTP tag string.
|
java.lang.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(java.lang.String httpTag)
Parses a tag formatted as defined by the HTTP standard.
|
java.lang.String |
toString()
Returns the name.
|
public static final Tag ALL
public Tag()
public Tag(java.lang.String opaqueTag)
opaqueTag
- The tag value.public Tag(java.lang.String opaqueTag, boolean weak)
opaqueTag
- The tag value.weak
- The weakness indicator.public static Tag parse(java.lang.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(java.lang.Object object)
equals
in class java.lang.Object
object
- The object to compare to.public boolean equals(java.lang.Object object, boolean checkWeakness)
object
- The object to compare to.checkWeakness
- The equality test takes care or not of the weakness.public java.lang.String format()
public java.lang.String getName()
public int hashCode()
hashCode
in class java.lang.Object
public boolean isWeak()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2005-2024 Restlet.