Record Class ETag
java.lang.Object
java.lang.Record
org.springframework.http.ETag
- Record Components:
tag- the unquoted tag valueweak- whether the entity tag is for weak or strong validation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanPerform a strong or weak comparison to anotherETag.static ETagCreate anETaginstance from a String representation.booleanIndicates whether some other object is "equal to" this one.Return the fully formatted tag including "W/" prefix and quotes.inthashCode()Returns a hash code value for this object.booleanWhether this a wildcard tag matching to any entity tag value.Parse entity tags from an "If-Match" or "If-None-Match" header.static StringAdd quotes around the ETag value if not present already.tag()Returns the value of thetagrecord component.toString()Returns a string representation of this record class.booleanweak()Returns the value of theweakrecord component.
-
Constructor Details
-
ETag
-
-
Method Details
-
isWildcard
public boolean isWildcard()Whether this a wildcard tag matching to any entity tag value. -
compare
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
hashCode
-
toString
-
formattedTag
Return the fully formatted tag including "W/" prefix and quotes. -
create
-
parse
-
quoteETagIfNecessary
-
tag
-
weak
-