diff --git a/plugins/io.sarl.lang.core/src/io/sarl/lang/scoping/batch/SARLMapExtensions.java b/plugins/io.sarl.lang.core/src/io/sarl/lang/scoping/batch/SARLMapExtensions.java index e4d8ef1018..5e775470d3 100644 --- a/plugins/io.sarl.lang.core/src/io/sarl/lang/scoping/batch/SARLMapExtensions.java +++ b/plugins/io.sarl.lang.core/src/io/sarl/lang/scoping/batch/SARLMapExtensions.java @@ -71,7 +71,7 @@ private SARLMapExtensions() { * if the key was not present in the map before the addition. * @since 2.8 */ - @Inline(value = "$1.put($2.getKey(), $2.getValue())", statementExpression=true) + @Inline(value = "$1.put($2.getKey(), $2.getValue())", statementExpression = true) public static V operator_add(Map map, Pair entry) { return map.put(entry.getKey(), entry.getValue()); } @@ -97,7 +97,7 @@ public static Map operator_add(Map outputMap, Map Map operator_add(Map outputMap, Mapbuilder().putAll(left).put(right.getKey(), right.getValue()).build())", - imported=ImmutableMap.class) + imported = ImmutableMap.class) public static Map operator_plus(Map left, Pair right) { - return ImmutableMap.builder().putAll(left).put(right.getKey(), right.getValue()).build(); + return ImmutableMap.builder().putAll(left).put(right.getKey(), right.getValue()).build(); } /** Merge the given maps. @@ -129,9 +129,9 @@ public static Map operator_plus(Map left, Pairbuilder().putAll(left).putAll(right).build())", imported=ImmutableMap.class) + @Inline(value = "(ImmutableMap.builder().putAll(left).putAll(right).build())", imported = ImmutableMap.class) public static Map operator_plus(Map left, Map right) { - return ImmutableMap.builder().putAll(left).putAll(right).build(); + return ImmutableMap.builder().putAll(left).putAll(right).build(); } /** Remove a key from the given map. @@ -144,7 +144,7 @@ public static Map operator_plus(Map left, Map V operator_remove(Map map, K key) { return map.remove(key); } @@ -193,7 +193,7 @@ public static Map operator_remove(Map map, Iterable - type of the map keys. * @param - type of the map values. * @param map - the map to update. @@ -210,7 +210,7 @@ public boolean apply(K input) { } }); } - + /** Replies the elements of the left map without the pairs in the right map. * * The difference is an immutable @@ -229,7 +229,7 @@ public boolean apply(K input) { * @since 2.8 */ @Pure - @Inline(value = "(Maps.difference($1, $2).entriesOnlyOnLeft())", imported=Maps.class) + @Inline(value = "(Maps.difference($1, $2).entriesOnlyOnLeft())", imported = Maps.class) public static Map operator_minus(Map left, Map right) { return Maps.difference(left, right).entriesOnlyOnLeft(); } @@ -256,16 +256,18 @@ public boolean apply(K input) { } }); } - + /** Replies the value associated to the given key in the map. * + * @param - type of the map keys. + * @param - type of the map values. * @param map - the map to consider. * @param key - the key of the value. * @return the value associated to the key, or null if * the key was not found. */ @Pure - @Inline(value="($1.get($2))") + @Inline(value = "($1.get($2))") public static V operator_mappedTo(Map map, K key) { return map.get(key); }