Return-Path: Delivered-To: apmail-commons-commits-archive@locus.apache.org Received: (qmail 36570 invoked from network); 2 Feb 2008 21:31:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Feb 2008 21:31:27 -0000 Received: (qmail 4793 invoked by uid 500); 2 Feb 2008 21:31:17 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 4728 invoked by uid 500); 2 Feb 2008 21:31:17 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 4719 invoked by uid 99); 2 Feb 2008 21:31:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Feb 2008 13:31:17 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Feb 2008 21:31:10 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 052821A9832; Sat, 2 Feb 2008 13:31:03 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r617898 - /commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java Date: Sat, 02 Feb 2008 21:31:02 -0000 To: commits@commons.apache.org From: mbenson@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080202213103.052821A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mbenson Date: Sat Feb 2 13:31:01 2008 New Revision: 617898 URL: http://svn.apache.org/viewvc?rev=617898&view=rev Log: javadoc; remove commented code Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java?rev=617898&r1=617897&r2=617898&view=diff ============================================================================== --- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java (original) +++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java Sat Feb 2 13:31:01 2008 @@ -493,7 +493,7 @@ * Check whether our locale matches the specified language. * @param lang String language to check * @return true if the selected locale name starts - * with the specified prefix lang, case-insensitive. + * with the specified prefix lang, case-insensitive. */ public boolean isLanguage(String lang) { Locale loc = getLocale(); @@ -501,27 +501,6 @@ return name.toUpperCase().startsWith(lang.toUpperCase()); } -// /** -// * Installs the supplied manager as the namespace manager for this node -// * pointer. The {@link #getNamespaceURI(String) getNamespaceURI(prefix)} -// * uses this manager to resolve namespace prefixes. -// * -// * @param namespaceManager -// */ -// public void setNamespaceManager(NamespaceManager namespaceManager) { -// this.namespaceManager = namespaceManager; -// } -// -// public NamespaceManager getNamespaceManager() { -// if (namespaceManager != null) { -// return namespaceManager; -// } -// if (parent != null) { -// return parent.getNamespaceManager(); -// } -// return null; -// } -// /** * Returns a NodeIterator that iterates over all children or all children * that match the given NodeTest, starting with the specified one. @@ -707,7 +686,9 @@ return asPath(); } - + /** + * {@inheritDoc} + */ public int compareTo(Object object) { if (object == this) { return 0; @@ -743,6 +724,14 @@ return commonParentFound ? compareNodePointers(this, depth1, pointer, depth2) : 0; } + /** + * Compare node pointers. + * @param p1 pointer 1 + * @param depth1 depth 1 + * @param p2 pointer 2 + * @param depth2 depth 2 + * @return comparison result: (< 0) -> (p1 lt p2); (0) -> (p1 eq p2); (> 0) -> (p1 gt p2) + */ private int compareNodePointers( NodePointer p1, int depth1, @@ -777,6 +766,11 @@ printDeep(this, ""); } + /** + * Print deep + * @param pointer to print + * @param indent indentation level + */ private static void printDeep(NodePointer pointer, String indent) { if (indent.length() == 0) { System.err.println(