diff --git a/src/lib/src/main/java/gov/usgs/earthquake/nshmp/netcdf/data/NetcdfData.java b/src/lib/src/main/java/gov/usgs/earthquake/nshmp/netcdf/data/NetcdfData.java index 7037e9c14ac8244250af619ee528dea81b55aa8c..f113edc7ed945a72b03077e27fd789063d181a7c 100644 --- a/src/lib/src/main/java/gov/usgs/earthquake/nshmp/netcdf/data/NetcdfData.java +++ b/src/lib/src/main/java/gov/usgs/earthquake/nshmp/netcdf/data/NetcdfData.java @@ -118,6 +118,16 @@ public class NetcdfData { Builder() {} + public static Builder copyOf(NetcdfData netcdfData) { + return builder() + .imts(netcdfData.imts) + .latitudes(netcdfData.latitudes) + .longitudes(netcdfData.longitudes) + .scienceBaseMetadata(netcdfData.scienceBaseMetadata) + .siteClasses(netcdfData.siteClasses) + .vs30Map(netcdfData.vs30Map); + } + public Builder imts(List<Imt> imts) { this.imts = imts; return this; @@ -162,5 +172,4 @@ public class NetcdfData { checkState(!vs30Map.isEmpty(), "Must add vs30s"); } } - }