Package 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
Modifier and Type
Field
Description
`protected static final String`
`EMPTY_STRING`
EMPTY_STRING.

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`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 Details

### EMPTY_STRING

protected static final String EMPTY_STRING
EMPTY_STRING.

See Also:
  - Constant Field Values

## Constructor Details

### AbstractItemDescriptor

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

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

## Method Details

### 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<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`