Package eu.bandm.tools.message
Class Spectrum
java.lang.Object
eu.bandm.tools.message.Spectrum
A sequence of ascending non-overlapping, non-adjacent locations,
maintained seperately for each document id.
Points and Regions can be added. They will be merged as far as
possible.
NB: The class has no length information about the lines of the target documents, so one region ending at "(docX, line n, column 1000)" and the other starting at "(docX, line n+1, 0)" cannot be merged.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add locations and merge them with others, if appropriate.void
add
(Collection<Location<?>> locs) Add locations and merge them with others, if appropriate.void
dump
(PrintStream p) Print a debugging output of all locations.Returns the set of all document ids occuring.getLocations
(Object docId) Returns the list of all locations in the given document.
-
Field Details
-
byDocId
-
-
Constructor Details
-
Spectrum
public Spectrum()
-
-
Method Details
-
getDocIds
Returns the set of all document ids occuring. -
getLocations
Returns the list of all locations in the given document. Is sorted ascending. -
add
Add locations and merge them with others, if appropriate. -
add
Add locations and merge them with others, if appropriate. -
dump
Print a debugging output of all locations.
-