Package org.eclipse.handly.ui.typehierarchy

# Class TypeHierarchyViewPart.HistoryEntry

java.lang.Object
org.eclipse.handly.ui.typehierarchy.TypeHierarchyViewPart.HistoryEntry

Enclosing class:
  TypeHierarchyViewPart

protected abstract static class TypeHierarchyViewPart.HistoryEntry extends Object
Represents an entry of the type hierarchy view history list.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `HistoryEntry(Object[] inputElements)`
  Constructs a history entry for the given input elements.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `protected abstract String`
  `getElementLabel(Object element)`
  Returns a user-readable text label for the given element.
  `org.eclipse.jface.resource.ImageDescriptor`
  `getImageDescriptor()`
  Returns an image descriptor for this history entry.
  `final Object[]`
  `getInputElements()`
  Returns the input elements for this history entry.
  `String`
  `getLabel()`
  Returns a user-readable text label for this history entry.
  `int`
  `hashCode()`

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

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### HistoryEntry

    protected HistoryEntry(Object[] inputElements)
    Constructs a history entry for the given input elements. Clients must not modify the given array afterwards.
    Parameters:
      `inputElements` - never `null`; never empty

- ## Method Details

  - ### getInputElements

    public final Object[] getInputElements()
    Returns the input elements for this history entry.
    Returns:
      the input elements (never `null`; never empty). Clients must not modify the returned array.

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### getLabel

    public String getLabel()
    Returns a user-readable text label for this history entry.

    Default implementation composes a label based on labels for input elements. It invokes `getElementLabel(Object)` to obtain a label for an input element.

    Returns:
      the text label of the history entry (never `null`)

  - ### getElementLabel

    protected abstract String getElementLabel(Object element)
    Returns a user-readable text label for the given element.
    Parameters:
      `element` - the given element
    Returns:
      the text label of the element (never `null`)

  - ### getImageDescriptor

    public org.eclipse.jface.resource.ImageDescriptor getImageDescriptor()
    Returns an image descriptor for this history entry.

    Default implementation always returns `null`.

    Returns:
      the image descriptor of the history entry (may be `null`)