java.lang.Object
java.lang.Record
org.htmlunit.csp.value.Scheme
- Record Components:
value- the scheme name in lowercase, without the trailing colon (e.g."https","data")
Represents a CSP scheme-source value, e.g.
https: or data:.
A scheme-source is a URI scheme followed by a colon. Per RFC 3986 ยง3.1, schemes are case-insensitive, so the value is stored in its canonical lowercase form.
- Author:
- Salvation Team
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.parseScheme(String value) Parses a scheme-source from its CSP string representation.toString()Returns the CSP string representation of this scheme-source (the lowercase scheme name followed by a colon, e.g.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
Scheme
Creates an instance of aSchemerecord class.- Parameters:
value- the value for thevaluerecord component
-
-
Method Details
-
parseScheme
Parses a scheme-source from its CSP string representation.The input must match the scheme grammar followed by a colon (e.g.
"https:"). The scheme is lowercased per RFC 3986. -
toString
Returns the CSP string representation of this scheme-source (the lowercase scheme name followed by a colon, e.g."https:"). -
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. All components in this record class are compared withObjects::equals(Object,Object). -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-