public DataSetValidator result() {
            // -- check all fields are set.
            if (validator.name == null) throw new RuntimeException("The validator name has not been set!");
            if (validator.expectedSize == null) throw new RuntimeException("The expected number of tuples has not been set!");
            if (validator.validationMode == null) throw new RuntimeException("The validator validation mode has not been set!");
            if (validator.tupleValidators.isEmpty() && !validator.getValidationMode().equals(ValidationMode.SizeOnly)) throw new RuntimeException("The validator has no tuple validators!");

            return validator;
        }