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 Details

  • 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