public DefaultIntervalCategoryDataset(Comparable[] seriesKeys,Comparable[] categoryKeys,Number[][] starts,Number[][] ends){
  this.startData=starts;
  this.endData=ends;
  if (starts != null && ends != null) {
    String baseName="org.jfree.data.resources.DataPackageResources";
    ResourceBundle resources=ResourceBundleWrapper.getBundle(baseName);
    int seriesCount=starts.length;
    if (seriesCount != ends.length) {
      String errMsg="DefaultIntervalCategoryDataset: the number " + "of series in the start value dataset does " + "not match the number of series in the end "+ "value dataset.";
      throw new IllegalArgumentException(errMsg);
    }
    if (seriesCount > 0) {
      if (seriesKeys != null) {
        if (seriesKeys.length != seriesCount) {
          throw new IllegalArgumentException("The number of series keys does not " + "match the number of series in the data.");
        }
        this.seriesKeys=seriesKeys;
      }
 else {
        String prefix=resources.getString("series.default-prefix") + " ";
        this.seriesKeys=generateKeys(seriesCount,prefix);
      }
      int categoryCount=starts[0].length;
      if (categoryCount != ends[0].length) {
        String errMsg="DefaultIntervalCategoryDataset: the " + "number of categories in the start value " + "dataset does not match the number of "+ "categories in the end value dataset.";
        throw new IllegalArgumentException(errMsg);
      }
      if (categoryKeys != null) {
        if (categoryKeys.length != categoryCount) {
          throw new IllegalArgumentException("The number of category keys does not match " + "the number of categories in the data.");
        }
        this.categoryKeys=categoryKeys;
      }
 else {
        String prefix=resources.getString("categories.default-prefix") + " ";
        this.categoryKeys=generateKeys(categoryCount,prefix);
      }
    }
 else {
      this.seriesKeys=new Comparable[0];
      this.categoryKeys=new Comparable[0];
    }
  }
}

public DefaultIntervalCategoryDataset ( Comparable [ ] seriesKeys , Comparable [ ] categoryKeys , Number [ ] [ ] starts , Number [ ] [ ] ends ) { this . startData = starts ; this . endData = ends ; if ( starts != null && ends != null ) { String baseName = "org.jfree.data.resources.DataPackageResources" ; ResourceBundle resources = ResourceBundleWrapper . getBundle ( baseName ) ; int seriesCount = starts . length ; if ( seriesCount != ends . length ) { String errMsg = "DefaultIntervalCategoryDataset: the number " + "of series in the start value dataset does " + "not match the number of series in the end " + "value dataset." ; throw new IllegalArgumentException ( errMsg ) ; } if ( seriesCount > 0 ) { if ( seriesKeys != null ) { if ( seriesKeys . length != seriesCount ) { throw new IllegalArgumentException ( "The number of series keys does not " + "match the number of series in the data." ) ; } this . seriesKeys = seriesKeys ; } else { String prefix = resources . getString ( "series.default-prefix" ) + " " ; this . seriesKeys = generateKeys ( seriesCount , prefix ) ; } int categoryCount = starts [ 0 ] . length ; if ( categoryCount != ends [ 0 ] . length ) { String errMsg = "DefaultIntervalCategoryDataset: the " + "number of categories in the start value " + "dataset does not match the number of " + "categories in the end value dataset." ; throw new IllegalArgumentException ( errMsg ) ; } if ( categoryKeys != null ) { if ( categoryKeys . length != categoryCount ) { throw new IllegalArgumentException ( "The number of category keys does not match " + "the number of categories in the data." ) ; } this . categoryKeys = categoryKeys ; } else { String prefix = resources . getString ( "categories.default-prefix" ) + " " ; this . categoryKeys = generateKeys ( categoryCount , prefix ) ; } } else { this . seriesKeys = new Comparable [ 0 ] ; this . categoryKeys = new Comparable [ 0 ] ; } } }
constructs a defaultintervalcategorydataset , populates it with data from the arrays , and uses the supplied names for the series and the supplied objects for the categories .
