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 anIItemDescriptor
.
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
EMPTY_STRING
EMPTY_STRING.
-
Constructor Summary
Constructors Constructor Description AbstractItemDescriptor(String label, String description, int rank, String id)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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 aFunction
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
-
-
Method Detail
-
getLabel
public String getLabel()
The label of the item.- Specified by:
getLabel
in interfaceIItemDescriptor<T>
- Returns:
- label of the item
-
getDescription
public String getDescription()
The description of the item.- Specified by:
getDescription
in interfaceIItemDescriptor<T>
- Returns:
- description of the item
-
getRank
public int getRank()
Rank of the item.- Specified by:
getRank
in interfaceIItemDescriptor<T>
- Returns:
- rank
-
getID
public String getID()
Get a unique key identifying this item.- Specified by:
getID
in interfaceIItemDescriptor<T>
- Returns:
- a key
-
compareTo
public int compareTo(IItemDescriptor<T> o)
- Specified by:
compareTo
in interfaceComparable<T>
-
getItemFunction
public static <T> com.google.common.base.Function<IItemDescriptor<T>,T> getItemFunction()
get aFunction
to transform a descriptor into a item.- Type Parameters:
T
- A item type- Returns:
- A item
-
-