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

Method add

classpath/java/util/TreeSet.java:67–74  ·  view source on GitHub ↗
(T value)

Source from the content-addressed store, hash-verified

65 }
66
67 public boolean add(T value) {
68 PersistentSet.Path<Cell<T>> p = set.find(new Cell(value, null));
69 if (p.fresh()) {
70 set = p.add();
71 return true;
72 }
73 return false;
74 }
75
76 T addAndReplace(T value) {
77 PersistentSet.Path<Cell<T>> p = set.find(new Cell(value, null));

Callers 5

ascendingIteratorMethod · 0.95
descendingIteratorMethod · 0.95
mainMethod · 0.95
testTreeSetMethod · 0.95
TreeSetMethod · 0.95

Calls 3

freshMethod · 0.80
findMethod · 0.65
addMethod · 0.65

Tested by 4

ascendingIteratorMethod · 0.76
descendingIteratorMethod · 0.76
mainMethod · 0.76
testTreeSetMethod · 0.76