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 <i>lang</i>, case-insensitive. + * with the specified prefix <i>lang</i>, 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 [EMAIL PROTECTED] #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(); } - + /** + * [EMAIL PROTECTED] + */ 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(