public class NodeIdentifier
extends java.lang.Object
Constructor and Description |
---|
NodeIdentifier(GraphName name,
java.net.URI uri)
Constructs a new
NodeIdentifier . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
static NodeIdentifier |
forName(java.lang.String name) |
static NodeIdentifier |
forNameAndUri(java.lang.String name,
java.lang.String uri) |
static NodeIdentifier |
forUri(java.lang.String uri) |
GraphName |
getName() |
java.net.URI |
getUri() |
int |
hashCode() |
ConnectionHeader |
toConnectionHeader() |
java.lang.String |
toString() |
public NodeIdentifier(GraphName name, java.net.URI uri)
NodeIdentifier
.
Note that either nodeName
or uri
may be null but not both.
This is necessary because either is enough to uniquely identify a
SlaveServer
and because, depending on context, one or the other may
not be available.
Although either value may be null
, we do not treat null
as
a wildcard with respect to equality. Even though it should be safe to do
so, wildcards are unnecessary in this case and would likely lead to buggy
code.name
- the GraphName
that the Node
is known asuri
- the URI
of the Node
's SlaveServer
XML-RPC serverpublic static NodeIdentifier forName(java.lang.String name)
public static NodeIdentifier forUri(java.lang.String uri)
public static NodeIdentifier forNameAndUri(java.lang.String name, java.lang.String uri)
public GraphName getName()
public java.net.URI getUri()
public ConnectionHeader toConnectionHeader()
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