Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- interface applyBuisnessRule<T> {
- public T execute(String jobCode) throws Exception;
- }
- class CardvaletImpl<T> implements applyBuisnessRule<T> {
- private static final String Success = null;
- public T execute(String jobCode) throws Exception {
- T result = null;
- // put your logic
- return result;
- }
- }
- CardvaletImpl<String> cardvaletImpl = new CardvaletImpl<>();
- String result = cardvaletImpl.execute("JOBCODE");
- class CardvaletImpl<T> implements applyBuisnessRule<T> {
- private static final String Success = null;
- Map<String, Integer> myMap = new HashMap<String, Integer>(); // ****Map that i want to return from this class to caller class ***
- myMap.put("A",23);
- myMap.put("A",45);
- public T execute(String jobCode) throws Exception {
- T result = null;
- // ** advise how i will put the map into object that is into result and return to the caller
- }
- }
Add Comment
Please, Sign In to add comment