MCPcopy Create free account
hub / github.com/LFYSec/MScan / add

Method add

src/main/java/pascal/taie/util/graph/DotAttributes.java:95–105  ·  view source on GitHub ↗

@return a new DotAttributes with attributed in given input added.

(String... input)

Source from the content-addressed store, hash-verified

93 * @return a new {@link DotAttributes} with attributed in given input added.
94 */
95 public DotAttributes add(String... input) {
96 if ((input.length & 1) != 0) { // implicit nullcheck of input
97 throw new IllegalArgumentException("input.length should be even");
98 }
99 MultiMap<String, String> newAttrs = Maps.newMultiMap();
100 newAttrs.putAll(attrs);
101 for (int i = 0; i < input.length; i += 2) {
102 newAttrs.put(input[i], input[i + 1]);
103 }
104 return new DotAttributes(newAttrs);
105 }
106
107 /**
108 * @return a {@link DotAttributes} containing attributes specified by input.

Callers 1

edgeAttributerMethod · 0.95

Calls 3

newMultiMapMethod · 0.95
putAllMethod · 0.65
putMethod · 0.65

Tested by

no test coverage detected