java-code XSSFRow row = sheet.getRow(p);
clojure-code (def row (.getRow sheet p))
How do we make sure that row is of type XSSFRow ?
Clojure is dynamically typed, so the type of a var/value is determined at runtime.
If you want to make sure a value is of a certain class, you could make the following assertion:
(assert (= (class row) XSSFRow))
Or, more concisely (thanks to opqdonut):
(assert (instance? XSSFRow row))
This does not check for exact class, but for any superclass:
(instance? Object row) ;=> true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With