getCombinationsShared method
Same of getCombinations, but the returned List won't be isolated from the cache (is the actual instance inside the cache).
-
allowSharedCombinations needs to be true, or a StateError will be thrown.
-
Note: any modification in the returned list can corrupt the combination integrity for a future return of this cached combination cache.
Implementation
List<List<E>> getCombinationsShared(
Set<T> alphabet, int minimumSize, int maximumSize) {
if (!allowSharedCombinations) {
throw StateError('Shared combinations not allowed: $this');
}
return _getCombinationsImpl(alphabet, minimumSize, maximumSize);
}