public SimpleSetSegmentPredicate(SimpleSetPredicate predicate) { this.setType = predicate.getArray().getType(); this.operator = predicate.getBooleanOperator(); this.baseFieldName = predicate.getField(); this.setValuesString = predicate.getArray().getContent(); this.valueCount = predicate.getArray().getN(); this.valuesList = getValueObjects(); if (this.valueCount != null && this.valueCount.intValue() != this.valuesList.size()) { throw new IllegalStateException("PMML-SimpleSetPredicate: Number of values found (" +valuesList.size()+") does not equal number of values declared (" +this.valueCount+")"); } if (this.operator == null || (!this.operator.equals("isIn") && !this.operator.equals("isNotIn"))) { throw new IllegalStateException("PMML-SimpleSetPredicate: booleanOperator was not one of the allowed values (\"isIn\" or \"isNotIn\")"); } }