Class ItemRegistry<T>
- java.lang.Object
-
- org.eclipse.emf.compare.rcp.internal.extension.impl.ItemRegistry<T>
-
- Type Parameters:
T
- one of the item class
- All Implemented Interfaces:
IItemRegistry<T>
public class ItemRegistry<T> extends Object implements IItemRegistry<T>
Registry holdingIItemDescriptor
.
-
-
Constructor Summary
Constructors Constructor Description ItemRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IItemDescriptor<T>
add(IItemDescriptor<T> itemDescriptor)
Add an item descriptor to the registry.void
clear()
Clear the registry.IItemDescriptor<T>
getHighestRankingDescriptor()
Get the descriptor with the highest ranking in the registry.IItemDescriptor<T>
getItemDescriptor(String qualifiedClassName)
Return the item descriptor.List<IItemDescriptor<T>>
getItemDescriptors()
Get a list of allIItemDescriptor
from the registry.IItemDescriptor<T>
remove(String className)
Remove anIItemDescriptor
using its key.int
size()
Get the size of the registry.
-
-
-
Method Detail
-
getHighestRankingDescriptor
public IItemDescriptor<T> getHighestRankingDescriptor()
Get the descriptor with the highest ranking in the registry.- Specified by:
getHighestRankingDescriptor
in interfaceIItemRegistry<T>
- Returns:
IItemDescriptor
ornull
if none
-
getItemDescriptors
public List<IItemDescriptor<T>> getItemDescriptors()
Get a list of allIItemDescriptor
from the registry.- Specified by:
getItemDescriptors
in interfaceIItemRegistry<T>
- Returns:
- List of
IItemDescriptor
-
add
public IItemDescriptor<T> add(IItemDescriptor<T> itemDescriptor)
Add an item descriptor to the registry.- Specified by:
add
in interfaceIItemRegistry<T>
- Parameters:
itemDescriptor
- The descriptor to add- Returns:
- The previous
IItemDescriptor
if any.
-
remove
public IItemDescriptor<T> remove(String className)
Remove anIItemDescriptor
using its key.- Specified by:
remove
in interfaceIItemRegistry<T>
- Parameters:
className
- Unique identifier of theIItemDescriptor
- Returns:
- true if an
IItemDescriptor
has been removed
-
clear
public void clear()
Clear the registry.- Specified by:
clear
in interfaceIItemRegistry<T>
-
size
public int size()
Get the size of the registry.- Specified by:
size
in interfaceIItemRegistry<T>
- Returns:
- the size of the registry
-
getItemDescriptor
public IItemDescriptor<T> getItemDescriptor(String qualifiedClassName)
Return the item descriptor.- Specified by:
getItemDescriptor
in interfaceIItemRegistry<T>
- Parameters:
qualifiedClassName
- Id of the descriptor.- Returns:
- Engine descriptor
-
-