From commits-return-6992-apmail-jackrabbit-commits-archive=jackrabbit.apache.org@jackrabbit.apache.org Wed Feb 04 13:44:35 2009 Return-Path: Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: (qmail 20628 invoked from network); 4 Feb 2009 13:44:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Feb 2009 13:44:32 -0000 Received: (qmail 74738 invoked by uid 500); 4 Feb 2009 13:44:32 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 74716 invoked by uid 500); 4 Feb 2009 13:44:32 -0000 Mailing-List: contact commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list commits@jackrabbit.apache.org Received: (qmail 74707 invoked by uid 99); 4 Feb 2009 13:44:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2009 05:44:32 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2009 13:44:30 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8A094238896B; Wed, 4 Feb 2009 13:44:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r740736 - /jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueValue.java Date: Wed, 04 Feb 2009 13:44:09 -0000 To: commits@jackrabbit.apache.org From: angela@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090204134409.8A094238896B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 {@link #getStream()} and