public final class Metadata
extends java.lang.Object
Constructor and Description |
---|
Metadata() |
Modifier and Type | Method and Description |
---|---|
boolean |
containsDirectory(java.lang.Class<? extends Directory> type)
Indicates whether a given directory type has been created in this metadata
repository.
|
java.lang.Iterable<Directory> |
getDirectories()
Returns an objects for iterating over Directory objects in the order in which they were added.
|
<T extends Directory> |
getDirectory(java.lang.Class<T> type)
If this
Metadata object contains a Directory of the specified type, it is returned. |
int |
getDirectoryCount()
Returns a count of unique directories in this metadata collection.
|
<T extends Directory> |
getOrCreateDirectory(java.lang.Class<T> type)
Returns a
Directory of specified type. |
boolean |
hasErrors()
Indicates whether any errors were reported during the reading of metadata values.
|
public java.lang.Iterable<Directory> getDirectories()
public int getDirectoryCount()
public <T extends Directory> T getOrCreateDirectory(java.lang.Class<T> type)
Directory
of specified type. If this Metadata
object already contains
such a directory, it is returned. Otherwise a new instance of this directory will be created and stored within
this Metadata object.type
- the type of the Directory implementation required.public <T extends Directory> T getDirectory(java.lang.Class<T> type)
Metadata
object contains a Directory
of the specified type, it is returned.
Otherwise null
is returned.T
- the Directory typetype
- the Directory typenull
.public boolean containsDirectory(java.lang.Class<? extends Directory> type)
getOrCreateDirectory(Class)
.type
- the Directory typepublic boolean hasErrors()
Copyright © 2002-2013 Drew Noakes. All Rights Reserved.