Package org.apache.polaris.service.http
Record Class IfNoneMatch
java.lang.Object
java.lang.Record
org.apache.polaris.service.http.IfNoneMatch
Logical representation of an HTTP compliant If-None-Match header.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIfNoneMatch(boolean isWildcard, List<String> eTags) Creates an instance of aIfNoneMatchrecord class.IfNoneMatch(List<String> etags) -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf any contained ETag matches the provided etag or the header is a wildcard.final booleanIndicates whether some other object is "equal to" this one.eTags()Returns the value of theeTagsrecord component.static IfNoneMatchfromHeader(String rawValue) Parses the raw content of an If-None-Match header into the logical representationfinal inthashCode()Returns a hash code value for this object.booleanReturns the value of theisWildcardrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
WILDCARD
-
-
Constructor Details
-
IfNoneMatch
-
IfNoneMatch
Creates an instance of aIfNoneMatchrecord class.- Parameters:
isWildcard- the value for theisWildcardrecord componenteTags- the value for theeTagsrecord component
-
-
Method Details
-
fromHeader
Parses the raw content of an If-None-Match header into the logical representation- Parameters:
rawValue- The raw value of the If-None-Match header- Returns:
- A logically equivalent representation of the raw header content
-
anyMatch
If any contained ETag matches the provided etag or the header is a wildcard. Only matches weak eTags to weak eTags and strong eTags to strong eTags.- Parameters:
eTag- the etag to compare against.- Returns:
- true if any of the contained ETags match the provided etag
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
isWildcard
public boolean isWildcard()Returns the value of theisWildcardrecord component.- Returns:
- the value of the
isWildcardrecord component
-
eTags
Returns the value of theeTagsrecord component.- Returns:
- the value of the
eTagsrecord component
-