MCPcopy Index your code
hub / github.com/clojure/clojure / assocEx

Method assocEx

src/jvm/clojure/lang/PersistentTreeMap.java:116–124  ·  view source on GitHub ↗
(Object key, Object val)

Source from the content-addressed store, hash-verified

114}
115
116public PersistentTreeMap assocEx(Object key, Object val) {
117 Box found = new Box(null);
118 Node t = add(tree, key, val, found);
119 if(t == null) //null == already contains key
120 {
121 throw Util.runtimeException("Key already present");
122 }
123 return new PersistentTreeMap(comp, t.blacken(), _count + 1, meta());
124}
125
126public PersistentTreeMap assoc(Object key, Object val){
127 Box found = new Box(null);

Callers

nothing calls this directly

Calls 4

addMethod · 0.95
runtimeExceptionMethod · 0.95
blackenMethod · 0.95
metaMethod · 0.95

Tested by

no test coverage detected