in sdmx30-infomodel/src/main/java/com/epam/jsdmx/infomodel/sdmx30/TextFormatImpl.java [21:44]
public TextFormatImpl(Set<Facet> facets) {
facetToFacetValueMap = new HashMap<>(CollectionUtils.size(facets));
for (Facet f : SetUtils.emptyIfNull(facets)) {
facetToFacetValueMap.put(f.getType(), f.getValue());
if (f.getType() == FacetType.SENTINEL_VALUES) {
sentinelValues = f.getSentinelValues();
}
final FacetValueType newValueType = f.getValueType();
if (newValueType == null) {
continue;
}
if (valueType == null) {
valueType = newValueType;
} else {
if (valueType != newValueType) {
throw new IllegalStateException("Inconsistent text format, multiple value types present: " + valueType + " and " + newValueType);
}
}
}
}