Each instance of the
KwicWord class is a
container for all the indexed lines that contain a specific
word. Here is the class interface.
word argument is a keyword. This
constructor returns a new, empty
KwicWord instance for that keyword.
As passed to the constructor, read-only.
.add(prefix, suffix, userData)
Adds one reference to the instance. The
prefix argument is the contents of the
original line up to the occurrence of the keyword,
with leading and trailing blanks stripped;
suffix is the contents of the original line
starting after the occurrence of the keyword, also
with leading and trailing blanks stripped. The
userData value may be any type.
This method generates all of the references for its
keyword as a sequence of
instances. The entries are in ascending order, with
the suffix as the primary key and the prefix as the
This method is intended for use as a key extractor
function for the skip list used to order the keywords. It