MCPcopy Index your code
hub / github.com/davidgiven/luje / containsValue

Method containsValue

lib/java/util/AbstractMap.java:87–103  ·  view source on GitHub ↗

Returns whether this map contains the specified value. @param value the value to search for. @return true if this map contains the specified value, false otherwise.

(Object value)

Source from the content-addressed store, hash-verified

85 * {@code false} otherwise.
86 */
87 public boolean containsValue(Object value) {
88 Iterator<Map.Entry<K, V>> it = entrySet().iterator();
89 if (value != null) {
90 while (it.hasNext()) {
91 if (value.equals(it.next().getValue())) {
92 return true;
93 }
94 }
95 } else {
96 while (it.hasNext()) {
97 if (it.next().getValue() == null) {
98 return true;
99 }
100 }
101 }
102 return false;
103 }
104
105 /**
106 * Returns a set containing all of the mappings in this map. Each mapping is

Callers 1

containsMethod · 0.95

Calls 6

entrySetMethod · 0.95
iteratorMethod · 0.65
hasNextMethod · 0.65
equalsMethod · 0.65
getValueMethod · 0.65
nextMethod · 0.65

Tested by

no test coverage detected