(Object coll, Object key)
| 874 | } |
| 875 | |
| 876 | static 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 |
nothing calls this directly
no test coverage detected