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

## Class AbstractItemDescriptor<T>

- java.lang.Object
- - org.eclipse.emf.compare.rcp.internal.extension.impl.AbstractItemDescriptor<T>

Type Parameters:
  `T` - item type

All Implemented Interfaces:
  Comparable<IItemDescriptor<T>>, IItemDescriptor<T>

Direct Known Subclasses:
  DifferenceGroupDescriptorWrapper, LazyItemDescriptor, WrapperItemDescriptor

    public abstract class AbstractItemDescriptor<T>
    extends Object
    implements IItemDescriptor<T>

Abstract class for an `IItemDescriptor`.

### Field Summary

Fields
`protected static String` `EMPTY_STRING` EMPTY_STRING.

### Constructor Summary

Constructors
Constructor and Description
`AbstractItemDescriptor(String label, String description, int rank, String id)` Constructor.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`int` `compareTo(IItemDescriptor<T> o)`
`String` `getDescription()` The description of the item.
`String` `getID()` Get a unique key identifying this item.
`static <T> com.google.common.base.Function<IItemDescriptor<T>,T>` `getItemFunction()` get a `Function` to transform a descriptor into a item.
`String` `getLabel()` The label of the item.
`int` `getRank()` Rank of the item.
`String` `toString()`

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

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

### Methods inherited from interface org.eclipse.emf.compare.rcp.internal.extension.IItemDescriptor

`getItem`

### Field Detail

#### EMPTY_STRING

    protected static final String EMPTY_STRING

EMPTY_STRING.

See Also:
  Constant Field Values

### Constructor Detail

#### AbstractItemDescriptor

    public AbstractItemDescriptor(String label,
                                  String description,
                                  int rank,
                                  String id)

Constructor.

Parameters:
  `label` - `label`
  `description` - `description`
  `rank` - `rank`
  `id` - `id`

### Method Detail

#### getLabel

    public String getLabel()

The label of the item.

Specified by:
  `getLabel` in interface `IItemDescriptor<T>`
Returns:
  label of the item

#### getDescription

    public String getDescription()

The description of the item.

Specified by:
  `getDescription` in interface `IItemDescriptor<T>`
Returns:
  description of the item

#### getRank

    public int getRank()

Rank of the item.

Specified by:
  `getRank` in interface `IItemDescriptor<T>`
Returns:
  rank

#### getID

    public String getID()

Get a unique key identifying this item.

Specified by:
  `getID` in interface `IItemDescriptor<T>`
Returns:
  a key

#### compareTo

    public int compareTo(IItemDescriptor<T> o)

Specified by:
  `compareTo` in interface `Comparable<IItemDescriptor<T>>`

#### getItemFunction

    public static <T> com.google.common.base.Function<IItemDescriptor<T>,T> getItemFunction()

get a `Function` to transform a descriptor into a item.

Type Parameters:
  `T` - A item type
Returns:
  A item

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`