Commits

Meikel Brandmeyer committed 35d2502

Switch from interface to protocol for ILazyMap

  • Participants
  • Parent commits bae6857
  • Branches new

Comments (0)

Files changed (1)

File src/main/clojure/de/kotka/lazymap.clj

     (let [v (this 1)]
       (delay v))))
 
-(gen-interface
-  :name    de.kotka.lazymap.ILazyMap
-  :extends [clojure.lang.IPersistentMap]
-  :methods [[lazyAssoc [Object Object] de.kotka.lazymap.ILazyMap]])
-
-(import
-  'de.kotka.lazymap.ILazyMap)
+(defprotocol ILazyPersistentMap
+  "ILazyPersistentMap extends IPersistentMap with a method to allow
+  transportation of the underlying delay objects."
+  (delay-assoc [lazy-map key delay] "Associates the given delay in the map."))
 
 (deftype LazyMapEntry [k v]
   ILazyMapEntry