I'm trying to call https://bitbucket.org/snakeyaml/snakeyaml/src/180363cfff5c9334bdd21b0d38145fa56ceed91c/src/main/java/org/yaml/snakeyaml/events/Event.java#lines-54:56
with (. (. event getStartMark) getLine)
and getting No matching field found: getLine for class java.util.Optional
any idea why?
getStartMark should return a Mark instance
and getLine should return an int
https://bitbucket.org/snakeyaml/snakeyaml/src/180363cfff5c9334bdd21b0d38145fa56ceed91c/src/main/java/org/yaml/snakeyaml/error/Mark.java#lines-121:123
I want the int line number
hmm https://stackoverflow.com/questions/60989912/dealing-with-java-optionalt-in-clojure
maybe this will help https://github.com/fr33m0nk/optional
I don't yet see where things are defined optional
an optional has the .orElse method to get the value out, or a default value if the optional doesn't have a value
the way to do this in clojure would probably be:
(some-> (.getStartMark event) (.orElse nil) (.getLine))nice!