Class NamespacedKey
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.api.NamespacedKey
Represents a key that exists in a namespace.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNamespacedKey(String namespace, String name) Creates a newNamespacedKeywith the given namespace and name. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe fully qualified name of thisNamespacedKey.getKey()The key of thisNamespacedKey.The namespace of thisNamespacedKey.inthashCode()static NamespacedKeyCreates a newNamespacedKeyfrom the provided input.toString()
-
Field Details
-
PATTERN
The regex rule that the namespace and key must match.
-
-
Constructor Details
-
NamespacedKey
Creates a newNamespacedKeywith the given namespace and name.Each String can only contain letters, numbers, and underscores.
- Parameters:
namespace- The namespace of the key.name- The name of the key.- Throws:
InvalidNameSpacedKeyException- If either the namespace or name is null or does not match the regex rule.
-
-
Method Details
-
of
Creates a newNamespacedKeyfrom the provided input.If the input is of the form
namespace:key, the namespace and key are extracted.If the input is of the form
key, the namespace is set toConstants.PLUGIN_NAME.- Parameters:
input- The input to create theNamespacedKeyfrom.- Returns:
- The created
NamespacedKey. - Throws:
InvalidNameSpacedKeyException- If either the namespace or name is null or does not match the regex rule.
-
toString
-
getNamespace
The namespace of thisNamespacedKey.- Returns:
- The namespace of this
NamespacedKey.
-
getKey
-
getFullKey
The fully qualified name of thisNamespacedKey.This is formatted as
namespace:key.- Returns:
- The fully qualified name of this
NamespacedKey.
-
equals
-
hashCode
-