+1

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


2015-01-06 15:26 GMT+01:00 Mark Struberg <[email protected]>:
>> > The supports method is not there in the original version
>
>
>
> I didn't talk about the supports method. I think even Romain answered that he 
> don't mandatory needs it.
> I was rather talking about the 3rd parameter of the filter method itself:
>
>
> String filterProperty(String key, String valueToBeFiltered, 
> Function<String,String> propertyValueProvider);
>
>
> This propertyValueProvider is not needed as you can simply go into the 
> Configuration itself and resolve any of the values you need.
>
> LieGrue,
> strub
>
>
>> On Tuesday, 6 January 2015, 15:21, Anatole Tresch <[email protected]> wrote:
>> > The supports method is not there in the original version
>>
>>
>> Mark Struberg <[email protected]> schrieb am Di., 6. Jan. 2015 um 13:34:
>>
>>>  +1 for removing the Function. I don't understand what it is supposed to
>> do
>>>  neither.
>>>
>>>
>>>  And imo we don't even need the supports(method). If a Filter
>> doesn't
>>>  support the key/value then it simply doesn't change the value and just
>>>  returns it 1:1.
>>>
>>>  LieGrue,
>>>  strub
>>>
>>>
>>>
>>>
>>>
>>>  > On Tuesday, 6 January 2015, 12:19, Romain Manni-Bucau <
>>>  [email protected]> wrote:
>>>  > > 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