You can see the example here:
It would be lucky for me if they use Java's Map type, because there is a Fantom Map type to map with it. The problem is they used their own Map type:
I have no idea how to translate this:
public void startup(Display display, Map<String, String> properties)
to Fantom code.
Any attempts of mine always resulted in type mismatch error.
The simple answer is you don't. Java generics are erased, so when working with Java code thru the Java FFI you just work with them as unparameterized classes. For example:
map := HashMap()
Also look at the Interop class which provides utils to map b/w Fantom lists/maps and Java ones:
Login or Signup to reply.