# Interface IToc

All Superinterfaces:
  `IHelpResource, IUAElement`

All Known Subinterfaces:
  `IToc2`

public interface IToc extends IUAElement, IHelpResource
An `IToc` represents the root node of a toc, for either a complete toc (book) or a part of one to be assembled into a larger one.

Since:
  2.0

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`TOC`
This is element name used for TOC in XML files.
`static final String`
`TOPIC`
This is the attribute used for description topic in XML files.

### Fields inherited from interface IHelpResource

`HREF, LABEL`

## Method Summary

Modifier and Type
Method
Description
`ITopic`
`getTopic(String href)`
Returns a topic with the specified href defined by this TOC.
`ITopic[]`
`getTopics()`
Obtains the topics directly contained by a toc.

### Methods inherited from interface IHelpResource

`getHref, getLabel`

### Methods inherited from interface IUAElement

`getChildren, isEnabled`

## Field Details

### TOC

static final String TOC
This is element name used for TOC in XML files.

See Also:
  - Constant Field Values

### TOPIC

static final String TOPIC
This is the attribute used for description topic in XML files.

See Also:
  - Constant Field Values

## Method Details

### getTopics

ITopic[] getTopics()
Obtains the topics directly contained by a toc.

Returns:
  Array of ITopic

### getTopic

ITopic getTopic(String href)
Returns a topic with the specified href defined by this TOC.
If the TOC contains multiple topics with the same href only of them (arbitrarily chosen) will be returned.

If no topic is specified, then the TOC description topic is returned, or null if there is no description topic for the TOC.

Parameters:
  `href` - the topic's URL or null
Returns:
  ITopic or null