public final class Metadata
extends java.lang.Object
Metadata objects may contain zero or more Directory
objects. Each directory may contain zero or more tags
with corresponding values.
Modifier and Type | Field and Description |
---|---|
private java.util.List<Directory> |
_directories
The list of
Directory instances in this container, in the order they were added. |
Constructor and Description |
---|
Metadata() |
Modifier and Type | Method and Description |
---|---|
<T extends Directory> |
addDirectory(T directory)
Adds a directory to this metadata collection.
|
boolean |
containsDirectoryOfType(java.lang.Class<? extends Directory> type)
Indicates whether an instance of the given directory type exists in this Metadata instance.
|
java.lang.Iterable<Directory> |
getDirectories()
Returns an iterable set of the
Directory instances contained in this metadata collection. |
<T extends Directory> |
getDirectoriesOfType(java.lang.Class<T> type) |
int |
getDirectoryCount()
Returns the count of directories in this metadata collection.
|
<T extends Directory> |
getFirstDirectoryOfType(java.lang.Class<T> type)
Gets the first
Directory of the specified type contained within this metadata collection. |
boolean |
hasErrors()
Indicates whether any errors were reported during the reading of metadata values.
|
java.lang.String |
toString() |
public java.lang.Iterable<Directory> getDirectories()
Directory
instances contained in this metadata collection.public <T extends Directory> java.util.Collection<T> getDirectoriesOfType(java.lang.Class<T> type)
public int getDirectoryCount()
public <T extends Directory> void addDirectory(T directory)
directory
- the Directory
to add into this metadata collection.public <T extends Directory> T getFirstDirectoryOfType(java.lang.Class<T> type)
Directory
of the specified type contained within this metadata collection.
If no instances of this type are present, null
is returned.T
- the Directory typetype
- the Directory typenull
if none existpublic boolean containsDirectoryOfType(java.lang.Class<? extends Directory> type)
public boolean hasErrors()
Directory
objects.public java.lang.String toString()
toString
in class java.lang.Object