Interface IItemRegistry<T>
- Type Parameters:
T- An Item.
- All Known Implementing Classes:
ItemRegistry
public interface IItemRegistry<T>
Item registry.
-
Method Summary
Modifier and Type Method Description IItemDescriptor<T>add(IItemDescriptor<T> itemDescriptor)Add an item descriptor to the registry.voidclear()Clear the registry.IItemDescriptor<T>getHighestRankingDescriptor()Get the descriptor with the highest ranking in the registry.IItemDescriptor<T>getItemDescriptor(java.lang.String id)Return the item descriptor.java.util.List<IItemDescriptor<T>>getItemDescriptors()Get a list of allIItemDescriptorfrom the registry.IItemDescriptor<T>remove(java.lang.String id)Remove anIItemDescriptorusing its key.intsize()Get the size of the registry.
-
Method Details
-
getItemDescriptors
java.util.List<IItemDescriptor<T>> getItemDescriptors()Get a list of allIItemDescriptorfrom the registry.- Returns:
- List of
IItemDescriptor
-
getHighestRankingDescriptor
IItemDescriptor<T> getHighestRankingDescriptor()Get the descriptor with the highest ranking in the registry.- Returns:
IItemDescriptorornullif none
-
getItemDescriptor
Return the item descriptor.- Parameters:
id- Id of the descriptor.- Returns:
- Engine descriptor
-
add
Add an item descriptor to the registry.- Parameters:
itemDescriptor- The descriptor to add- Returns:
- The previous
IItemDescriptorif any.
-
remove
Remove anIItemDescriptorusing its key.- Parameters:
id- Unique identifier of theIItemDescriptor- Returns:
- true if an
IItemDescriptorhas been removed
-
clear
void clear()Clear the registry. -
size
int size()Get the size of the registry.- Returns:
- the size of the registry
-