public class NameIdentifier
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
check(boolean condition,
java.lang.String message,
java.lang.Object... args)
Check the given condition is true.
|
boolean |
equals(java.lang.Object other) |
int |
hashCode() |
boolean |
hasNamespace()
Check if the
NameIdentifier has a namespace. |
java.lang.String |
name()
Get the name of the
NameIdentifier . |
Namespace |
namespace()
Get the namespace of the
NameIdentifier . |
static NameIdentifier |
of(Namespace namespace,
java.lang.String name)
Create the
NameIdentifier with the given Namespace and name. |
static NameIdentifier |
of(java.lang.String... names)
Create the
NameIdentifier with the given levels of names. |
static NameIdentifier |
parse(java.lang.String identifier)
Create a
NameIdentifier from the given identifier string. |
java.lang.String |
toString() |
public static NameIdentifier of(java.lang.String... names)
NameIdentifier
with the given levels of names.names
- The names of the identifierNameIdentifier
public static NameIdentifier of(Namespace namespace, java.lang.String name)
NameIdentifier
with the given Namespace
and name.namespace
- The namespace of the identifiername
- The name of the identifierNameIdentifier
public static NameIdentifier parse(java.lang.String identifier)
NameIdentifier
from the given identifier string.identifier
- The identifier stringNameIdentifier
public boolean hasNamespace()
NameIdentifier
has a namespace.NameIdentifier
has a namespace, false otherwise.public Namespace namespace()
NameIdentifier
.NameIdentifier
.public java.lang.String name()
NameIdentifier
.NameIdentifier
.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
@FormatMethod public static void check(boolean condition, @FormatString java.lang.String message, java.lang.Object... args)
IllegalNameIdentifierException
if it's not.condition
- The condition to check.message
- The message to throw.args
- The arguments to the message.