|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ros.namespace.GraphName
public class GraphName
ROS graph resource name.
Constructor Summary | |
---|---|
GraphName(java.lang.String name)
Constructs a new canonical GraphName . |
Method Summary | |
---|---|
static java.lang.String |
canonicalize(java.lang.String name)
Convert name into canonical representation. |
boolean |
equals(java.lang.Object obj)
|
GraphName |
getBasename()
|
GraphName |
getParent()
|
int |
hashCode()
|
boolean |
isEmpty()
|
boolean |
isGlobal()
Is this a /global/name? If node node1 in the global / namespace accesses the resource /bar, that will resolve to the name /bar. If node node2 in the /wg/ namespace accesses the resource /foo, that will resolve to the name /foo. If node node3 in the /wg/ namespace accesses the resource /foo/bar, that will resolve to the name /foo/bar. |
boolean |
isPrivate()
Is this a ~private/name? If node node1 in the global / namespace accesses the resource ~bar, that will resolve to the name /node1/bar. |
boolean |
isRelative()
Is this a relative/name? If node node1 in the global / namespace accesses the resource ~bar, that will resolve to the name /node1/bar. |
boolean |
isRoot()
|
GraphName |
join(GraphName other)
Join this GraphName with another. |
static GraphName |
newAnonymous()
Creates an anonymous GraphName . |
static GraphName |
newRoot()
|
GraphName |
toGlobal()
Convert name to a global name representation. |
GraphName |
toRelative()
Convert name to a relative name representation. |
java.lang.String |
toString()
|
static boolean |
validate(java.lang.String name)
Returns true if the supplied String can be used to
construct a GraphName . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GraphName(java.lang.String name)
GraphName
.
name
- the name of this resourceMethod Detail |
---|
public static GraphName newAnonymous()
GraphName
.
GraphName
suitable for creating an anonymous nodepublic static GraphName newRoot()
GraphName
representing the root namespacepublic static boolean validate(java.lang.String name)
true
if the supplied String
can be used to
construct a GraphName
.
name
- the String
representation of a GraphName
to
validate
true
if the supplied name is can be used to construct a
GraphName
public static java.lang.String canonicalize(java.lang.String name)
name
-
GraphName
public boolean isGlobal()
true
if this name is a global name, false
otherwisepublic boolean isRoot()
true
if this GraphName
represents the root
namespace, false
otherwisepublic boolean isEmpty()
true
if this GraphName
is empty, false
otherwisepublic boolean isPrivate()
true
if the name is a private name, false
otherwisepublic boolean isRelative()
public GraphName getParent()
public GraphName getBasename()
GraphName
without the leading parent namespacepublic GraphName toRelative()
GraphName
public GraphName toGlobal()
GraphName
public GraphName join(GraphName other)
GraphName
with another.
other
- the GraphName
to join with, if other is global, this will
return other.
GraphName
representing the concatenation of this
GraphName
and other
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |