implement containsKey
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
1dbc6b549b
commit
3ff582c780
|
@ -56,6 +56,13 @@ public class String2ObjectMap<V> extends AbstractMap<String, V> implements Seria
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsKey(Object key) {
|
||||
if (!(key instanceof CharSequence seq)) return false;
|
||||
SearchResult<V> searchResult = searchTree(seq);
|
||||
return searchResult.classification.equals(Classification.EXACT_MATCH);
|
||||
}
|
||||
|
||||
public Iterable<CharSequence> getKeysStartingWith(CharSequence prefix) {
|
||||
return getForKeysStartingWith(prefix, this::getDescendantKeys, Collections::emptySet);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue