chore: Bump version to 1.6.14 and add setValues method to AgentContext for improved context management
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
<artifactId>lm-lib</artifactId>
|
<artifactId>lm-lib</artifactId>
|
||||||
<groupId>de.extio</groupId>
|
<groupId>de.extio</groupId>
|
||||||
<name>lm-lib</name>
|
<name>lm-lib</name>
|
||||||
<version>1.6.13</version>
|
<version>1.6.14</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>21</java.version>
|
<java.version>21</java.version>
|
||||||
|
|||||||
@@ -124,6 +124,15 @@ public final class AgentContext {
|
|||||||
this.context.put(key, List.of(value));
|
this.context.put(key, List.of(value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public <T> void setValues(final String key, final Collection<T> values) {
|
||||||
|
if (values == null) {
|
||||||
|
this.context.remove(key);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.context.put(key, List.copyOf(values));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Map<String, List<? extends Object>> getContext() {
|
public Map<String, List<? extends Object>> getContext() {
|
||||||
return this.context;
|
return this.context;
|
||||||
|
|||||||
Reference in New Issue
Block a user