## net.sf.statcvs.reports
Class LOCSeriesBuilder

    java.lang.Object
      net.sf.statcvs.reports.LOCSeriesBuilder

    public class LOCSeriesBuilder

extends java.lang.Object

Builds a `BasicTimesSeries` for the LOC history of a set of revisions. All revisions that should be counted must be passed to the `addRevision(net.sf.statcvs.model.Revision)` method. When all revisions have been passed to this method, a `BasicTimeSeries` can be obtained from `getTimeSeries()` and can be added to a chart. TODO: Replace by a custom LocTimeSeriesReport

Version:
  $Id: LOCSeriesBuilder.java,v 1.4 2008/04/02 11:22:15 benoitx Exp $
Author:
  Richard Cyganiak

Constructor Summary
`LOCSeriesBuilder(java.lang.String seriesTitle, boolean countEffective)` Creates a new `LOCSeriesBuilder`

Method Summary
`void` `addRevision(Revision revision)` Adds a revision to the time series.
`int` `getMaximum()`
`org.jfree.data.time.TimeSeries` `getTimeSeries()` gets the finished time series.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LOCSeriesBuilder

    public LOCSeriesBuilder(java.lang.String seriesTitle,
                            boolean countEffective)

  Creates a new `LOCSeriesBuilder`

  Parameters:
    `seriesTitle` - the title for the time series
    `countEffective` - If `true`, the effective LOC number will be counted. If `false`, the contributed value of new lines will be counted.

Method Detail

### addRevision

    public void addRevision(Revision revision)

  Adds a revision to the time series. The revision must be at a later date than all previously added revisions.

  Parameters:
    `revision` - the revision to add to the series

### getTimeSeries

    public org.jfree.data.time.TimeSeries getTimeSeries()

  gets the finished time series. Should not be called before all revisions have been added.

  Returns:
    the resulting `BasicTimeSeries` or `null` if no LOC data is available for the revision set

### getMaximum

    public int getMaximum()

  Returns:
    The maximum value over the lifetime of the series