Package org.apache.maven.doxia.index
Class IndexEntry
- java.lang.Object
-
- org.apache.maven.doxia.index.IndexEntry
-
public class IndexEntry extends Object
IndexEntry class.
- Author:
- Trygve Laugstøl
-
-
Constructor Summary
Constructors Constructor Description IndexEntry(String newId)Constructor.IndexEntry(IndexEntry newParent, String newId)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<IndexEntry>getChildEntries()Returns an unmodifiableList of the child entries.IndexEntrygetFirstEntry()Returns the first entry.StringgetId()Returns the id.IndexEntrygetLastEntry()Returns the last entry.IndexEntrygetNextEntry()Returns the next entry.IndexEntrygetParent()Returns the parent entry.IndexEntrygetPrevEntry()Returns the previous entry.IndexEntrygetRootEntry()Returns the root entry.StringgetTitle()Returns the title.voidsetChildEntries(List<IndexEntry> entries)Sets the child entries or creates a new ArrayList if entries == null.protected voidsetId(String id)Set the id.voidsetTitle(String newTitle)Sets the title.StringtoString()Returns a string representation of the object.StringtoString(int depth)Returns a string representation of all objects to the given depth.
-
-
-
Constructor Detail
-
IndexEntry
public IndexEntry(String newId)
Constructor.- Parameters:
newId- The id. May be null.
-
IndexEntry
public IndexEntry(IndexEntry newParent, String newId)
Constructor.- Parameters:
newParent- The parent. May be null.newId- The id. May be null.
-
-
Method Detail
-
getParent
public IndexEntry getParent()
Returns the parent entry.- Returns:
- the parent entry.
-
getId
public String getId()
Returns the id.- Returns:
- the id.
-
setId
protected void setId(String id)
Set the id.- Parameters:
id- the id- Since:
- 1.1.2
-
getTitle
public String getTitle()
Returns the title.- Returns:
- the title.
-
setTitle
public void setTitle(String newTitle)
Sets the title.- Parameters:
newTitle- the title.
-
getChildEntries
public List<IndexEntry> getChildEntries()
Returns an unmodifiableList of the child entries.- Returns:
- child entries.
-
setChildEntries
public void setChildEntries(List<IndexEntry> entries)
Sets the child entries or creates a new ArrayList if entries == null.- Parameters:
entries- the entries.
-
getNextEntry
public IndexEntry getNextEntry()
Returns the next entry.- Returns:
- the next entry, or null if there is none.
-
getPrevEntry
public IndexEntry getPrevEntry()
Returns the previous entry.- Returns:
- the previous entry, or null if there is none.
-
getFirstEntry
public IndexEntry getFirstEntry()
Returns the first entry.- Returns:
- the first entry, or null if there is none.
-
getLastEntry
public IndexEntry getLastEntry()
Returns the last entry.- Returns:
- the last entry, or null if there is none.
-
getRootEntry
public IndexEntry getRootEntry()
Returns the root entry.- Returns:
- the root entry, or null if there is none.
-
toString
public String toString()
Returns a string representation of the object.
-
toString
public String toString(int depth)
Returns a string representation of all objects to the given depth.- Parameters:
depth- The depth to descent to.- Returns:
- A string.
-
-