If the object stored under key is an Integer then returns its value otherwise returns null. @param key key associated to the value to retrieve @return the associated integer
(Object key)
| 67 | * @return the associated integer |
| 68 | */ |
| 69 | public Integer getInt(Object key) { |
| 70 | try { |
| 71 | return Integer.decode((String) get(key)); |
| 72 | } catch (Exception e) { |
| 73 | return null; |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | public Integer getInt(Object key, Integer defaultValue) { |
| 78 | Integer value = getInt(key); |
no test coverage detected