public final class ReadOnlyHttp2Headers extends java.lang.Object implements Http2Headers
Http2Headers which only supports read-only methods.
Any array passed to this class may be used directly in the underlying data structures of this class. If these arrays may be modified it is the caller's responsibility to supply this class with a copy of the array.
This may be a good alternative to DefaultHttp2Headers if your have a fixed set of headers which will not
change.
Http2Headers.PseudoHeaderName| 限定符和类型 | 方法和说明 |
|---|---|
Http2Headers |
add(java.lang.CharSequence name,
java.lang.CharSequence... values)
Adds new headers with the specified
name and values. |
Http2Headers |
add(java.lang.CharSequence name,
java.lang.CharSequence value)
Adds a new header with the specified
name and value. |
Http2Headers |
add(java.lang.CharSequence name,
java.lang.Iterable<? extends java.lang.CharSequence> values)
Adds new headers with the specified
name and values. |
Http2Headers |
add(Headers<? extends java.lang.CharSequence,? extends java.lang.CharSequence,?> headers)
Adds all header names and values of
headers to this object. |
Http2Headers |
addBoolean(java.lang.CharSequence name,
boolean value)
Adds a new header.
|
Http2Headers |
addByte(java.lang.CharSequence name,
byte value)
Adds a new header.
|
Http2Headers |
addChar(java.lang.CharSequence name,
char value)
Adds a new header.
|
Http2Headers |
addDouble(java.lang.CharSequence name,
double value)
Adds a new header.
|
Http2Headers |
addFloat(java.lang.CharSequence name,
float value)
Adds a new header.
|
Http2Headers |
addInt(java.lang.CharSequence name,
int value)
Adds a new header.
|
Http2Headers |
addLong(java.lang.CharSequence name,
long value)
Adds a new header.
|
Http2Headers |
addObject(java.lang.CharSequence name,
java.lang.Iterable<?> values)
Adds a new header with the specified name and values.
|
Http2Headers |
addObject(java.lang.CharSequence name,
java.lang.Object... values)
Adds a new header with the specified name and values.
|
Http2Headers |
addObject(java.lang.CharSequence name,
java.lang.Object value)
Adds a new header.
|
Http2Headers |
addShort(java.lang.CharSequence name,
short value)
Adds a new header.
|
Http2Headers |
addTimeMillis(java.lang.CharSequence name,
long value)
Adds a new header.
|
java.lang.CharSequence |
authority()
Gets the
Http2Headers.PseudoHeaderName.AUTHORITY header or null if there is no such header |
Http2Headers |
authority(java.lang.CharSequence value)
Sets the
Http2Headers.PseudoHeaderName.AUTHORITY header |
Http2Headers |
clear()
Removes all headers.
|
static ReadOnlyHttp2Headers |
clientHeaders(boolean validateHeaders,
AsciiString method,
AsciiString path,
AsciiString scheme,
AsciiString authority,
AsciiString... otherHeaders)
Create a new read only representation of headers used by clients.
|
boolean |
contains(java.lang.CharSequence name)
Returns
true if a header with the name exists, false otherwise. |
boolean |
contains(java.lang.CharSequence name,
java.lang.CharSequence value)
Returns
true if a header with the name and value exists, false otherwise. |
boolean |
contains(java.lang.CharSequence name,
java.lang.CharSequence value,
boolean caseInsensitive)
Returns
true if a header with the name and value exists, false otherwise. |
boolean |
containsBoolean(java.lang.CharSequence name,
boolean value)
Returns
true if a header with the name and value exists. |
boolean |
containsByte(java.lang.CharSequence name,
byte value)
Returns
true if a header with the name and value exists. |
boolean |
containsChar(java.lang.CharSequence name,
char value)
Returns
true if a header with the name and value exists. |
boolean |
containsDouble(java.lang.CharSequence name,
double value)
Returns
true if a header with the name and value exists. |
boolean |
containsFloat(java.lang.CharSequence name,
float value)
Returns
true if a header with the name and value exists. |
boolean |
containsInt(java.lang.CharSequence name,
int value)
Returns
true if a header with the name and value exists. |
boolean |
containsLong(java.lang.CharSequence name,
long value)
Returns
true if a header with the name and value exists. |
boolean |
containsObject(java.lang.CharSequence name,
java.lang.Object value)
Returns
true if a header with the name and value exists. |
boolean |
containsShort(java.lang.CharSequence name,
short value)
Returns
true if a header with the name and value exists. |
boolean |
containsTimeMillis(java.lang.CharSequence name,
long value)
Returns
true if a header with the name and value exists. |
java.lang.CharSequence |
get(java.lang.CharSequence name)
Returns the value of a header with the specified name.
|
java.lang.CharSequence |
get(java.lang.CharSequence name,
java.lang.CharSequence defaultValue)
Returns the value of a header with the specified name.
|
java.util.List<java.lang.CharSequence> |
getAll(java.lang.CharSequence name)
Returns all values for the header with the specified name.
|
java.util.List<java.lang.CharSequence> |
getAllAndRemove(java.lang.CharSequence name)
Returns all values for the header with the specified name and removes them from this object.
|
java.lang.CharSequence |
getAndRemove(java.lang.CharSequence name)
Returns the value of a header with the specified name and removes it from this object.
|
java.lang.CharSequence |
getAndRemove(java.lang.CharSequence name,
java.lang.CharSequence defaultValue)
Returns the value of a header with the specified name and removes it from this object.
|
java.lang.Boolean |
getBoolean(java.lang.CharSequence name)
Returns the
boolean value of a header with the specified name. |
boolean |
getBoolean(java.lang.CharSequence name,
boolean defaultValue)
Returns the
boolean value of a header with the specified name. |
java.lang.Boolean |
getBooleanAndRemove(java.lang.CharSequence name)
Returns the
boolean value of a header with the specified name and removes the header from this
object. |
boolean |
getBooleanAndRemove(java.lang.CharSequence name,
boolean defaultValue)
Returns the
boolean value of a header with the specified name and removes the header from this
object. |
java.lang.Byte |
getByte(java.lang.CharSequence name)
Returns the
byte value of a header with the specified name. |
byte |
getByte(java.lang.CharSequence name,
byte defaultValue)
Returns the
byte value of a header with the specified name. |
java.lang.Byte |
getByteAndRemove(java.lang.CharSequence name)
Returns the
byte value of a header with the specified name and removes the header from this
object. |
byte |
getByteAndRemove(java.lang.CharSequence name,
byte defaultValue)
Returns the
byte value of a header with the specified name and removes the header from this
object. |
java.lang.Character |
getChar(java.lang.CharSequence name)
Returns the
char value of a header with the specified name. |
char |
getChar(java.lang.CharSequence name,
char defaultValue)
Returns the
char value of a header with the specified name. |
java.lang.Character |
getCharAndRemove(java.lang.CharSequence name)
Returns the
char value of a header with the specified name and removes the header from this
object. |
char |
getCharAndRemove(java.lang.CharSequence name,
char defaultValue)
Returns the
char value of a header with the specified name and removes the header from this
object. |
java.lang.Double |
getDouble(java.lang.CharSequence name)
Returns the
double value of a header with the specified name. |
double |
getDouble(java.lang.CharSequence name,
double defaultValue)
Returns the
double value of a header with the specified name. |
java.lang.Double |
getDoubleAndRemove(java.lang.CharSequence name)
Returns the
double value of a header with the specified name and removes the header from this
object. |
double |
getDoubleAndRemove(java.lang.CharSequence name,
double defaultValue)
Returns the
double value of a header with the specified name and removes the header from this
object. |
java.lang.Float |
getFloat(java.lang.CharSequence name)
Returns the
float value of a header with the specified name. |
float |
getFloat(java.lang.CharSequence name,
float defaultValue)
Returns the
float value of a header with the specified name. |
java.lang.Float |
getFloatAndRemove(java.lang.CharSequence name)
Returns the
float value of a header with the specified name and removes the header from this
object. |
float |
getFloatAndRemove(java.lang.CharSequence name,
float defaultValue)
Returns the
float value of a header with the specified name and removes the header from this
object. |
java.lang.Integer |
getInt(java.lang.CharSequence name)
Returns the
int value of a header with the specified name. |
int |
getInt(java.lang.CharSequence name,
int defaultValue)
Returns the
int value of a header with the specified name. |
java.lang.Integer |
getIntAndRemove(java.lang.CharSequence name)
Returns the
int value of a header with the specified name and removes the header from this
object. |
int |
getIntAndRemove(java.lang.CharSequence name,
int defaultValue)
Returns the
int value of a header with the specified name and removes the header from this
object. |
java.lang.Long |
getLong(java.lang.CharSequence name)
Returns the
long value of a header with the specified name. |
long |
getLong(java.lang.CharSequence name,
long defaultValue)
Returns the
long value of a header with the specified name. |
java.lang.Long |
getLongAndRemove(java.lang.CharSequence name)
Returns the
long value of a header with the specified name and removes the header from this
object. |
long |
getLongAndRemove(java.lang.CharSequence name,
long defaultValue)
Returns the
long value of a header with the specified name and removes the header from this
object. |
java.lang.Short |
getShort(java.lang.CharSequence name)
Returns the
short value of a header with the specified name. |
short |
getShort(java.lang.CharSequence name,
short defaultValue)
Returns the
short value of a header with the specified name. |
java.lang.Short |
getShortAndRemove(java.lang.CharSequence name)
Returns the
short value of a header with the specified name and removes the header from this
object. |
short |
getShortAndRemove(java.lang.CharSequence name,
short defaultValue)
Returns the
short value of a header with the specified name and removes the header from this
object. |
java.lang.Long |
getTimeMillis(java.lang.CharSequence name)
Returns the value of a header with the specified name in milliseconds.
|
long |
getTimeMillis(java.lang.CharSequence name,
long defaultValue)
Returns the value of a header with the specified name in milliseconds.
|
java.lang.Long |
getTimeMillisAndRemove(java.lang.CharSequence name)
Returns the value of a header with the specified
name in milliseconds and removes the header from this
object. |
long |
getTimeMillisAndRemove(java.lang.CharSequence name,
long defaultValue)
Returns the value of a header with the specified
name in milliseconds and removes the header from this
object. |
boolean |
isEmpty()
|
java.util.Iterator<java.util.Map.Entry<java.lang.CharSequence,java.lang.CharSequence>> |
iterator()
Returns an iterator over all HTTP/2 headers.
|
java.lang.CharSequence |
method()
Gets the
Http2Headers.PseudoHeaderName.METHOD header or null if there is no such header |
Http2Headers |
method(java.lang.CharSequence value)
Sets the
Http2Headers.PseudoHeaderName.METHOD header |
java.util.Set<java.lang.CharSequence> |
names()
Returns a
Set of all header names in this object. |
java.lang.CharSequence |
path()
Gets the
Http2Headers.PseudoHeaderName.PATH header or null if there is no such header |
Http2Headers |
path(java.lang.CharSequence value)
Sets the
Http2Headers.PseudoHeaderName.PATH header |
boolean |
remove(java.lang.CharSequence name)
Removes all headers with the specified
name. |
java.lang.CharSequence |
scheme()
Gets the
Http2Headers.PseudoHeaderName.SCHEME header or null if there is no such header |
Http2Headers |
scheme(java.lang.CharSequence value)
Sets the
Http2Headers.PseudoHeaderName.SCHEME header |
static ReadOnlyHttp2Headers |
serverHeaders(boolean validateHeaders,
AsciiString status,
AsciiString... otherHeaders)
Create a new read only representation of headers used by servers.
|
Http2Headers |
set(java.lang.CharSequence name,
java.lang.CharSequence... values)
Sets a header with the specified name and values.
|
Http2Headers |
set(java.lang.CharSequence name,
java.lang.CharSequence value)
Sets a header with the specified name and value.
|
Http2Headers |
set(java.lang.CharSequence name,
java.lang.Iterable<? extends java.lang.CharSequence> values)
Sets a new header with the specified name and values.
|
Http2Headers |
set(Headers<? extends java.lang.CharSequence,? extends java.lang.CharSequence,?> headers)
Clears the current header entries and copies all header entries of the specified
headers. |
Http2Headers |
setAll(Headers<? extends java.lang.CharSequence,? extends java.lang.CharSequence,?> headers)
Retains all current headers but calls
#set(K, V) for each entry in headers. |
Http2Headers |
setBoolean(java.lang.CharSequence name,
boolean value)
Set the
name to value. |
Http2Headers |
setByte(java.lang.CharSequence name,
byte value)
Set the
name to value. |
Http2Headers |
setChar(java.lang.CharSequence name,
char value)
Set the
name to value. |
Http2Headers |
setDouble(java.lang.CharSequence name,
double value)
Set the
name to value. |
Http2Headers |
setFloat(java.lang.CharSequence name,
float value)
Set the
name to value. |
Http2Headers |
setInt(java.lang.CharSequence name,
int value)
Set the
name to value. |
Http2Headers |
setLong(java.lang.CharSequence name,
long value)
Set the
name to value. |
Http2Headers |
setObject(java.lang.CharSequence name,
java.lang.Iterable<?> values)
Sets a header with the specified name and values.
|
Http2Headers |
setObject(java.lang.CharSequence name,
java.lang.Object... values)
Sets a header with the specified name and values.
|
Http2Headers |
setObject(java.lang.CharSequence name,
java.lang.Object value)
Sets a new header.
|
Http2Headers |
setShort(java.lang.CharSequence name,
short value)
Set the
name to value. |
Http2Headers |
setTimeMillis(java.lang.CharSequence name,
long value)
Set the
name to value. |
int |
size()
Returns the number of headers in this object.
|
java.lang.CharSequence |
status()
Gets the
Http2Headers.PseudoHeaderName.STATUS header or null if there is no such header |
Http2Headers |
status(java.lang.CharSequence value)
Sets the
Http2Headers.PseudoHeaderName.STATUS header |
java.lang.String |
toString() |
static ReadOnlyHttp2Headers |
trailers(boolean validateHeaders,
AsciiString... otherHeaders)
Used to create read only object designed to represent trailers.
|
java.util.Iterator<java.lang.CharSequence> |
valueIterator(java.lang.CharSequence name)
Equivalent to
Headers.getAll(Object) but no intermediate list is generated. |
public static ReadOnlyHttp2Headers trailers(boolean validateHeaders, AsciiString... otherHeaders)
If this is used for a purpose other than trailers you may violate the header serialization ordering defined by RFC 7540, 8.1.2.1.
validateHeaders - true will run validation on each header name/value pair to ensure protocol
compliance.otherHeaders - An array of key:value pairs. Must not contain any
pseudo headers
or null names/values.
A copy will NOT be made of this array. If the contents of this array
may be modified externally you are responsible for passing in a copy.public static ReadOnlyHttp2Headers clientHeaders(boolean validateHeaders, AsciiString method, AsciiString path, AsciiString scheme, AsciiString authority, AsciiString... otherHeaders)
validateHeaders - true will run validation on each header name/value pair to ensure protocol
compliance.method - The value for Http2Headers.PseudoHeaderName.METHOD.path - The value for Http2Headers.PseudoHeaderName.PATH.scheme - The value for Http2Headers.PseudoHeaderName.SCHEME.authority - The value for Http2Headers.PseudoHeaderName.AUTHORITY.otherHeaders - An array of key:value pairs. Must not contain any
pseudo headers
or null names/values.
A copy will NOT be made of this array. If the contents of this array
may be modified externally you are responsible for passing in a copy.public static ReadOnlyHttp2Headers serverHeaders(boolean validateHeaders, AsciiString status, AsciiString... otherHeaders)
validateHeaders - true will run validation on each header name/value pair to ensure protocol
compliance.status - The value for Http2Headers.PseudoHeaderName.STATUS.otherHeaders - An array of key:value pairs. Must not contain any
pseudo headers
or null names/values.
A copy will NOT be made of this array. If the contents of this array
may be modified externally you are responsible for passing in a copy.public java.lang.CharSequence get(java.lang.CharSequence name)
Headersget 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievenull if there's no such headerpublic java.lang.CharSequence get(java.lang.CharSequence name,
java.lang.CharSequence defaultValue)
Headersget 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievedefaultValue - the default valuedefaultValue if there is no such headerpublic java.lang.CharSequence getAndRemove(java.lang.CharSequence name)
HeadersgetAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievenull if there is no such headerpublic java.lang.CharSequence getAndRemove(java.lang.CharSequence name,
java.lang.CharSequence defaultValue)
HeadersgetAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievedefaultValue - the default valuedefaultValue if there is no such headerpublic java.util.List<java.lang.CharSequence> getAll(java.lang.CharSequence name)
HeadersList can't be modified.getAll 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrieveList of header values or an empty List if no values are found.public java.util.List<java.lang.CharSequence> getAllAndRemove(java.lang.CharSequence name)
HeadersList can't be modified.getAllAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrieveList of header values or an empty List if no values are found.public java.lang.Boolean getBoolean(java.lang.CharSequence name)
Headersboolean value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getBoolean 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrieveboolean value of the first value in insertion order or null if there is no such
value or it can't be converted to boolean.public boolean getBoolean(java.lang.CharSequence name,
boolean defaultValue)
Headersboolean value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getBoolean 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievedefaultValue - the default valueboolean value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to boolean.public java.lang.Byte getByte(java.lang.CharSequence name)
Headersbyte value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getByte 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievebyte value of the first value in insertion order or null if there is no such
value or it can't be converted to byte.public byte getByte(java.lang.CharSequence name,
byte defaultValue)
Headersbyte value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getByte 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievedefaultValue - the default valuebyte value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to byte.public java.lang.Character getChar(java.lang.CharSequence name)
Headerschar value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getChar 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievechar value of the first value in insertion order or null if there is no such
value or it can't be converted to char.public char getChar(java.lang.CharSequence name,
char defaultValue)
Headerschar value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getChar 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievedefaultValue - the default valuechar value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to char.public java.lang.Short getShort(java.lang.CharSequence name)
Headersshort value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getShort 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrieveshort value of the first value in insertion order or null if there is no such
value or it can't be converted to short.public short getShort(java.lang.CharSequence name,
short defaultValue)
Headersshort value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getShort 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievedefaultValue - the default valueshort value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to short.public java.lang.Integer getInt(java.lang.CharSequence name)
Headersint value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getInt 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrieveint value of the first value in insertion order or null if there is no such
value or it can't be converted to int.public int getInt(java.lang.CharSequence name,
int defaultValue)
Headersint value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getInt 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievedefaultValue - the default valueint value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to int.public java.lang.Long getLong(java.lang.CharSequence name)
Headerslong value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getLong 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievelong value of the first value in insertion order or null if there is no such
value or it can't be converted to long.public long getLong(java.lang.CharSequence name,
long defaultValue)
Headerslong value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getLong 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievedefaultValue - the default valuelong value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to long.public java.lang.Float getFloat(java.lang.CharSequence name)
Headersfloat value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getFloat 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievefloat value of the first value in insertion order or null if there is no such
value or it can't be converted to float.public float getFloat(java.lang.CharSequence name,
float defaultValue)
Headersfloat value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getFloat 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievedefaultValue - the default valuefloat value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to float.public java.lang.Double getDouble(java.lang.CharSequence name)
Headersdouble value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getDouble 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievedouble value of the first value in insertion order or null if there is no such
value or it can't be converted to double.public double getDouble(java.lang.CharSequence name,
double defaultValue)
Headersdouble value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.getDouble 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievedefaultValue - the default valuedouble value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to double.public java.lang.Long getTimeMillis(java.lang.CharSequence name)
HeadersgetTimeMillis 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievenull if there is no such
value or it can't be converted to milliseconds.public long getTimeMillis(java.lang.CharSequence name,
long defaultValue)
HeadersgetTimeMillis 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievedefaultValue - the default valuedefaultValue if there is no such
value or it can't be converted to milliseconds.public java.lang.Boolean getBooleanAndRemove(java.lang.CharSequence name)
Headersboolean value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getBooleanAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrieveboolean value of the first value in insertion order or null if there is no
such value or it can't be converted to boolean.public boolean getBooleanAndRemove(java.lang.CharSequence name,
boolean defaultValue)
Headersboolean value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getBooleanAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to searchdefaultValue - the default valueboolean value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to boolean.public java.lang.Byte getByteAndRemove(java.lang.CharSequence name)
Headersbyte value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getByteAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to searchbyte value of the first value in insertion order or null if there is no
such value or it can't be converted to byte.public byte getByteAndRemove(java.lang.CharSequence name,
byte defaultValue)
Headersbyte value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getByteAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to searchdefaultValue - the default valuebyte value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to byte.public java.lang.Character getCharAndRemove(java.lang.CharSequence name)
Headerschar value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getCharAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to searchchar value of the first value in insertion order or null if there is no
such value or it can't be converted to char.public char getCharAndRemove(java.lang.CharSequence name,
char defaultValue)
Headerschar value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getCharAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to searchdefaultValue - the default valuechar value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to char.public java.lang.Short getShortAndRemove(java.lang.CharSequence name)
Headersshort value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getShortAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to searchshort value of the first value in insertion order or null if there is no
such value or it can't be converted to short.public short getShortAndRemove(java.lang.CharSequence name,
short defaultValue)
Headersshort value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getShortAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to searchdefaultValue - the default valueshort value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to short.public java.lang.Integer getIntAndRemove(java.lang.CharSequence name)
Headersint value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getIntAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to searchint value of the first value in insertion order or null if there is no
such value or it can't be converted to int.public int getIntAndRemove(java.lang.CharSequence name,
int defaultValue)
Headersint value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getIntAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to searchdefaultValue - the default valueint value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to int.public java.lang.Long getLongAndRemove(java.lang.CharSequence name)
Headerslong value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getLongAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to searchlong value of the first value in insertion order or null if there is no
such value or it can't be converted to long.public long getLongAndRemove(java.lang.CharSequence name,
long defaultValue)
Headerslong value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getLongAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to searchdefaultValue - the default valuelong value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to long.public java.lang.Float getFloatAndRemove(java.lang.CharSequence name)
Headersfloat value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getFloatAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to searchfloat value of the first value in insertion order or null if there is no
such value or it can't be converted to float.public float getFloatAndRemove(java.lang.CharSequence name,
float defaultValue)
Headersfloat value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getFloatAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to searchdefaultValue - the default valuefloat value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to float.public java.lang.Double getDoubleAndRemove(java.lang.CharSequence name)
Headersdouble value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getDoubleAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to searchdouble value of the first value in insertion order or null if there is no
such value or it can't be converted to double.public double getDoubleAndRemove(java.lang.CharSequence name,
double defaultValue)
Headersdouble value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getDoubleAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to searchdefaultValue - the default valuedouble value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to double.public java.lang.Long getTimeMillisAndRemove(java.lang.CharSequence name)
Headersname in milliseconds and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is
returned. In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getTimeMillisAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievenull if there is no such
value or it can't be converted to milliseconds.public long getTimeMillisAndRemove(java.lang.CharSequence name,
long defaultValue)
Headersname in milliseconds and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is
returned. In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
getTimeMillisAndRemove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the header to retrievedefaultValue - the default valuedefaultValue if there is no such
value or it can't be converted to milliseconds.public boolean contains(java.lang.CharSequence name)
Headerstrue if a header with the name exists, false otherwise.contains 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namepublic boolean contains(java.lang.CharSequence name,
java.lang.CharSequence value)
Headerstrue if a header with the name and value exists, false otherwise.
The Object.equals(Object) method is used to test for equality of value.
contains 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the header value of the header to findpublic boolean containsObject(java.lang.CharSequence name,
java.lang.Object value)
Headerstrue if a header with the name and value exists.containsObject 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsBoolean(java.lang.CharSequence name,
boolean value)
Headerstrue if a header with the name and value exists.containsBoolean 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsByte(java.lang.CharSequence name,
byte value)
Headerstrue if a header with the name and value exists.containsByte 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsChar(java.lang.CharSequence name,
char value)
Headerstrue if a header with the name and value exists.containsChar 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsShort(java.lang.CharSequence name,
short value)
Headerstrue if a header with the name and value exists.containsShort 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsInt(java.lang.CharSequence name,
int value)
Headerstrue if a header with the name and value exists.containsInt 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsLong(java.lang.CharSequence name,
long value)
Headerstrue if a header with the name and value exists.containsLong 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsFloat(java.lang.CharSequence name,
float value)
Headerstrue if a header with the name and value exists.containsFloat 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsDouble(java.lang.CharSequence name,
double value)
Headerstrue if a header with the name and value exists.containsDouble 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic boolean containsTimeMillis(java.lang.CharSequence name,
long value)
Headerstrue if a header with the name and value exists.containsTimeMillis 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the header valuetrue if it contains it false otherwisepublic int size()
Headerssize 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>public boolean isEmpty()
HeadersisEmpty 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>public java.util.Set<java.lang.CharSequence> names()
HeadersSet of all header names in this object. The returned Set cannot be modified.names 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>public Http2Headers add(java.lang.CharSequence name, java.lang.CharSequence value)
Headersname and value.add 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the name of the headervalue - the value of the headerthispublic Http2Headers add(java.lang.CharSequence name, java.lang.Iterable<? extends java.lang.CharSequence> values)
Headersname and values. This method is semantically equivalent to
for (T value : values) {
headers.add(name, value);
}
add 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalues - the values of the headerthispublic Http2Headers add(java.lang.CharSequence name, java.lang.CharSequence... values)
Headersname and values. This method is semantically equivalent to
for (T value : values) {
headers.add(name, value);
}
add 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalues - the values of the headerthispublic Http2Headers addObject(java.lang.CharSequence name, java.lang.Object value)
Headersvalue is added, it's converted to type T.addObject 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the value of the headerthispublic Http2Headers addObject(java.lang.CharSequence name, java.lang.Iterable<?> values)
Headers
for (Object v : values) {
headers.addObject(name, v);
}
addObject 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalues - the value of the headerthispublic Http2Headers addObject(java.lang.CharSequence name, java.lang.Object... values)
Headers
for (Object v : values) {
headers.addObject(name, v);
}
addObject 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalues - the value of the headerthispublic Http2Headers addBoolean(java.lang.CharSequence name, boolean value)
HeadersaddBoolean 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the value of the headerthispublic Http2Headers addByte(java.lang.CharSequence name, byte value)
HeadersaddByte 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the value of the headerthispublic Http2Headers addChar(java.lang.CharSequence name, char value)
HeadersaddChar 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the value of the headerthispublic Http2Headers addShort(java.lang.CharSequence name, short value)
HeadersaddShort 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the value of the headerthispublic Http2Headers addInt(java.lang.CharSequence name, int value)
HeadersaddInt 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the value of the headerthispublic Http2Headers addLong(java.lang.CharSequence name, long value)
HeadersaddLong 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the value of the headerthispublic Http2Headers addFloat(java.lang.CharSequence name, float value)
HeadersaddFloat 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the value of the headerthispublic Http2Headers addDouble(java.lang.CharSequence name, double value)
HeadersaddDouble 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the value of the headerthispublic Http2Headers addTimeMillis(java.lang.CharSequence name, long value)
HeadersaddTimeMillis 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the value of the headerthispublic Http2Headers add(Headers<? extends java.lang.CharSequence,? extends java.lang.CharSequence,?> headers)
Headersheaders to this object.add 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>thispublic Http2Headers set(java.lang.CharSequence name, java.lang.CharSequence value)
Headersset 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the value of the headerthispublic Http2Headers set(java.lang.CharSequence name, java.lang.Iterable<? extends java.lang.CharSequence> values)
Headers
for (T v : values) {
headers.addObject(name, v);
}
set 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalues - the value of the headerthispublic Http2Headers set(java.lang.CharSequence name, java.lang.CharSequence... values)
Headers
headers.remove(name);
for (T v : values) {
headers.add(name, v);
}
set 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalues - the value of the headerthispublic Http2Headers setObject(java.lang.CharSequence name, java.lang.Object value)
Headersvalue is add, it's
converted to type T.setObject 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the value of the headerthispublic Http2Headers setObject(java.lang.CharSequence name, java.lang.Iterable<?> values)
Headers
headers.remove(name);
for (Object v : values) {
headers.addObject(name, v);
}
setObject 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalues - the values of the headerthispublic Http2Headers setObject(java.lang.CharSequence name, java.lang.Object... values)
Headers
headers.remove(name);
for (Object v : values) {
headers.addObject(name, v);
}
setObject 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalues - the values of the headerthispublic Http2Headers setBoolean(java.lang.CharSequence name, boolean value)
Headersname to value. This will remove all previous values associated with name.setBoolean 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - The name to modifyvalue - The valuethispublic Http2Headers setByte(java.lang.CharSequence name, byte value)
Headersname to value. This will remove all previous values associated with name.setByte 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - The name to modifyvalue - The valuethispublic Http2Headers setChar(java.lang.CharSequence name, char value)
Headersname to value. This will remove all previous values associated with name.setChar 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - The name to modifyvalue - The valuethispublic Http2Headers setShort(java.lang.CharSequence name, short value)
Headersname to value. This will remove all previous values associated with name.setShort 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - The name to modifyvalue - The valuethispublic Http2Headers setInt(java.lang.CharSequence name, int value)
Headersname to value. This will remove all previous values associated with name.setInt 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - The name to modifyvalue - The valuethispublic Http2Headers setLong(java.lang.CharSequence name, long value)
Headersname to value. This will remove all previous values associated with name.setLong 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - The name to modifyvalue - The valuethispublic Http2Headers setFloat(java.lang.CharSequence name, float value)
Headersname to value. This will remove all previous values associated with name.setFloat 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - The name to modifyvalue - The valuethispublic Http2Headers setDouble(java.lang.CharSequence name, double value)
Headersname to value. This will remove all previous values associated with name.setDouble 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - The name to modifyvalue - The valuethispublic Http2Headers setTimeMillis(java.lang.CharSequence name, long value)
Headersname to value. This will remove all previous values associated with name.setTimeMillis 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - The name to modifyvalue - The valuethispublic Http2Headers set(Headers<? extends java.lang.CharSequence,? extends java.lang.CharSequence,?> headers)
Headersheaders.set 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>thispublic Http2Headers setAll(Headers<? extends java.lang.CharSequence,? extends java.lang.CharSequence,?> headers)
Headers#set(K, V) for each entry in headers.setAll 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>headers - The headers used to #set(K, V) values in this instancethispublic boolean remove(java.lang.CharSequence name)
Headersname.remove 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header nametrue if at least one entry has been removed.public Http2Headers clear()
HeadersHeaders.size() equals 0.clear 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>thispublic java.util.Iterator<java.util.Map.Entry<java.lang.CharSequence,java.lang.CharSequence>> iterator()
Http2Headersiterator 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>iterator 在接口中 Http2Headersiterator 在接口中 java.lang.Iterable<java.util.Map.Entry<java.lang.CharSequence,java.lang.CharSequence>>public java.util.Iterator<java.lang.CharSequence> valueIterator(java.lang.CharSequence name)
Http2HeadersHeaders.getAll(Object) but no intermediate list is generated.valueIterator 在接口中 Http2Headersname - the name of the header to retrieveIterator of header values corresponding to name.public Http2Headers method(java.lang.CharSequence value)
Http2HeadersHttp2Headers.PseudoHeaderName.METHOD headermethod 在接口中 Http2Headerspublic Http2Headers scheme(java.lang.CharSequence value)
Http2HeadersHttp2Headers.PseudoHeaderName.SCHEME headerscheme 在接口中 Http2Headerspublic Http2Headers authority(java.lang.CharSequence value)
Http2HeadersHttp2Headers.PseudoHeaderName.AUTHORITY headerauthority 在接口中 Http2Headerspublic Http2Headers path(java.lang.CharSequence value)
Http2HeadersHttp2Headers.PseudoHeaderName.PATH headerpath 在接口中 Http2Headerspublic Http2Headers status(java.lang.CharSequence value)
Http2HeadersHttp2Headers.PseudoHeaderName.STATUS headerstatus 在接口中 Http2Headerspublic java.lang.CharSequence method()
Http2HeadersHttp2Headers.PseudoHeaderName.METHOD header or null if there is no such headermethod 在接口中 Http2Headerspublic java.lang.CharSequence scheme()
Http2HeadersHttp2Headers.PseudoHeaderName.SCHEME header or null if there is no such headerscheme 在接口中 Http2Headerspublic java.lang.CharSequence authority()
Http2HeadersHttp2Headers.PseudoHeaderName.AUTHORITY header or null if there is no such headerauthority 在接口中 Http2Headerspublic java.lang.CharSequence path()
Http2HeadersHttp2Headers.PseudoHeaderName.PATH header or null if there is no such headerpath 在接口中 Http2Headerspublic java.lang.CharSequence status()
Http2HeadersHttp2Headers.PseudoHeaderName.STATUS header or null if there is no such headerstatus 在接口中 Http2Headerspublic boolean contains(java.lang.CharSequence name,
java.lang.CharSequence value,
boolean caseInsensitive)
Http2Headerstrue if a header with the name and value exists, false otherwise.
If caseInsensitive is true then a case insensitive compare is done on the value.
contains 在接口中 Http2Headersname - the name of the header to findvalue - the value of the header to findcaseInsensitive - true then a case insensitive compare is run to compare values.
otherwise a case sensitive compare is run to compare values.public java.lang.String toString()
toString 在类中 java.lang.Object