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

Method forEach

src/main/java/pascal/taie/analysis/dataflow/fact/MapFact.java:130–144  ·  view source on GitHub ↗

Performs the given action for each entry(key-value mapping) in this fact until all entries have been processed or the action throws an exception. @param action the action to be performed for each entry.

(BiConsumer<K, V> action)

Source from the content-addressed store, hash-verified

128 * @param action the action to be performed for each entry.
129 */
130 public void forEach(BiConsumer<K, V> action) {
131 Objects.requireNonNull(action);
132 entries().forEach(entry -> {
133 K k;
134 V v;
135 try {
136 k = entry.getKey();
137 v = entry.getValue();
138 } catch (IllegalStateException ise) {
139 // this usually means the entry is no longer in the map.
140 throw new ConcurrentModificationException(ise);
141 }
142 action.accept(k, v);
143 });
144 }
145
146 @Override
147 public boolean equals(Object o) {

Callers

nothing calls this directly

Calls 5

entriesMethod · 0.95
forEachMethod · 0.65
acceptMethod · 0.65
getKeyMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected