defrecord does not support Java class inheritance, so it cannot override methods of Java classes, even abstract classes. However, it does permit you to override methods of java.lang.Object such as hashCode, equals, and toString. Simply include java.lang.Object in the defrecord as if it were an interface. Clojure will generate good value-based implementations of the hashCode and equals methods, so it is rarely necessary to implement them yourself.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
However, if you need the multiple features of records, you would need to have the generated code of defrecord in order to reimplement records with deftype. Is there something available?