public class EntityTag extends Object
Constructor | Description |
---|---|
EntityTag(String value) |
Creates a new instance of a strong EntityTag.
|
EntityTag(String value,
boolean weak) |
Creates a new instance of an EntityTag
|
Modifier and Type | Method | Description |
---|---|---|
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.
|
public EntityTag(String value)
value
- the value of the tag, quotes not included.IllegalArgumentException
- if value is nullpublic EntityTag(String value, boolean weak)
value
- the value of the tag, quotes not included.weak
- true if this represents a weak tag, false otherwiseIllegalArgumentException
- if value is nullpublic static EntityTag valueOf(String value) throws IllegalArgumentException
value
- the entity tag stringIllegalArgumentException
- if the supplied string cannot be parsed
or is nullpublic boolean isWeak()
public String getValue()
public boolean equals(Object obj)
public int hashCode()
Copyright © 2019 Sun Microsystems, Inc. All rights reserved.