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 StringEMPTY_STRINGEMPTY_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 intcompareTo(IItemDescriptor<T> o)StringgetDescription()The description of the item.StringgetID()Get a unique key identifying this item.static <T> com.google.common.base.Function<IItemDescriptor<T>,T>getItemFunction()get aFunctionto transform a descriptor into a item.StringgetLabel()The label of the item.intgetRank()Rank of the item.StringtoString()-
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:
getLabelin interfaceIItemDescriptor<T>- Returns:
- label of the item
-
getDescription
public String getDescription()
The description of the item.- Specified by:
getDescriptionin interfaceIItemDescriptor<T>- Returns:
- description of the item
-
getRank
public int getRank()
Rank of the item.- Specified by:
getRankin interfaceIItemDescriptor<T>- Returns:
- rank
-
getID
public String getID()
Get a unique key identifying this item.- Specified by:
getIDin interfaceIItemDescriptor<T>- Returns:
- a key
-
compareTo
public int compareTo(IItemDescriptor<T> o)
- Specified by:
compareToin interfaceComparable<T>
-
getItemFunction
public static <T> com.google.common.base.Function<IItemDescriptor<T>,T> getItemFunction()
get aFunctionto transform a descriptor into a item.- Type Parameters:
T- A item type- Returns:
- A item
-
-