MCPcopy Create free account
hub / github.com/ReadyTalk/avian / removeCell

Method removeCell

classpath/java/util/TreeSet.java:98–113  ·  view source on GitHub ↗
(Object value)

Source from the content-addressed store, hash-verified

96 }
97
98 private Cell<T> removeCell(Object value) {
99 PersistentSet.Path<Cell<T>> p = set.find(new Cell(value, null));
100 if (p.fresh()) {
101 return null;
102 } else {
103 Cell<T> old = p.value();
104
105 if (p.value().next != null) {
106 set = p.replaceWith(p.value().next);
107 } else {
108 set = p.remove();
109 }
110
111 return old;
112 }
113 }
114
115 public boolean remove(Object value) {
116 return removeCell(value) != null;

Callers 2

removeAndReturnMethod · 0.95
removeMethod · 0.95

Calls 5

freshMethod · 0.80
findMethod · 0.65
removeMethod · 0.65
valueMethod · 0.45
replaceWithMethod · 0.45

Tested by

no test coverage detected