package jxl.read.biff;

import common.Assert;

public class DataValidation {
  private DataValidityListRecord validityList;
  
  private DataValiditySettingsRecord[] validitySettings;
  
  private int pos;
  
  DataValidation(DataValidityListRecord dvlr) {
    this.validityList = dvlr;
    this.validitySettings = new DataValiditySettingsRecord[this.validityList.getNumberOfSettings()];
    this.pos = 0;
  }
  
  void add(DataValiditySettingsRecord dvsr) {
    Assert.verify((this.pos < this.validitySettings.length));
    this.validitySettings[this.pos] = dvsr;
    this.pos++;
  }
  
  public DataValidityListRecord getDataValidityList() {
    return this.validityList;
  }
  
  public DataValiditySettingsRecord[] getDataValiditySettings() {
    return this.validitySettings;
  }
}
