Hi guys,

just notice filter API was:

String filterProperty(String key, String valueToBeFiltered,
Function<String,String> propertyValueProvider);

I dont get it at all:
1) if forces a returned value -> I'd add a supports(key, currentValue)
to make filter composition easier
2) why a function? a filter needs key and value not only one of both +
why doing a function (filterProperty) of function since we dont need
it for something as trivial as filtering. If you want to play with
java 8 then org.apache.tamaya.core.internal.DefaultConfiguration#get(String)
should get a list of fnuction to apply but it would be a very weird
API.

My Proposal would be simply:

Filter {
    boolean supports(key, value);
    String filter(key, value);
}


wdyt?


Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau

Reply via email to