Package org.eclipse.emf.compare.rcp.internal.extension

## Interface IItemRegistry<T>

Type Parameters:
  `T` - An Item.

All Known Implementing Classes:
  `ItemRegistry`

    public interface IItemRegistry<T>

Item registry.

### Method Summary

All Methods Instance Methods Abstract Methods
`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 id)` Return the item descriptor.
`List<IItemDescriptor<T>>` `getItemDescriptors()` Get a list of all `IItemDescriptor` from the registry.
`IItemDescriptor<T>` `remove​(String id)` Remove an `IItemDescriptor` using its key.
`int` `size()` Get the size of the registry.

### Method Detail

#### getItemDescriptors

    List<IItemDescriptor<T>> getItemDescriptors()

Get a list of all `IItemDescriptor` from the registry.

Returns:
  List of `IItemDescriptor`

#### getHighestRankingDescriptor

    IItemDescriptor<T> getHighestRankingDescriptor()

Get the descriptor with the highest ranking in the registry.

Returns:
  `IItemDescriptor` or `null` if none

#### getItemDescriptor

    IItemDescriptor<T> getItemDescriptor​(String id)

Return the item descriptor.

Parameters:
  `id` - Id of the descriptor.
Returns:
  Engine descriptor

#### add

    IItemDescriptor<T> add​(IItemDescriptor<T> itemDescriptor)

Add an item descriptor to the registry.

Parameters:
  `itemDescriptor` - The descriptor to add
Returns:
  The previous `IItemDescriptor` if any.

#### remove

    IItemDescriptor<T> remove​(String id)

Remove an `IItemDescriptor` using its key.

Parameters:
  `id` - Unique identifier of the `IItemDescriptor`
Returns:
  true if an `IItemDescriptor` has been removed

#### clear

    void clear()

Clear the registry.

#### size

    int size()

Get the size of the registry.

Returns:
  the size of the registry