/*
* SPDX-FileCopyrightText: 2021-2023 The Refinery Authors
*
* SPDX-License-Identifier: EPL-2.0
*/
package tools.refinery.store.query.viatra.internal.pquery;
import tools.refinery.viatra.runtime.matchers.psystem.IValueProvider;
import tools.refinery.store.query.term.DataVariable;
import tools.refinery.store.query.valuation.Valuation;
public record ValueProviderBasedValuation(IValueProvider valueProvider) implements Valuation {
@Override
public T getValue(DataVariable variable) {
@SuppressWarnings("unchecked")
var value = (T) valueProvider.getValue(variable.getUniqueName());
return value;
}
}