public class IndexEntry extends Object
getType()
to filter out irrelevant entries.Modifier and Type | Class and Description |
---|---|
static class |
IndexEntry.Type |
Constructor and Description |
---|
IndexEntry(IndexEntry newParent,
String newId)
Constructor.
|
IndexEntry(IndexEntry newParent,
String newId,
IndexEntry.Type type)
Constructor.
|
IndexEntry(String newId)
Constructor for root entry.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
List<IndexEntry> |
getChildEntries()
Returns an unmodifiableList of the child entries.
|
IndexEntry |
getFirstEntry()
Returns the first entry.
|
String |
getId()
Returns the id.
|
IndexEntry |
getLastEntry()
Returns the last entry.
|
IndexEntry |
getNextEntry()
Returns the next entry.
|
IndexEntry |
getParent()
Returns the parent entry.
|
IndexEntry |
getPrevEntry()
Returns the previous entry.
|
IndexEntry |
getRootEntry()
Returns the root entry.
|
String |
getTitle()
Returns the title.
|
IndexEntry.Type |
getType()
Returns the type of this entry.
|
boolean |
hasAnchor()
Returns if the entry's id already has an anchor in the underlying document.
|
int |
hashCode() |
boolean |
hasId()
Returns if the entry has an id.
|
void |
setAnchor(boolean hasAnchor)
Set if the entry's id already has an anchor in the underlying document.
|
void |
setChildEntries(List<IndexEntry> entries)
Sets the child entries or creates a new ArrayList if entries == null.
|
protected void |
setId(String id)
Set the id.
|
void |
setTitle(String newTitle)
Sets the title.
|
String |
toString()
Returns a string representation of the object.
|
String |
toString(int depth)
Returns a string representation of all objects to the given depth.
|
public IndexEntry(String newId)
newId
- The id. May be null.public IndexEntry(IndexEntry newParent, String newId)
newParent
- The parent. May be null.newId
- The id. May be null.public IndexEntry(IndexEntry newParent, String newId, IndexEntry.Type type)
newParent
- The parent. May be null.newId
- The id. May be null.type
- The type. Cannot be null.public IndexEntry getParent()
public boolean hasId()
true
if the entry has a valid id, otherwise it can be considered invalid/empty.public IndexEntry.Type getType()
IndexingSink
.public void setAnchor(boolean hasAnchor)
hasAnchor
- true
if the id already has an anchor.public boolean hasAnchor()
true
if the id already has an anchor otherwise false
.public List<IndexEntry> getChildEntries()
public void setChildEntries(List<IndexEntry> entries)
entries
- the entries.public IndexEntry getNextEntry()
public IndexEntry getPrevEntry()
public IndexEntry getFirstEntry()
public IndexEntry getLastEntry()
public IndexEntry getRootEntry()
public String toString(int depth)
depth
- The depth to descent to.Copyright © 2005–2024 The Apache Software Foundation. All rights reserved.