Headers.HeaderTransform
Constructor and Description |
---|
ConnectHeaders() |
ConnectHeaders(Iterable<Header> original) |
Modifier and Type | Method and Description |
---|---|
Headers |
add(Header header)
Add the given
Header to this collection. |
Headers |
add(String key,
Object value,
Schema schema)
Add to this collection a
Header with the given key and value. |
Headers |
add(String key,
SchemaAndValue schemaAndValue)
Add to this collection a
Header with the given key and value. |
Headers |
addBoolean(String key,
boolean value)
Add to this collection a
Header with the given key and value. |
Headers |
addByte(String key,
byte value)
Add to this collection a
Header with the given key and value. |
Headers |
addBytes(String key,
byte[] value)
Add to this collection a
Header with the given key and value. |
Headers |
addDate(String key,
Date value)
|
Headers |
addDecimal(String key,
BigDecimal value)
|
Headers |
addDouble(String key,
double value)
Add to this collection a
Header with the given key and value. |
Headers |
addFloat(String key,
float value)
Add to this collection a
Header with the given key and value. |
Headers |
addInt(String key,
int value)
Add to this collection a
Header with the given key and value. |
Headers |
addList(String key,
List<?> value,
Schema schema)
Add to this collection a
Header with the given key and value. |
Headers |
addLong(String key,
long value)
Add to this collection a
Header with the given key and value. |
Headers |
addMap(String key,
Map<?,?> value,
Schema schema)
Add to this collection a
Header with the given key and value. |
Headers |
addShort(String key,
short value)
Add to this collection a
Header with the given key and value. |
Headers |
addString(String key,
String value)
Add to this collection a
Header with the given key and value. |
Headers |
addStruct(String key,
Struct value)
Add to this collection a
Header with the given key and value. |
Headers |
addTime(String key,
Date value)
|
Headers |
addTimestamp(String key,
Date value)
|
protected Headers |
addWithoutValidating(String key,
Object value,
Schema schema) |
Iterator<Header> |
allWithName(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(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(Object obj) |
int |
hashCode() |
boolean |
isEmpty()
Determine whether this object has no headers.
|
Iterator<Header> |
iterator() |
Header |
lastWithName(String key)
Return the last
Header with the specified key. |
Headers |
remove(String key)
|
Headers |
retainLatest()
Removes all but the last
Header object with each key. |
Headers |
retainLatest(String key)
|
int |
size()
Get the number of headers in this object.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
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(String key, Object value, Schema schema)
public Headers add(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(String key, Object value, Schema schema)
Headers
Header
with the given key and value.public Headers addString(String key, String value)
Headers
Header
with the given key and value.public Headers addBytes(String key, byte[] value)
Headers
Header
with the given key and value.public Headers addBoolean(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(String key, byte value)
Headers
Header
with the given key and value.public Headers addShort(String key, short value)
Headers
Header
with the given key and value.public Headers addInt(String key, int value)
Headers
Header
with the given key and value.public Headers addLong(String key, long value)
Headers
Header
with the given key and value.public Headers addFloat(String key, float value)
Headers
Header
with the given key and value.public Headers addDouble(String key, double value)
Headers
Header
with the given key and value.public Headers addList(String key, List<?> value, Schema schema)
Headers
Header
with the given key and value.public Headers addMap(String key, Map<?,?> value, Schema schema)
Headers
Header
with the given key and value.public Headers addStruct(String key, Struct value)
Headers
Header
with the given key and value.public Headers addDecimal(String key, 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 addTimestamp(String key, 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(String key)
Headers
Header
with the specified key.lastWithName
in interface Headers
key
- the key for the header; may not be nullpublic Iterator<Header> allWithName(String key)
Headers
allWithName
in interface Headers
key
- the key; may not be nullpublic Headers retainLatest()
Headers
Header
object with each key.retainLatest
in interface Headers
public Headers retainLatest(String key)
Headers
retainLatest
in interface Headers
key
- the key; may not be nullpublic Headers apply(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.