jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1423781 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state: NodeStoreBranch.java PropertyBuilder.java
Date Wed, 19 Dec 2012 08:06:35 GMT
Author: thomasm
Date: Wed Dec 19 08:06:33 2012
New Revision: 1423781

URL: http://svn.apache.org/viewvc?rev=1423781&view=rev
Log:
OAK-301 Document Oak internals

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStoreBranch.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/PropertyBuilder.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStoreBranch.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStoreBranch.java?rev=1423781&r1=1423780&r2=1423781&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStoreBranch.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStoreBranch.java
Wed Dec 19 08:06:33 2012
@@ -20,6 +20,9 @@ import javax.annotation.Nonnull;
 
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 
+/**
+ * TODO document
+ */
 public interface NodeStoreBranch {
 
     /**

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/PropertyBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/PropertyBuilder.java?rev=1423781&r1=1423780&r2=1423781&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/PropertyBuilder.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/PropertyBuilder.java
Wed Dec 19 08:06:33 2012
@@ -25,146 +25,162 @@ import org.apache.jackrabbit.oak.api.Pro
 
 /**
  * Builder interface for constructing new {@link PropertyState node states}.
+ * 
+ * @param <T> the property type 
  */
 public interface PropertyBuilder<T> {
 
     /**
-     * @return The name of the property state
+     * Set the name of the property
+     * 
+     * @param name
+     * @return {@code this}
+     */
+    @Nonnull
+    PropertyBuilder<T> setName(String name);
+
+    /**
+     * Get the name of the property (may be null).
+     * 
+     * @return the name of the property state
      */
     @CheckForNull
     String getName();
 
     /**
-     * @return The value of the property state or {@code null} if {@code isEmpty} is {@code
true}
+     * @return the value of the property state or {@code null} if
+     *         {@code isEmpty} is {@code true}
      */
     @CheckForNull
     T getValue();
 
     /**
-     * @return  A list of values of the property state
+     * @return a list of values of the property state
      */
     @Nonnull
     List<T> getValues();
 
     /**
-     * @param index
-     * @return  The value of the property state at the given {@code index}.
-     * @throws IndexOutOfBoundsException  if {@code index >= count}
+     * Get the value at the given array index.
+     * 
+     * @param index the array index
+     * @return the value of the property state at the given {@code index}.
+     * @throws IndexOutOfBoundsException if {@code index >= count}
      */
     @Nonnull
     T getValue(int index);
 
     /**
      * @param value
-     * @return  {@code true} iff the property state contains {@code value}.
+     * @return {@code true} iff the property state contains {@code value}.
      */
     boolean hasValue(Object value);
 
     /**
-     * @return  The number of values of the property state
+     * @return the number of values of the property state
      */
     int count();
 
     /**
-     * @return  {@code true} this is a builder for an array property.
+     * @return {@code true} this is a builder for an array property.
      */
     boolean isArray();
 
     /**
-     * @return  {{@code true}} iff {@code count() == 0}
-     * @return
+     * @return {{@code true} iff {@code count() == 0}
      */
     boolean isEmpty();
 
     /**
-     * Returns an immutable property state that matches the current state of
-     * the builder.
-     *
+     * Returns an immutable property state that matches the current state of the
+     * builder.
+     * 
      * @return immutable property state
-     * @throws IllegalStateException  If the name of the property is not set or
-     * {@code !(isArray() || count() == 1)}.
+     * @throws IllegalStateException If the name of the property is not set or
+     *             {@code !(isArray() || count() == 1)}.
      */
     @Nonnull
     PropertyState getPropertyState();
 
     /**
-     * Clone {@code property} to the property state being built. After
-     * this call {@code getPropertyState().equals(property)} will hold.
-     * @param property  the property to clone
-     * @return  {@code this}
+     * Clone {@code property} to the property state being built. After this call
+     * {@code getPropertyState().equals(property)} will hold.
+     * 
+     * @param property the property to clone
+     * @return {@code this}
      */
     @Nonnull
     PropertyBuilder<T> assignFrom(PropertyState property);
 
     /**
-     * Set the name of the property
-     * @param name
-     * @return  {@code this}
-     */
-    @Nonnull
-    PropertyBuilder<T> setName(String name);
-
-    /**
      * Make this build an array property.
-     * @return
+     * 
+     * @return {@code this}
      */
     @Nonnull
     PropertyBuilder<T> setArray();
 
     /**
      * Make this build a scalar property.
-     * @return
+     * 
+     * @return {@code this}
      */
     @Nonnull
     PropertyBuilder<T> setScalar();
 
     /**
      * Set the value of the property state clearing all previously set values.
-     * @param value  value to set
-     * @return  {@code this}
+     * 
+     * @param value value to set
+     * @return {@code this}
      */
     @Nonnull
     PropertyBuilder<T> setValue(T value);
 
     /**
      * Add a value to the end of the list of values of the property state.
-     * @param value  value to add
-     * @return  {@code this}
+     * 
+     * @param value value to add
+     * @return {@code this}
      */
     @Nonnull
     PropertyBuilder<T> addValue(T value);
 
     /**
      * Set the value of the property state at the given {@code index}.
-     * @param value  value to set
-     * @param index  index to set the value
-     * @return  {@code this}
-     * @throws IndexOutOfBoundsException  if {@code index >= count}
+     * 
+     * @param value value to set
+     * @param index index to set the value
+     * @return {@code this}
+     * @throws IndexOutOfBoundsException if {@code index >= count}
      */
     @Nonnull
     PropertyBuilder<T> setValue(T value, int index);
 
     /**
      * Set the values of the property state clearing all previously set values.
+     * 
      * @param values
-     * @return  {@code this}
+     * @return {@code this}
      */
     @Nonnull
     PropertyBuilder<T> setValues(Iterable<T> values);
 
     /**
-     * Remove the value at the given {@code index}
-     * @param index
-     * @return  {@code this}
-     * @throws IndexOutOfBoundsException  if {@code index >= count}
+     * Remove the value at the given {@code index}.
+     * 
+     * @param index the array index
+     * @return {@code this}
+     * @throws IndexOutOfBoundsException if {@code index >= count}
      */
     @Nonnull
     PropertyBuilder<T> removeValue(int index);
 
     /**
-     * Remove the given value from the property state
-     * @param value  value to remove
-     * @return  {@code this}
+     * Remove the given value from the property state.
+     * 
+     * @param value the value to remove
+     * @return {@code this}
      */
     @Nonnull
     PropertyBuilder<T> removeValue(Object value);



Mime
View raw message