|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nasa.arc.brahms.common.data.QualifiedName
public class QualifiedName
Used to represent qualified names without using string concatenation A name with the string form "name1.name2.name3" would be represented by new QualifiedName("name3", new QualifiedName("name2", new QualifiedName("name1", null))) This representation saves space when many names share the same prefix.
Constructor Summary | |
---|---|
QualifiedName()
Constructs an empty QualifiedName |
|
QualifiedName(java.lang.String name)
Constructs a QualifiedName for a simple name with no qualification |
|
QualifiedName(java.lang.String name,
QualifiedName parent)
Constructs a QualifiedName with a simple name and a parent QualifiedName |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Tests whether two QualifiedNames are the same. |
java.lang.String |
getName()
Returns the last identifier of the qualified name |
QualifiedName |
getParent()
Returns the parent QualifiedName that represents all but the last identifier in the qualified name. |
int |
hashCode()
Returns a hash code value for the qualified name. |
void |
setName(java.lang.String name)
Sets the last identifier of the qualified name |
void |
setParent(QualifiedName parent)
Sets the parent QualifiedName that represents all but the last identifier in the qualified name |
java.lang.String |
toString()
Returns a string representation of the qualified name. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QualifiedName()
public QualifiedName(java.lang.String name)
name
- the simple namepublic QualifiedName(java.lang.String name, QualifiedName parent)
name
- the last identifier String in the qualified nameparent
- the parent QualifiedNameMethod Detail |
---|
public void setName(java.lang.String name)
name
- the last identifier of the qualified namepublic java.lang.String getName()
public void setParent(QualifiedName parent)
parent
- the parent QualifiedNamepublic QualifiedName getParent()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the Object to be compared for equality
public int hashCode()
Object.hashCode()
for a complete description.
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |