Package org.apache.maven.doxia.document
Class DocumentTOC
- java.lang.Object
-
- org.apache.maven.doxia.document.DocumentTOC
-
- All Implemented Interfaces:
java.io.Serializable
public class DocumentTOC extends java.lang.Object implements java.io.SerializableA Table Of Content for the document.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private intdepthThe level up to which toc items are included by default.private java.util.List<DocumentTOCItem>itemsField items.private java.lang.StringnameThe name to use for the Table of Contents.
-
Constructor Summary
Constructors Constructor Description DocumentTOC()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddItem(DocumentTOCItem documentTOCItem)Method addItem.booleanequals(java.lang.Object other)Method equals.intgetDepth()Get the level up to which toc items are included by default.java.util.List<DocumentTOCItem>getItems()Method getItems.java.lang.StringgetName()Get the name to use for the Table of Contents.inthashCode()Method hashCode.voidremoveItem(DocumentTOCItem documentTOCItem)Method removeItem.voidsetDepth(int depth)Set the level up to which toc items are included by default.voidsetItems(java.util.List<DocumentTOCItem> items)Set tOC item.voidsetName(java.lang.String name)Set the name to use for the Table of Contents.java.lang.StringtoString()Method toString.
-
-
-
Field Detail
-
name
private java.lang.String name
The name to use for the Table of Contents.
-
depth
private int depth
The level up to which toc items are included by default. Defaults to 0 which means only top-level element entries are included. A depth of 1 includes one level of sub-items (sub-sections), etc. This may be overridden for individual entries by using the collapse attribute of the corresponding toc item.
-
items
private java.util.List<DocumentTOCItem> items
Field items.
-
-
Method Detail
-
addItem
public void addItem(DocumentTOCItem documentTOCItem)
Method addItem.- Parameters:
documentTOCItem-
-
equals
public boolean equals(java.lang.Object other)
Method equals.- Overrides:
equalsin classjava.lang.Object- Parameters:
other-- Returns:
- boolean
-
getDepth
public int getDepth()
Get the level up to which toc items are included by default. Defaults to 0 which means only top-level element entries are included. A depth of 1 includes one level of sub-items (sub-sections), etc. This may be overridden for individual entries by using the collapse attribute of the corresponding toc item.- Returns:
- int
-
getItems
public java.util.List<DocumentTOCItem> getItems()
Method getItems.- Returns:
- List
-
getName
public java.lang.String getName()
Get the name to use for the Table of Contents.- Returns:
- String
-
hashCode
public int hashCode()
Method hashCode.- Overrides:
hashCodein classjava.lang.Object- Returns:
- int
-
removeItem
public void removeItem(DocumentTOCItem documentTOCItem)
Method removeItem.- Parameters:
documentTOCItem-
-
setDepth
public void setDepth(int depth)
Set the level up to which toc items are included by default. Defaults to 0 which means only top-level element entries are included. A depth of 1 includes one level of sub-items (sub-sections), etc. This may be overridden for individual entries by using the collapse attribute of the corresponding toc item.- Parameters:
depth-
-
setItems
public void setItems(java.util.List<DocumentTOCItem> items)
Set tOC item.- Parameters:
items-
-
setName
public void setName(java.lang.String name)
Set the name to use for the Table of Contents.- Parameters:
name-
-
toString
public java.lang.String toString()
Method toString.- Overrides:
toStringin classjava.lang.Object- Returns:
- String
-
-