Package org.forgerock.http.header
Class Directive
java.lang.Object
org.forgerock.http.header.Directive
Represents the name/value pair of a HTTP header directives. If the directive value was enclosed in quotes
then this will also be captured, often seen in cookie headers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Directive
Return aDirective
based on the name and value, if value was quoted then this is also captured.boolean
getName()
Represents the directive name.Represents the original directive value and in quotes if it was originally quoted.getValue()
Represents directive value, won't be quoted even if the original was.int
hashCode()
boolean
hasName()
Return true if the directive name is not null or empty.boolean
isQuoted()
Returntrue
if the original directive value was enclosed in quotes.toString()
-
Method Details
-
directive
Return aDirective
based on the name and value, if value was quoted then this is also captured.- Parameters:
name
- the name of the directive.value
- the value of the directive.- Returns:
- a
Directive
based on the name and value, if value was quoted then this is also captured.
-
getName
Represents the directive name.- Returns:
- the directive name.
-
hasName
public boolean hasName()Return true if the directive name is not null or empty.- Returns:
- true if the directive name is not null or empty.
-
getValue
Represents directive value, won't be quoted even if the original was.- Returns:
- the directive value, won't be quoted even if the original was.
-
getOriginalValue
Represents the original directive value and in quotes if it was originally quoted.- Returns:
- the original directive value and in quotes if it was originally quoted.
-
isQuoted
public boolean isQuoted()Returntrue
if the original directive value was enclosed in quotes.- Returns:
true
if the original directive value was enclosed in quotes.
-
toString
-
hashCode
public int hashCode() -
equals
-