org.eclipse.eef.ide.api.extensions.impl

## Class ItemRegistry<T>

- java.lang.Object
- - org.eclipse.eef.ide.api.extensions.impl.ItemRegistry<T>

Type Parameters:
  `T` - The type of the object described

All Implemented Interfaces:
  IItemRegistry<T>

    public class ItemRegistry<T>
    extends java.lang.Object
    implements IItemRegistry<T>

The implementation of the `IItemRegistry`.

### Constructor Summary

Constructors
Constructor and Description
`ItemRegistry()`

### Method Summary

All Methods Instance Methods Concrete Methods
`IItemDescriptor<T>` `add(IItemDescriptor<T> descriptor)` Adds the given `IItemDescriptor` to the registry.
`void` `clear()` Clears the registry.
`IItemDescriptor<T>` `getItemDescriptor(java.lang.String id)` Returns the `IItemDescriptor` with the given identifier.
`java.util.List<IItemDescriptor<T>>` `getItemDescriptors()` Returns all the `IItemDescriptor` of the registry.
`IItemDescriptor<T>` `remove(java.lang.String id)` Removes the `IItemDescriptor` with the given identifier.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ItemRegistry

    public ItemRegistry()

### Method Detail

#### getItemDescriptors

    public java.util.List<IItemDescriptor<T>> getItemDescriptors()

Returns all the `IItemDescriptor` of the registry.

Specified by:
  `getItemDescriptors` in interface `IItemRegistry<T>`
Returns:
  The list of all the `IItemDescriptor` of the registry
See Also:
  `IItemRegistry.getItemDescriptors()`

#### getItemDescriptor

    public IItemDescriptor<T> getItemDescriptor(java.lang.String id)

Returns the `IItemDescriptor` with the given identifier.

Specified by:
  `getItemDescriptor` in interface `IItemRegistry<T>`
Parameters:
  `id` - The identifier
Returns:
  The `IItemDescriptor` with the given identifier or null if none could be found
See Also:
  `IItemRegistry.getItemDescriptor(java.lang.String)`

#### add

    public IItemDescriptor<T> add(IItemDescriptor<T> descriptor)

Adds the given `IItemDescriptor` to the registry.

Specified by:
  `add` in interface `IItemRegistry<T>`
Parameters:
  `descriptor` - The descriptior
Returns:
  The previous `IItemDescriptor` with the same identifier, or null if no registered `IItemDescriptor` had the same identifier
See Also:
  `IItemRegistry.add(org.eclipse.eef.ide.api.extensions.IItemDescriptor)`

#### remove

    public IItemDescriptor<T> remove(java.lang.String id)

Removes the `IItemDescriptor` with the given identifier.

Specified by:
  `remove` in interface `IItemRegistry<T>`
Parameters:
  `id` - The identifier
Returns:
  The `IItemDescriptor` removed or null if no registered `IItemDescriptor` had an identifier matching the given one
See Also:
  `IItemRegistry.remove(java.lang.String)`

#### clear

    public void clear()

Clears the registry.

Specified by:
  `clear` in interface `IItemRegistry<T>`
See Also:
  `IItemRegistry.clear()`