M - the specific type of modelclass ModelInfoHolder<M extends IModel> extends java.lang.Object implements IModelLoader.IModelInfoHolder<M>
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.net.URI,ModelInfo<M>> |
knownURI |
private java.util.List<ModelInfo<M>> |
result |
| Constructor and Description |
|---|
ModelInfoHolder(AvailableModels<M> availableModels)
Creates an instance from the currently available model.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addResult(ModelInfo<M> toAdd)
Adds a model information as result of an operation.
|
void |
error(java.lang.String message)
Notifies about an error.
|
ModelInfo<M> |
getResult(int index)
Returns the the specified result.
|
int |
getResultCount()
Returns the resulting model information instances.
|
boolean |
isKnown(java.net.URI uri,
IModelLoader<M> loader)
Checks whether model information for a given URI is known.
|
ModelInfoHolder(AvailableModels<M> availableModels)
availableModels - the available modelspublic void addResult(ModelInfo<M> toAdd)
IModelLoader.IModelInfoHolderaddResult in interface IModelLoader.IModelInfoHolder<M extends IModel>toAdd - the information object to addpublic boolean isKnown(java.net.URI uri,
IModelLoader<M> loader)
IModelLoader.IModelInfoHolderisKnown in interface IModelLoader.IModelInfoHolder<M extends IModel>uri - the URI to checkloader - update the loader in case of unspecified loadertrue if it is known, false elsepublic int getResultCount()
public ModelInfo<M> getResult(int index)
index - the index of the resultjava.lang.IndexOutOfBoundsException - if
index<0 || index>=getResultCount()public void error(java.lang.String message)
IModelLoader.IModelInfoHoldererror in interface IModelLoader.IModelInfoHolder<M extends IModel>message - the error messageCopyright © 2009 - 2018 SSE. All Rights Reserved.