|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectNameImpl
public class NameImpl
Simple implementation of Name.
This class emulates QName, and is used as the implementation of both AttributeName and TypeName (so when the API settles down we should have a quick fix.
Its is advantageous to us to be able to:
It case it is not obvious this is a value object and equality is based on namespace and name.
modules/library/api (gt-api.jar)
Field Summary | |
---|---|
protected String |
local
local part |
protected String |
namespace
namespace / scope |
Constructor Summary | |
---|---|
NameImpl(String local)
Constructs an instance with the local part set. |
|
NameImpl(String namespace,
String local)
Constructs an instance with the local part and namespace set. |
|
NameImpl(String namespace,
String separator,
String local)
Constructs an instance with the local part and namespace set. |
Method Summary | |
---|---|
int |
compareTo(NameImpl other)
|
boolean |
equals(Object obj)
value object with equality based on name and namespace. |
String |
getLocalPart()
|
String |
getNamespaceURI()
|
String |
getSeparator()
|
String |
getURI()
|
int |
hashCode()
Returns a hash code value for this operand. |
boolean |
isGlobal()
|
String |
toString()
name or namespace:name |
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String namespace
protected String local
Constructor Detail |
---|
public NameImpl(String local)
local
- The local part of the name.public NameImpl(String namespace, String local)
namespace
- The namespace or scope of the name.local
- The local part of the name.public NameImpl(String namespace, String separator, String local)
namespace
- The namespace or scope of the name.local
- The local part of the name.Method Detail |
---|
public boolean isGlobal()
isGlobal
in interface Name
public String getSeparator()
getSeparator
in interface Name
public String getNamespaceURI()
getNamespaceURI
in interface Name
public String getLocalPart()
getLocalPart
in interface Name
public String getURI()
getURI
in interface Name
public int hashCode()
hashCode
in interface Name
hashCode
in class Object
public boolean equals(Object obj)
equals
in interface Name
equals
in class Object
public String toString()
toString
in interface Name
toString
in class Object
public int compareTo(NameImpl other)
compareTo
in interface Comparable<NameImpl>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |