Returns the first entry for the specified database. @param pattern database pattern @return entry, or null if no entry exists
(final String pattern)
| 222 | * @return entry, or {@code null} if no entry exists |
| 223 | */ |
| 224 | synchronized Entry<String, Perm> find(final String pattern) { |
| 225 | for(final Entry<String, Perm> entry : patterns.entrySet()) { |
| 226 | if(Databases.regex(entry.getKey()).matcher(pattern).matches()) return entry; |
| 227 | } |
| 228 | return null; |
| 229 | } |
| 230 | |
| 231 | /** |
| 232 | * Sets a global permission. |
no test coverage detected