I have a map whose key and values ββare custom classes. The key class is called Position and is created using two ints (for example, new Position(2, 4) .
I got rid of this Position class and converted the map to SimpleHash to use it with Freemarker. Now I have a SimpleHash whose key is a String variable position (for example, "2 4" ) and whose value is either null or a Lot (custom) class.
In the template, I need to check whether the value of this element in SimpleMap (passed as map ) is either zero or an instance of Lot.
<#list mapMinY..mapMaxY as y> <tr> <#list mapMinX..mapMaxX as x> <td> <div> ${x}, ${y} </div> </td> </#list> </tr> </#list>
How to do it?
source share