[jboss-cvs] JBossCache/src/org/jboss/cache ...
Manik Surtani
msurtani at jboss.com
Thu Jul 13 05:35:44 EDT 2006
User: msurtani
Date: 06/07/13 05:35:44
Modified: src/org/jboss/cache Fqn.java
Log:
Merged in javadocs from 140 branch
Revision Changes Path
1.32 +34 -12 JBossCache/src/org/jboss/cache/Fqn.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Fqn.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/Fqn.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- Fqn.java 27 Apr 2006 15:40:16 -0000 1.31
+++ Fqn.java 13 Jul 2006 09:35:44 -0000 1.32
@@ -25,8 +25,21 @@
/**
* Fully qualified name. A list of relatives names, which can be any Object,
* from root to a given node. This class is immutable.
- *
- * @version $Revision: 1.31 $
+ * <p />
+ * Note that<br>
+ * <p />
+ * <code>Fqn f = new Fqn("/a/b/c");</code>
+ * <p />
+ * is <b>not</b> the same as
+ * <p />
+ * <code>Fqn f = Fqn.fromString("/a/b/c");</code>
+ * <p />
+ * The former will result in a single Fqn, called "/a/b/c" which hangs directly under Fqn.ROOT.
+ * <p />
+ * The latter will result in 3 Fqns, called "a", "b" and "c", where "c" is a child of "b", "b" is a child of "a", and "a" hangs off Fqn.ROOT.
+ * <p />
+ * Another way to look at it is that the "/" separarator is only parsed when it form sa part of a String passed in to Fqn.fromString() and not otherwise.
+ * @version $Revision: 1.32 $
*/
public class Fqn implements Cloneable, Externalizable {
@@ -92,7 +105,9 @@
}
/**
- * Constructs a single element FQN.
+ * Constructs a single element Fqn. Note that if a String is passed in, separator characters {@link #SEPARATOR} are <b>not</b> parsed.
+ * If you wish these to be parsed, use {@link #fromString(String)}.
+ * @see #fromString(String)
*/
public Fqn(Object name) {
elements = Collections.singletonList(name);
@@ -177,15 +192,22 @@
/**
* Returns a new FQN from a string, where the elements are deliminated by
- * one or more / characters.
- * Example use:
- <pre>
- Fqn.fromString("/a//b/c/");
- </pre>
- is equivalent to:
- <pre>
- new Fqn(new Object[] { "a", "b", "c" });
- </pre>
+ * one or more separator ({@link #SEPARATOR}) characters.<br><br>
+ * Example use:<br>
+ * <pre>
+ * Fqn.fromString("/a//b/c/");
+ * </pre><br>
+ * is equivalent to:<br>
+ * <pre>
+ * new Fqn(new Object[] { "a", "b", "c" });
+ * </pre><br>
+ * but not<br>
+ * <pre>
+ * new Fqn("/a/b/c");
+ * </pre>
+ *
+ * @see #Fqn(Object[])
+ * @see #Fqn(Object)
*/
public static Fqn fromString(String fqn) {
if (fqn == null)
More information about the jboss-cvs-commits
mailing list