Skip to content

Commit

Permalink
Added bunq util for methods not supported in old java. (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
OGKevin committed May 5, 2018
1 parent 546ed01 commit 3bb80b4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/java/com/bunq/sdk/util/BunqUtil.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.bunq.sdk.util;

import java.util.Map;

public class BunqUtil {
public static <T> T getValueFromMapOrDefault(Map<String, T> map, String key ,T defaultValue) {
if (map.containsKey(key)) {
return map.get(key);
} else {
return defaultValue;
}
}

}

0 comments on commit 3bb80b4

Please sign in to comment.