Skip to content

Instantly share code, notes, and snippets.

@nathanmarz
Created October 19, 2011 23:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathanmarz/1300034 to your computer and use it in GitHub Desktop.
Save nathanmarz/1300034 to your computer and use it in GitHub Desktop.
class JavaObjectThatReturnsInt {
int getValue();
}
(let [amap {1 (.getValue obj)}]
(JavaObjectThatExpectsInt. amap))
class JavaObjectThatExpectsInt {
public JavaObjectThatExpectsInt(Map<Integer, Integer> vals) {
for(Integer key: vals.keySet()) {
int val = vals.get(key); // classcast exception!
// ...
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment