You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by an...@apache.org on 2013/02/06 11:41:11 UTC

svn commit: r1442895 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/TreeUtil.java

Author: angela
Date: Wed Feb  6 10:41:11 2013
New Revision: 1442895

URL: http://svn.apache.org/viewvc?rev=1442895&view=rev
Log:
javadoc

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/TreeUtil.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/TreeUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/TreeUtil.java?rev=1442895&r1=1442894&r2=1442895&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/TreeUtil.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/TreeUtil.java Wed Feb  6 10:41:11 2013
@@ -61,6 +61,18 @@ public final class TreeUtil {
         }
     }
 
+    /**
+     * Returns the boolean representation of the property with the specified
+     * {@code propertyName}. If the property does not exist or
+     * {@link org.apache.jackrabbit.oak.api.PropertyState#isArray() is an array}
+     * this method returns {@code false}.
+     *
+     * @param tree The target tree.
+     * @param propertyName The name of the property.
+     * @return the boolean representation of the property state with the given
+     * name. This utility returns {@code false} if the property does not exist
+     * or is an multivalued property.
+     */
     public static boolean getBoolean(Tree tree, String propertyName) {
         PropertyState property = tree.getProperty(propertyName);
         return property != null && !property.isArray() && property.getValue(BOOLEAN);