public class MetadataBuilder
extends Object
Metadata
. If there is a key collision, the latter will overwrite the former.
Constructor and Description |
---|
MetadataBuilder() |
Modifier and Type | Method and Description |
---|---|
Metadata |
build()
Builds the
Metadata instance. |
MetadataBuilder |
putBoolean(String key,
boolean value)
Puts a Boolean.
|
MetadataBuilder |
putBooleanArray(String key,
boolean[] value)
Puts a Boolean array.
|
MetadataBuilder |
putDouble(String key,
double value)
Puts a Double.
|
MetadataBuilder |
putDoubleArray(String key,
double[] value)
Puts a Double array.
|
MetadataBuilder |
putLong(String key,
long value)
Puts a Long.
|
MetadataBuilder |
putLongArray(String key,
long[] value)
Puts a Long array.
|
MetadataBuilder |
putMetadata(String key,
Metadata value)
Puts a
Metadata . |
MetadataBuilder |
putMetadataArray(String key,
Metadata[] value)
Puts a
Metadata array. |
MetadataBuilder |
putNull(String key)
Puts a null.
|
MetadataBuilder |
putString(String key,
String value)
Puts a String.
|
MetadataBuilder |
putStringArray(String key,
String[] value)
Puts a String array.
|
MetadataBuilder |
remove(String key) |
MetadataBuilder |
withMetadata(Metadata metadata)
Include the content of an existing
Metadata instance. |
public MetadataBuilder putBoolean(String key, boolean value)
public MetadataBuilder putBooleanArray(String key, boolean[] value)
public MetadataBuilder putDouble(String key, double value)
public MetadataBuilder putDoubleArray(String key, double[] value)
public MetadataBuilder putLong(String key, long value)
public MetadataBuilder putLongArray(String key, long[] value)
public MetadataBuilder putMetadata(String key, Metadata value)
Metadata
.public MetadataBuilder putMetadataArray(String key, Metadata[] value)
Metadata
array.public MetadataBuilder putNull(String key)
public MetadataBuilder putString(String key, String value)
public MetadataBuilder putStringArray(String key, String[] value)
public MetadataBuilder remove(String key)
public MetadataBuilder withMetadata(Metadata metadata)
Metadata
instance.