public abstract class Metadata extends Object implements Iterable<MetadataProperty>
Represents base abstraction for metadata.
Modifier | Constructor and Description |
---|---|
protected |
Metadata(int metadataType)
Initializes a new instance of the
Metadata class. |
Modifier and Type | Method and Description |
---|---|
static Metadata |
getByType(Metadata[] array,
int type)
Gets metadata by its type from a metadata array.
|
String[] |
getKeys()
Gets an array of the metadata keys.
|
int |
getMetadataType()
Gets the metadata type.
|
Iterator<MetadataProperty> |
iterator()
Returns an enumerator that iterates through the collection.
|
MetadataProperty |
readByStringKey(String key) |
protected Metadata(int metadataType)
Initializes a new instance of the Metadata
class.
metadataType
- The metadata type.public final int getMetadataType()
Gets the metadata type.
public String[] getKeys()
Gets an array of the metadata keys.
public static Metadata getByType(Metadata[] array, int type)
Gets metadata by its type from a metadata array.
array
- An array of Metadata
.type
- The metadata type.Metadata
if a metadata package of the provided type is present in the array
; otherwise null.ArgumentNullException
- The metadata array could not be null.public Iterator<MetadataProperty> iterator()
Returns an enumerator that iterates through the collection.
iterator
in interface Iterable<MetadataProperty>
public MetadataProperty readByStringKey(String key)
Copyright © 2019. All rights reserved.