From 39f5f0e5fb8382c41fc09d6b11803622ed36055f Mon Sep 17 00:00:00 2001 From: Alan O'Callaghan Date: Wed, 8 Jan 2025 17:27:04 +0000 Subject: [PATCH] Don't putAll --- .../qupath/ext/instanseg/core/InstanSeg.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/main/java/qupath/ext/instanseg/core/InstanSeg.java b/src/main/java/qupath/ext/instanseg/core/InstanSeg.java index 106f1d2..b418876 100644 --- a/src/main/java/qupath/ext/instanseg/core/InstanSeg.java +++ b/src/main/java/qupath/ext/instanseg/core/InstanSeg.java @@ -396,7 +396,7 @@ public static final class Builder { private Collection channels; private InstanSegModel model; private Class preferredOutputClass; - private final Map optionalArgs = new HashMap<>(); + private Map optionalArgs; Builder() {} @@ -663,21 +663,11 @@ public Builder outputAnnotations() { * @param optionalArgs The argument names and values. * @return A modified builder. */ - public Builder args(Map optionalArgs) { - this.optionalArgs.putAll(optionalArgs); + public Builder args(Map optionalArgs) { + this.optionalArgs = (optionalArgs); return this; } - /** - * Set a number of optional arguments - * @param name The argument name. - * @param value The argument value. - * @return A modified builder. - */ - public Builder arg(String name, Object value) { - optionalArgs.put(name, value); - return this; - } /** * Request to make measurements from the objects created by InstanSeg.