docs: public void setCardinality(double cardinality)
      {
          if (cardinality < 0 || Double.isNaN(cardinality))
              throw new IllegalArgumentException("Cardinality must be a positive integer or infinity, not " + cardinality);
          this.cardinality = Math.ceil(cardinality);
          fixCache();
      }