code: public void setBounds(int minOccurs, int maxOccurs) {
      if (minOccurs < 0 || maxOccurs < -1)
        throw new IllegalArgumentException("Bounds cannot be negative");
      else if (maxOccurs > 0 && minOccurs > maxOccurs)
        throw new IllegalArgumentException("Minimum bounds less than maximum bounds");
      limits = new int[] { minOccurs, maxOccurs };
    }
docs: Set the bounds (default is {0, unbounded}).  Use maxOccurs=-1 to indicate
  "unbounded."