MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / remove

Method remove

ij/src/main/java/ij/astro/types/MultiMap.java:52–62  ·  view source on GitHub ↗

Removes a specific value associated with the specified key. If the value is removed and no more values remain for the key, the key is also removed. @param key the key whose value is to be removed @param value the value to remove @return true if the value was removed, false otherwi

(K key, V value)

Source from the content-addressed store, hash-verified

50 * @return {@code true} if the value was removed, {@code false} otherwise
51 */
52 public boolean remove(K key, V value) {
53 List<V> values = map.get(key);
54 if (values != null) {
55 boolean removed = values.remove(value);
56 if (values.isEmpty()) {
57 map.remove(key); // Clean up the key if no values remain
58 }
59 return removed;
60 }
61 return false;
62 }
63
64 /**
65 * Removes all values associated with the specified key.

Callers 5

removeAllMethod · 0.45
checkAndExecuteTimersMethod · 0.45
setOptionMethod · 0.45
modifySpinnerMethod · 0.45
removeAssociationMethod · 0.45

Calls 2

getMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected