jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Mehrotra <chetan.mehro...@gmail.com>
Subject Re: svn commit: r1511233 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/api/ main/java/org/apache/jackrabbit/oak/kernel/ main/java/org/apache/jackrabbit/oak/plugins/commit/ main/java/org/apache/jackrabbit/oak/plugins/nodetype/...
Date Mon, 12 Aug 2013 04:17:39 GMT
>I'd rather not make this part of the Tree API. Shouldn't this better got into TreeUtil?

I followed the convention as used in
org.apache.jackrabbit.oak.api.PropertyState#GET_NAME. However I can
move it to TreeUtil also.

Chetan Mehrotra


On Fri, Aug 9, 2013 at 7:20 PM, Michael Dürig <mduerig@apache.org> wrote:
>
>
> On 7.8.13 12:05, chetanm@apache.org wrote:
>>
>> Modified:
>> jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Tree.java
>>
>> URL:http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Tree.java?rev=1511233&r1=1511232&r2=1511233&view=diff
>>
>> ==============================================================================
>> ---
>> jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Tree.java
>> (original)
>> +++
>> jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Tree.java
>> Wed Aug  7 10:05:37 2013
>> @@ -18,6 +18,8 @@
>>    */
>>   package org.apache.jackrabbit.oak.api;
>>
>> +import com.google.common.base.Function;
>> +
>>   import javax.annotation.CheckForNull;
>>   import javax.annotation.Nonnull;
>>   import javax.annotation.Nullable;
>> @@ -330,4 +332,19 @@ public interface Tree {
>>        */
>>       void removeProperty(@Nonnull String name);
>>
>> +    /**
>> +     * Mapping from a Tree instance to its name.
>> +     */
>> +    Function<Tree, String> GET_NAME =
>> +            new Function<Tree, String>() {
>> +                @Override @Nullable
>> +                public String apply(@Nullable Tree input) {
>> +                    if (input != null) {
>> +                        return input.getName();
>> +                    } else {
>> +                        return null;
>> +                    }
>> +                }
>> +            };
>> +
>>   }
>
>
> I'd rather not make this part of the Tree API. Shouldn't this better got
> into TreeUtil?
>
> Michael

Mime
View raw message