Skip to content
Snippets Groups Projects
Commit c05e81b2 authored by Powers, Peter M.'s avatar Powers, Peter M.
Browse files

exposed data types in builder

parent b00dff18
No related branches found
No related tags found
1 merge request!242Set datatypes in config
......@@ -802,9 +802,10 @@ public final class CalcConfig {
private Output(Builder b) {
this.directory = b.directory;
b.dataTypes.add(DataType.TOTAL);
b.dataTypes.add(DataType.MAP);
this.dataTypes = Collections.unmodifiableSet(b.dataTypes);
Set<DataType> dataTypes = EnumSet.copyOf(b.dataTypes);
dataTypes.add(DataType.TOTAL);
dataTypes.add(DataType.MAP);
this.dataTypes = Collections.unmodifiableSet(dataTypes);
this.returnPeriods = List.copyOf(b.returnPeriods);
}
......@@ -1028,6 +1029,16 @@ public final class CalcConfig {
return this;
}
/**
* Set the data types for which results should be calculated.
*
* @see gov.usgs.earthquake.nshmp.calc.CalcConfig.Hazard#imts
*/
public Builder dataTypes(Set<DataType> dataTypes) {
this.output.dataTypes = checkNotNull(dataTypes);
return this;
}
/**
* Set the timespan for earthquake probabilities. Calling this method also
* sets {@link Rate#valueFormat} to {@link ValueFormat#POISSON_PROBABILITY}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment