MCPcopy Create free account
hub / github.com/apache/pig / add

Method add

src/org/apache/pig/impl/util/IdentityHashSet.java:28–35  ·  view source on GitHub ↗
(E element)

Source from the content-addressed store, hash-verified

26 IdentityHashMap<E, Object> map = new IdentityHashMap<E, Object>();
27
28 public boolean add(E element) {
29 if (map.containsKey(element)) {
30 return false;
31 } else {
32 map.put(element, null);
33 return true;
34 }
35 }
36
37 public boolean addAll(Collection<? extends E> elements) {
38 boolean anyChanges = false;

Callers 4

getWeightedCountsMethod · 0.95
getEqClassesMethod · 0.95
setLoadDataMapMethod · 0.95

Calls 2

containsKeyMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected