Class ConfigurableLineTracker

All Implemented Interfaces:
ILineTracker, ILineTrackerExtension

public class ConfigurableLineTracker extends AbstractLineTracker
Standard implementation of a generic ILineTracker.

The line tracker can be configured with the set of legal line delimiters. Line delimiters are unconstrained. The line delimiters are used to compute the tracker's line structure. In the case of overlapping line delimiters, the longest line delimiter is given precedence of the shorter ones.

This class is not intended to be subclassed.

This class is not intended to be subclassed by clients.
  • Constructor Details

    • ConfigurableLineTracker

      public ConfigurableLineTracker(String[] legalLineDelimiters)
      Creates a standard line tracker for the given line delimiters.
      legalLineDelimiters - the tracker's legal line delimiters, may not be null and must be longer than 0
  • Method Details

    • getLegalLineDelimiters

      public String[] getLegalLineDelimiters()
      Description copied from interface: ILineTracker
      Returns the strings this tracker considers as legal line delimiters.
      the legal line delimiters
    • nextDelimiterInfo

      protected AbstractLineTracker.DelimiterInfo nextDelimiterInfo(String text, int offset)
      Description copied from class: AbstractLineTracker
      Returns the information about the first delimiter found in the given text starting at the given offset.
      Specified by:
      nextDelimiterInfo in class AbstractLineTracker
      text - the text to be searched
      offset - the offset in the given text
      the information of the first found delimiter or null