Headers.HeaderTransform
Constructor and Description |
---|
ConnectHeaders() |
ConnectHeaders(java.lang.Iterable<Header> original) |
Modifier and Type | Method and Description |
---|---|
Headers |
add(Header header)
Add the given
Header to this collection. |
Headers |
add(java.lang.String key,
java.lang.Object value,
Schema schema)
Add to this collection a
Header with the given key and value. |
Headers |
add(java.lang.String key,
SchemaAndValue schemaAndValue)
Add to this collection a
Header with the given key and value. |
Headers |
addBoolean(java.lang.String key,
boolean value)
Add to this collection a
Header with the given key and value. |
Headers |
addByte(java.lang.String key,
byte value)
Add to this collection a
Header with the given key and value. |
Headers |
addBytes(java.lang.String key,
byte[] value)
Add to this collection a
Header with the given key and value. |
Headers |
addDate(java.lang.String key,
java.util.Date value)
|
Headers |
addDecimal(java.lang.String key,
java.math.BigDecimal value)
|
Headers |
addDouble(java.lang.String key,
double value)
Add to this collection a
Header with the given key and value. |
Headers |
addFloat(java.lang.String key,
float value)
Add to this collection a
Header with the given key and value. |
Headers |
addInt(java.lang.String key,
int value)
Add to this collection a
Header with the given key and value. |
Headers |
addList(java.lang.String key,
java.util.List<?> value,
Schema schema)
Add to this collection a
Header with the given key and value. |
Headers |
addLong(java.lang.String key,
long value)
Add to this collection a
Header with the given key and value. |
Headers |
addMap(java.lang.String key,
java.util.Map<?,?> value,
Schema schema)
Add to this collection a
Header with the given key and value. |
Headers |
addShort(java.lang.String key,
short value)
Add to this collection a
Header with the given key and value. |
Headers |
addString(java.lang.String key,
java.lang.String value)
Add to this collection a
Header with the given key and value. |
Headers |
addStruct(java.lang.String key,
Struct value)
Add to this collection a
Header with the given key and value. |
Headers |
addTime(java.lang.String key,
java.util.Date value)
|
Headers |
addTimestamp(java.lang.String key,
java.util.Date value)
|
protected Headers |
addWithoutValidating(java.lang.String key,
java.lang.Object value,
Schema schema) |
java.util.Iterator<Header> |
allWithName(java.lang.String key)
|
Headers |
apply(Headers.HeaderTransform transform)
Get all
Header s, apply the transform to each and store the result in place of the original. |
Headers |
apply(java.lang.String key,
Headers.HeaderTransform transform)
Get all
Header s with the given key, apply the transform to each and store the result in place of the original. |
Headers |
clear()
Removes all headers from this object.
|
ConnectHeaders |
duplicate()
Create a copy of this
Headers object. |
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
boolean |
isEmpty()
Determine whether this object has no headers.
|
java.util.Iterator<Header> |
iterator() |
Header |
lastWithName(java.lang.String key)
Return the last
Header with the specified key. |
Headers |
remove(java.lang.String key)
|
Headers |
retainLatest()
Removes all but the last object with each key.
|
Headers |
retainLatest(java.lang.String key)
|
int |
size()
Get the number of headers in this object.
|
java.lang.String |
toString() |
public ConnectHeaders()
public ConnectHeaders(java.lang.Iterable<Header> original)
public int size()
Headers
public boolean isEmpty()
Headers
public Headers clear()
Headers
public Headers add(Header header)
Headers
Header
to this collection.protected Headers addWithoutValidating(java.lang.String key, java.lang.Object value, Schema schema)
public Headers add(java.lang.String key, SchemaAndValue schemaAndValue)
Headers
Header
with the given key and value.add
in interface Headers
key
- the header's key; may not be nullschemaAndValue
- the SchemaAndValue
for the header; may be nullpublic Headers add(java.lang.String key, java.lang.Object value, Schema schema)
Headers
Header
with the given key and value.public Headers addString(java.lang.String key, java.lang.String value)
Headers
Header
with the given key and value.public Headers addBytes(java.lang.String key, byte[] value)
Headers
Header
with the given key and value.public Headers addBoolean(java.lang.String key, boolean value)
Headers
Header
with the given key and value.addBoolean
in interface Headers
key
- the header's key; may not be nullvalue
- the header's value; may be nullpublic Headers addByte(java.lang.String key, byte value)
Headers
Header
with the given key and value.public Headers addShort(java.lang.String key, short value)
Headers
Header
with the given key and value.public Headers addInt(java.lang.String key, int value)
Headers
Header
with the given key and value.public Headers addLong(java.lang.String key, long value)
Headers
Header
with the given key and value.public Headers addFloat(java.lang.String key, float value)
Headers
Header
with the given key and value.public Headers addDouble(java.lang.String key, double value)
Headers
Header
with the given key and value.public Headers addList(java.lang.String key, java.util.List<?> value, Schema schema)
Headers
Header
with the given key and value.public Headers addMap(java.lang.String key, java.util.Map<?,?> value, Schema schema)
Headers
Header
with the given key and value.public Headers addStruct(java.lang.String key, Struct value)
Headers
Header
with the given key and value.public Headers addDecimal(java.lang.String key, java.math.BigDecimal value)
Headers
addDecimal
in interface Headers
key
- the header's key; may not be nullvalue
- the header's Decimal
value; may be nullpublic Headers addDate(java.lang.String key, java.util.Date value)
Headers
public Headers addTime(java.lang.String key, java.util.Date value)
Headers
public Headers addTimestamp(java.lang.String key, java.util.Date value)
Headers
addTimestamp
in interface Headers
key
- the header's key; may not be nullvalue
- the header's Timestamp
value; may be nullpublic Header lastWithName(java.lang.String key)
Headers
Header
with the specified key.lastWithName
in interface Headers
key
- the key for the header; may not be nullpublic java.util.Iterator<Header> allWithName(java.lang.String key)
Headers
allWithName
in interface Headers
key
- the key; may not be nullpublic java.util.Iterator<Header> iterator()
iterator
in interface java.lang.Iterable<Header>
public Headers retainLatest()
Headers
retainLatest
in interface Headers
public Headers retainLatest(java.lang.String key)
Headers
retainLatest
in interface Headers
key
- the key; may not be nullpublic Headers apply(java.lang.String key, Headers.HeaderTransform transform)
Headers
Header
s with the given key, apply the transform to each and store the result in place of the original.public Headers apply(Headers.HeaderTransform transform)
Headers
Header
s, apply the transform to each and store the result in place of the original.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object