Add get*Names() to FunctionCatalog

We could go wit a separate interface, but it seems sensible to
keep it together really, so that callers don't have to downcast.
This commit is contained in:
Dave Syer
2017-06-29 10:25:31 +01:00
parent 2dd7dfb900
commit da0c954135
7 changed files with 69 additions and 36 deletions

View File

@@ -94,4 +94,20 @@ public class InMemoryFunctionCatalog implements FunctionCatalog {
public <T> Consumer<T> lookupConsumer(String name) {
return (Consumer<T>) consumers.get(name);
}
@Override
public Set<String> getSupplierNames() {
return suppliers.keySet();
}
@Override
public Set<String> getFunctionNames() {
return functions.keySet();
}
@Override
public Set<String> getConsumerNames() {
return consumers.keySet();
}
}