Package org.jacoco.report.internal.html.index

## Class ElementIndex

- java.lang.Object
- - org.jacoco.report.internal.html.index.ElementIndex

All Implemented Interfaces:
  `IIndexUpdate`

    public class ElementIndex
    extends java.lang.Object
    implements IIndexUpdate

An index over all report pages that allows queries according to certain criteria.

### Constructor Summary

Constructors
`ElementIndex​(ReportOutputFolder baseFolder)` Creates a new empty index for a HTML report.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addClass​(ILinkable link, long classid)` Adds a class to the index.
`java.lang.String` `getLinkToClass​(long classid)` Returns the link to the class with the given identifier if a corresponding page exists.

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

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

### Constructor Detail

#### ElementIndex

    public ElementIndex​(ReportOutputFolder baseFolder)

Creates a new empty index for a HTML report.

Parameters:
  `baseFolder` - base folder where all links are calculated relative to

### Method Detail

#### getLinkToClass

    public java.lang.String getLinkToClass​(long classid)

Returns the link to the class with the given identifier if a corresponding page exists.

Parameters:
  `classid` - class identifier
Returns:
  Link or null

#### addClass

    public void addClass​(ILinkable link,
                         long classid)

Description copied from interface: `IIndexUpdate`
Adds a class to the index.

Specified by:
  `addClass` in interface `IIndexUpdate`
Parameters:
  `link` - link to the class
  `classid` - identifier of the class