Package com.ibm.cloud.sdk.core.http
Class Headers
- java.lang.Object
-
- com.ibm.cloud.sdk.core.http.Headers
-
public class Headers extends java.lang.ObjectWrapper class for the internal HTTP headers class.
-
-
Constructor Summary
Constructors Constructor Description Headers(okhttp3.Headers headers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)Returns true if other is a Headers object with the same headers, with the same casing, in the same order.inthashCode()java.util.Set<java.lang.String>names()Returns an immutable, case-insensitive set of header names.java.lang.StringtoString()java.util.List<java.lang.String>values(java.lang.String name)Returns an immutable list of the header values for the specified name.
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
Returns true if other is a Headers object with the same headers, with the same casing, in the same order.- Overrides:
equalsin classjava.lang.Object- Parameters:
other- the other object to compare- Returns:
- whether the two objects are equal or not
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
names
public java.util.Set<java.lang.String> names()
Returns an immutable, case-insensitive set of header names.- Returns:
- the list of header names
-
values
public java.util.List<java.lang.String> values(java.lang.String name)
Returns an immutable list of the header values for the specified name.- Parameters:
name- the name of the specified header- Returns:
- the values associated with the name
-
-