Class AbstractMockFetcher<T>
- java.lang.Object
-
- psidev.psi.mi.jami.bridges.fetcher.mock.AbstractMockFetcher<T>
-
- All Implemented Interfaces:
MockFetcher<T>
- Direct Known Subclasses:
AbstractFailingFetcher
,MockBioactiveEntityFetcher
,MockCvTermFetcher
,MockGeneFetcher
,MockOrganismFetcher
,MockProteinFetcher
,MockPublicationFetcher
public abstract class AbstractMockFetcher<T> extends Object implements MockFetcher<T>
A general mock fetcher which can be used to quickly make new mocks with predictable behaviour.- Since:
- 07/08/13
- Author:
- Gabriel Aldam (galdam@ebi.ac.uk)
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractMockFetcher()
Constructor for AbstractMockFetcher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEntry(String identifier, T entry)
addEntry.void
clearEntries()
clearEntries.protected T
getEntry(String identifier)
getEntry.void
removeEntry(String identifier)
Removes an entry from the
-
-
-
Method Detail
-
addEntry
public void addEntry(String identifier, T entry)
addEntry.
- Specified by:
addEntry
in interfaceMockFetcher<T>
- Parameters:
identifier
- aString
object.entry
- a T object.
-
removeEntry
public void removeEntry(String identifier)
Removes an entry from the- Specified by:
removeEntry
in interfaceMockFetcher<T>
- Parameters:
identifier
- Identifier for the entry to be removed.
-
clearEntries
public void clearEntries()
clearEntries.
- Specified by:
clearEntries
in interfaceMockFetcher<T>
-
getEntry
protected T getEntry(String identifier) throws BridgeFailedException
getEntry.
- Parameters:
identifier
- aString
object.- Returns:
- a T object.
- Throws:
BridgeFailedException
- if any.
-
-