package com.sri.ai.util.graph2d.core.values;

import static com.sri.ai.util.Util.join;

import java.util.Collection;
import java.util.Iterator;

import com.sri.ai.util.graph2d.api.variables.SetOfValues;
import com.sri.ai.util.graph2d.api.variables.Value;

public class DefaultSetOfValues implements SetOfValues {
	
	private Collection<Value> collection;
	
	public DefaultSetOfValues(Collection<Value> collection) {
		this.collection = collection;
	}
	
	@Override
	public Iterator<Value> iterator() {
		return collection.iterator();
	}

	
	@Override
	public String toString() {
		return "SetOfEnumValues(" + join(collection)+ ")";
	}

}

@@ -247,16 +247,58 @@
 s.Value;
+%0Aimport org.apache.commons.lang3.Validate;
 %0A%0Apublic
@@ -470,16 +470,34 @@
 ction = 
+Validate.notEmpty(
 collecti
@@ -498,16 +498,17 @@
 llection
+)
 ;%0A%09%7D%0A%09%0A%09

add validation