public static class JsonEventMatcher.HeaderValue extends Object
Header value to match.| Constructor and Description |
|---|
HeaderValue(String key,
String value)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Checks if the provided
obj is equal to this JsonEventMatcher.HeaderValue. |
String |
getKey()
Returns the key of the
JsonEventMatcher.HeaderValue. |
String |
getValue()
Returns the value of the
JsonEventMatcher.HeaderValue. |
int |
hashCode()
Computes the hash code associated to this
JsonEventMatcher.HeaderValue. |
static JsonEventMatcher.HeaderValue |
of(String key,
String value)
|
String |
toString()
Returns a
String representation of this JsonEventMatcher.HeaderValue. |
public HeaderValue(String key, String value)
key - the key of the Header to matchvalue - the value of the Header to matchNullPointerException - if the provided key or value is nullof(String, String)public static JsonEventMatcher.HeaderValue of(String key, String value)
JsonEventMatcher.HeaderValue from the provided key and value.
This method is a shortcut for #HeaderValue(String, String).
key - the key of the Header to matchvalue - the value of the Header to matchJsonEventMatcher.HeaderValueNullPointerException - if the provided key or value is null#HeaderValue(String, String)public String getKey()
JsonEventMatcher.HeaderValue.JsonEventMatcher.HeaderValuepublic String getValue()
JsonEventMatcher.HeaderValue.JsonEventMatcher.HeaderValuepublic boolean equals(Object obj)
obj is equal to this JsonEventMatcher.HeaderValue.
Two JsonEventMatcher.HeaderValues are equal if their keys and values are respectively equal.
equals in class Objectobj - the Object to checktrue if the provided obj is equal to this JsonEventMatcher.HeaderValue, false
otherwisepublic int hashCode()
JsonEventMatcher.HeaderValue.
JsonEventMatcher.HeaderValue's hash code is computed by summing the hash codes of its key and value (key
.hashCode() + value.hashCode().
hashCode in class ObjectJsonEventMatcher.HeaderValueString.hashCode()public String toString()
String representation of this JsonEventMatcher.HeaderValue.
The returned String follows the pattern "Header[key]=value".
toString in class ObjectString representation of this JsonEventMatcher.HeaderValueCopyright © 2020 SOM Research Lab. All rights reserved.