[armedbear-cvs] r13910 - trunk/abcl/contrib/jss
mevenson at common-lisp.net
mevenson at common-lisp.net
Wed Apr 11 15:14:30 UTC 2012
Author: mevenson
Date: Wed Apr 11 08:14:28 2012
New Revision: 13910
Log:
jss: add docstring for the rather useful HASHMAP-TO-HASHTABLE.
Modified:
trunk/abcl/contrib/jss/invoke.lisp
Modified: trunk/abcl/contrib/jss/invoke.lisp
==============================================================================
--- trunk/abcl/contrib/jss/invoke.lisp Tue Apr 10 08:00:46 2012 (r13909)
+++ trunk/abcl/contrib/jss/invoke.lisp Wed Apr 11 08:14:28 2012 (r13910)
@@ -561,7 +561,15 @@
(defun hashmap-to-hashtable (hashmap &rest rest &key (keyfun #'identity) (valfun #'identity) (invert? nil)
table
- &allow-other-keys )
+ &allow-other-keys )
+ "Converts the a HASHMAP reference to a java.util.HashMap object to a Lisp hashtable.
+
+The REST paramter specifies arguments to the underlying MAKE-HASH-TABLE call.
+
+KEYFUN and VALFUN specifies functions to be run on the keys and values
+of the HASHMAP right before they are placed in the hashtable.
+
+If INVERT? is non-nil than reverse the keys and values in the resulting hashtable."
(let ((keyset (#"keySet" hashmap))
(table (or table (apply 'make-hash-table
(loop for (key value) on rest by #'cddr
More information about the armedbear-cvs
mailing list