Package com.teamten.typeset
Class IndexEntry
java.lang.Object
com.teamten.typeset.IndexEntry
- All Implemented Interfaces:
Comparable<IndexEntry>
Stores a single index entry, its physical pages, and its sub-entries.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPage
(int physicalPageNumber) Add the specified page number to our set.int
int
Get the category for this index.getIndexParagraph
(Sections sections) Get the full paragraph to display for this entry in the index.Return a sorted list of page numbers for this entry.getText()
Get the text to display in the index.void
mergeWith
(IndexEntry other) Add the information from the other index entry into this one.void
println
(PrintStream stream, String indent) Print the entries to the stream.
-
Constructor Details
-
IndexEntry
-
-
Method Details
-
addPage
public void addPage(int physicalPageNumber) Add the specified page number to our set. -
mergeWith
Add the information from the other index entry into this one. -
getText
Get the text to display in the index. -
getIndexParagraph
Get the full paragraph to display for this entry in the index. -
getCategory
public int getCategory()Get the category for this index. This is based on the first letter of the text, so "Alpha" and "Beta" are in different categories, but "Alpha" and "alpha" are the same. All non-alphanumeric characters are in the same category. Returned values are non-negative. -
getPhysicalPageNumbers
Return a sorted list of page numbers for this entry. -
getSubEntries
-
println
Print the entries to the stream. -
compareTo
- Specified by:
compareTo
in interfaceComparable<IndexEntry>
-