You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by an...@apache.org on 2009/02/04 14:44:09 UTC

svn commit: r740736 - /jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueValue.java

Author: angela
Date: Wed Feb  4 13:44:08 2009
New Revision: 740736

URL: http://svn.apache.org/viewvc?rev=740736&view=rev
Log:
javadoc and some minor layout mods

Modified:
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueValue.java

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueValue.java?rev=740736&r1=740735&r2=740736&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueValue.java (original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueValue.java Wed Feb  4 13:44:08 2009
@@ -36,6 +36,15 @@
  */
 public final class QValueValue implements Value {
 
+    private static final short STATE_UNDEFINED = 0;
+
+    private static final short STATE_VALUE_CONSUMED = 1;
+
+    private static final short STATE_STREAM_CONSUMED = 2;
+
+    // the state of this value instance
+    private short state = STATE_UNDEFINED;
+
     // wrapped QValue
     private final QValue qvalue;
 
@@ -66,10 +75,9 @@
         return qvalue;
     }
 
-    //----------------------------------------------------------------< Value >
-
+    //--------------------------------------------------------------< Value >---
     /**
-     * {@inheritDoc}
+     * @see javax.jcr.Value#getBoolean()
      */
     public boolean getBoolean() throws RepositoryException {
         setValueConsumed();
@@ -81,7 +89,7 @@
     }
 
     /**
-     * {@inheritDoc}
+     * @see javax.jcr.Value#getDate()
      */
     public Calendar getDate() throws RepositoryException {
         setValueConsumed();
@@ -89,7 +97,7 @@
     }
 
     /**
-     * {@inheritDoc}
+     * @see javax.jcr.Value#getDouble()
      */
     public double getDouble() throws RepositoryException {
         setValueConsumed();
@@ -97,7 +105,7 @@
     }
 
     /**
-     * {@inheritDoc}
+     * @see javax.jcr.Value#getLong()
      */
     public long getLong() throws RepositoryException {
         setValueConsumed();
@@ -105,7 +113,7 @@
     }
 
     /**
-     * {@inheritDoc}
+     * @see javax.jcr.Value#getStream()
      */
     public InputStream getStream() throws IllegalStateException, RepositoryException {
         setStreamConsumed();
@@ -128,7 +136,7 @@
     }
 
     /**
-     * {@inheritDoc}
+     * @see javax.jcr.Value#getString()
      */
     public String getString() throws RepositoryException {
         setValueConsumed();
@@ -144,33 +152,33 @@
     }
 
     /**
-     * {@inheritDoc}
+     * @see javax.jcr.Value#getType() 
      */
     public int getType() {
         return qvalue.getType();
     }
 
-    public boolean equals(Object p_obj) {
-        if (p_obj instanceof QValueValue) {
-            return qvalue.equals(((QValueValue)p_obj).qvalue);
+    //-------------------------------------------------------------< Object >---
+    /**
+     * @see Object#equals(Object)
+     */
+    public boolean equals(Object obj) {
+        if (obj instanceof QValueValue) {
+            return qvalue.equals(((QValueValue) obj).qvalue);
         }
         else {
             return false;
         }
     }
 
+    /**
+     * @see Object#hashCode() 
+     */
     public int hashCode() {
         return qvalue.hashCode();
     }
 
-    private static final short STATE_UNDEFINED = 0;
-
-    private static final short STATE_VALUE_CONSUMED = 1;
-
-    private static final short STATE_STREAM_CONSUMED = 2;
-
-    private short state = STATE_UNDEFINED;
-
+    //--------------------------------------------------------------------------
     /**
      * Checks if the non-stream value of this instance has already been
      * consumed (if any getter methods except <code>{@link #getStream()}</code> and