I have a number of setter methods which take an enum. These are based on incoming objects attribute. Rather than write a bunch of these is there a way around having to hard code
I ended up using a simple object map:
private static HashMap sideMap = new HashMap(7); static{ sideMap.put("B", Side.BUY); sideMap.put("S", Side.SELL); }
and simply using
Obj.setSide(sideMap.get(zasAlloc.getM_buySellCode()));