public class Metadata
extends Object
implements scala.Serializable
The default constructor is private. User should use either MetadataBuilder
or
Metadata.fromJson()
to create Metadata instances.
param: map an immutable map that stores the data
Modifier and Type | Method and Description |
---|---|
boolean |
contains(String key)
Tests whether this Metadata contains a binding for a key.
|
static Metadata |
empty()
Returns an empty Metadata.
|
boolean |
equals(Object obj) |
static Metadata |
fromJson(String json)
Creates a Metadata instance from JSON.
|
boolean |
getBoolean(String key)
Gets a Boolean.
|
boolean[] |
getBooleanArray(String key)
Gets a Boolean array.
|
double |
getDouble(String key)
Gets a Double.
|
double[] |
getDoubleArray(String key)
Gets a Double array.
|
long |
getLong(String key)
Gets a Long.
|
long[] |
getLongArray(String key)
Gets a Long array.
|
Metadata |
getMetadata(String key)
Gets a Metadata.
|
Metadata[] |
getMetadataArray(String key)
Gets a Metadata array.
|
String |
getString(String key)
Gets a String.
|
String[] |
getStringArray(String key)
Gets a String array.
|
int |
hashCode() |
String |
json()
Converts to its JSON representation.
|
String |
toString() |
public static Metadata empty()
public static Metadata fromJson(String json)
public boolean contains(String key)
public long getLong(String key)
public double getDouble(String key)
public boolean getBoolean(String key)
public String getString(String key)
public Metadata getMetadata(String key)
public long[] getLongArray(String key)
public double[] getDoubleArray(String key)
public boolean[] getBooleanArray(String key)
public String[] getStringArray(String key)
public Metadata[] getMetadataArray(String key)
public String json()
public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object