public class Namespace
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
check(boolean expression,
java.lang.String message,
java.lang.Object... args)
Check the given condition is true.
|
static Namespace |
empty()
Get an empty namespace.
|
boolean |
equals(java.lang.Object other) |
static Namespace |
fromString(java.lang.String namespace)
Create a namespace with the given string with levels separated by dots.
|
int |
hashCode() |
boolean |
isEmpty()
Check if the namespace is empty.
|
int |
length()
Get the length of the namespace.
|
java.lang.String |
level(int pos)
Get the level at the given position.
|
java.lang.String[] |
levels()
Get the levels of the namespace.
|
static Namespace |
of(java.lang.String... levels)
Create a namespace with the given levels.
|
java.lang.String |
toString() |
public static Namespace empty()
public static Namespace of(java.lang.String... levels)
levels - The levels of the namespacepublic static Namespace fromString(java.lang.String namespace)
namespace - The namespace stringpublic java.lang.String[] levels()
public java.lang.String level(int pos)
pos - The position of the levelpublic int length()
public boolean isEmpty()
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object@FormatMethod
public static void check(boolean expression,
@FormatString
java.lang.String message,
java.lang.Object... args)
IllegalNamespaceException if it's not.expression - The expression to check.message - The message to throw.args - The arguments to the message.