public final class StringFqn extends Fqn
Fqn.fromString(String)
is used, or when any of the other factory methods on Fqn
are
passed only String elements.
Note that the "/" character is illegal in any Fqn String element and if encountered may be used to split Fqn elements.
Expect indeterminate behaviour until proper String escaping is in place.
elements, ROOT, SEPARATOR, stringRepresentation
Modifier | Constructor and Description |
---|---|
protected |
StringFqn() |
protected |
StringFqn(List<String> stringElements) |
protected |
StringFqn(String stringRep) |
protected |
StringFqn(StringFqn base,
List<String> elements) |
protected |
StringFqn(StringFqn base,
StringFqn relative) |
Modifier and Type | Method and Description |
---|---|
protected int |
calculateHashCode()
Calculates a hash code by summing the hash code of all elements.
|
boolean |
equals(Object other)
Returns true if obj is a Fqn with the same elements.
|
String |
getStringRepresentation() |
int |
hashCode()
Returns a hash code with Fqn elements.
|
boolean |
isChildOrEquals(Fqn parentFqn)
Returns true if this Fqn is equals or the child of parentFqn.
|
compareTo, fromElements, fromExternalStream, fromList, fromList, fromRelativeElements, fromRelativeFqn, fromRelativeList, fromString, get, getAncestor, getLastElement, getLastElementAsString, getParent, getStringRepresentation, getStringRepresentation, getSubFqn, hasElement, isChildOf, isDirectChildOf, isRoot, peekElements, readExternal, replaceAncestor, root, size, toString, writeExternal
protected StringFqn()
protected StringFqn(String stringRep)
public boolean equals(Object other)
Fqn
public int hashCode()
Fqn
protected int calculateHashCode()
Fqn
calculateHashCode
in class Fqn
public boolean isChildOrEquals(Fqn parentFqn)
Fqn
Fqnf1 = Fqn.fromString("/a/b"); Fqn f2 = Fqn.fromString("/a/b/c"); assertTrue(f1.isChildOrEquals(f2)); assertTrue(f1.isChildOrEquals(f1)); assertFalse(f2.isChildOrEquals(f1));
isChildOrEquals
in class Fqn
parentFqn
- candidate parent to test againstpublic String getStringRepresentation()
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.