* (C) Copyright 2013 DataGenerator Contributors.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
private static final ConcurrentMap<DataSpec, List<DataSet>> dataSetCache = new MapMaker().makeMap();
// only recompute the datasets if they aren't in the cache
// return defensive copy of the cached dataset
// The idea here is to take all of the variable specs, enumerate the positive values for each,
// take the cartesian product of these sets, and then build a dataset for each set in the result
// each element in this combo corresponds directly to an elemnt in variableSpecs
// so we advance two iterators through both lists, creating a variable and setting it's value