public DynamicTimeSeriesCollection(int nSeries,int nMoments,RegularTimePeriod timeSample,TimeZone zone){
  this.maximumItemCount=nMoments;
  this.historyCount=nMoments;
  this.seriesKeys=new Comparable[nSeries];
  for (int i=0; i < nSeries; i++) {
    this.seriesKeys[i]="";
  }
  this.newestAt=nMoments - 1;
  this.valueHistory=new ValueSequence[nSeries];
  this.timePeriodClass=timeSample.getClass();
  if (this.timePeriodClass == Millisecond.class) {
    this.pointsInTime=new Millisecond[nMoments];
  }
 else   if (this.timePeriodClass == Second.class) {
    this.pointsInTime=new Second[nMoments];
  }
 else   if (this.timePeriodClass == Minute.class) {
    this.pointsInTime=new Minute[nMoments];
  }
 else   if (this.timePeriodClass == Hour.class) {
    this.pointsInTime=new Hour[nMoments];
  }
  this.workingCalendar=Calendar.getInstance(zone);
  this.position=START;
  this.domainIsPointsInTime=true;
}

public DynamicTimeSeriesCollection ( int nSeries , int nMoments , RegularTimePeriod timeSample , TimeZone zone ) { this . maximumItemCount = nMoments ; this . historyCount = nMoments ; this . seriesKeys = new Comparable [ nSeries ] ; for ( int i = 0 ; i < nSeries ; i ++ ) { this . seriesKeys [ i ] = "" ; } this . newestAt = nMoments - 1 ; this . valueHistory = new ValueSequence [ nSeries ] ; this . timePeriodClass = timeSample . getClass ( ) ; if ( this . timePeriodClass == Millisecond . class ) { this . pointsInTime = new Millisecond [ nMoments ] ; } else if ( this . timePeriodClass == Second . class ) { this . pointsInTime = new Second [ nMoments ] ; } else if ( this . timePeriodClass == Minute . class ) { this . pointsInTime = new Minute [ nMoments ] ; } else if ( this . timePeriodClass == Hour . class ) { this . pointsInTime = new Hour [ nMoments ] ; } this . workingCalendar = Calendar . getInstance ( zone ) ; this . position = START ; this . domainIsPointsInTime = true ; }
creates a new dataset .
