Dollar sign ($) in symbol name clojure
This is the way to access nested classes in Clojure. In this case, you get access to which is the interface defined inside the interface Entry
Map
In Java you just write java.util.Map.Entry
, in Clojure you need to use the dollar sign:java.util.Map$Entry
From Clojure's Java Interop documentation :
"." a special form is the basis for accessing Java. It can be thought of as a member access operator and / or read as "in scope".
If the first operand is a character that resolves to the class name, access is considered a static member of the named class. Note that nested classes are named
EnclosingClass$NestedClass
, in the JVM specification. Otherwise, it is assumed to be an instance member and the first argument is evaluated to create the target.
source to share