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

Method find

src/jvm/clojure/lang/RT.java:876–891  ·  view source on GitHub ↗
(Object coll, Object key)

Source from the content-addressed store, hash-verified

874}
875
876static public Object find(Object coll, Object key){
877 if(coll == null)
878 return null;
879 else if(coll instanceof Associative)
880 return ((Associative) coll).entryAt(key);
881 else if(coll instanceof Map) {
882 Map m = (Map) coll;
883 if(m.containsKey(key))
884 return MapEntry.create(key, m.get(key));
885 return null;
886 }
887 else if(coll instanceof ITransientAssociative2) {
888 return ((ITransientAssociative2) coll).entryAt(key);
889 }
890 throw new IllegalArgumentException("find not supported on type: " + coll.getClass().getName());
891}
892
893//takes a seq of key,val,key,val
894

Callers

nothing calls this directly

Calls 5

createMethod · 0.95
entryAtMethod · 0.65
containsKeyMethod · 0.65
getMethod · 0.65
getNameMethod · 0.65

Tested by

no test coverage detected