Evaluates x and tests if it is an instance of the class
c. Returns true or false
user=> (def al (new java.util.ArrayList)) #'user/al user=> (instance? java.util.Collection al) true user=> (instance? java.util.RandomAccess al) true user=> (instance? java.lang.String al) false user=>
(def
^{:arglists '([^Class c x])
:doc "Evaluates x and tests if it is an instance of the class
c. Returns true or false"
:added "1.0"}
instance? (fn instance? [^Class c x] (. c (isInstance x))))
Comments top
No comments for instance?. Log in to add a comment.