Enum Class CrossOriginResourcePolicy
- All Implemented Interfaces:
Serializable, CharSequence, Comparable<CrossOriginResourcePolicy>, Constable
public enum CrossOriginResourcePolicy
extends Enum<CrossOriginResourcePolicy>
implements CharSequence
The possible values of the
Cross-Origin-Resource-Policy header.- Since:
- 5.2.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptioncharcharAt(int index) intlength()static @Nullable CrossOriginResourcePolicyFinds the policy for the given header value.subSequence(int start, int end) toString()static CrossOriginResourcePolicyReturns the enum constant of this class with the specified name.static CrossOriginResourcePolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOfMethods inherited from interface CharSequence
chars, codePoints, getChars, isEmpty
-
Enum Constant Details
-
SAME_ORIGIN
-
SAME_SITE
-
CROSS_ORIGIN
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
of
Finds the policy for the given header value.- Parameters:
value- The header value- Returns:
- The matching policy, or
nullif there is no match - Since:
- 5.2.0
-
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classEnum<CrossOriginResourcePolicy>- Returns:
- The Cross-Origin-Resource-Policy header value
-