Get the first item in KB matching the key as a String. @param key the key for the knowledge base entry @return the entry, or null if not a String or does not exist
(String key)
| 95 | * @return the entry, or {@code null} if not a {@code String} or does not exist |
| 96 | */ |
| 97 | public String getString(String key) { |
| 98 | Object obj = get(key); |
| 99 | if (obj != null && obj instanceof String) { |
| 100 | return (String) obj; |
| 101 | } |
| 102 | return null; |
| 103 | } |
| 104 | |
| 105 | public boolean getBoolean(String key) { |
| 106 | Object obj = get(key); |
no test coverage detected