Class NamespacedId
java.lang.Object
dev.aurelium.auraskills.api.registry.NamespacedId
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
static NamespacedId
fromDefault
(String string) Creates a new NamespacedId from the String representation.static NamespacedId
fromString
(String string) Creates a new NamespacedId from the full String representation, with the / separating the namespace and the key.getKey()
Gets the key portion of the NamespacedId, which is the semantic name for the instance of the type, such as the skill name.Gets the namespace portion of the NamespacedId, usually a plugin name in lowercase.Gets the original key portion of the NamespacedId, which is the key in the case it was created with.Gets the string representation of the ID in the namespace/key format, or just the key if the namespace is the default auraskills namespace.int
hashCode()
static NamespacedId
Creates a new NamespacedId from a given namespace and key.toString()
Returns the full String representation of the NamespacedId, with a / separating the namespace and the key.
-
Field Details
-
AURASKILLS
- See Also:
-
-
Method Details
-
getNamespace
Gets the namespace portion of the NamespacedId, usually a plugin name in lowercase.- Returns:
- the namespace
-
getKey
Gets the key portion of the NamespacedId, which is the semantic name for the instance of the type, such as the skill name.- Returns:
- the key
-
getSimpleName
Gets the string representation of the ID in the namespace/key format, or just the key if the namespace is the default auraskills namespace.- Returns:
- the simple name
-
getOriginalKey
Gets the original key portion of the NamespacedId, which is the key in the case it was created with.- Returns:
- the original key
-
toString
Returns the full String representation of the NamespacedId, with a / separating the namespace and the key. -
of
Creates a new NamespacedId from a given namespace and key. Both should be in lowercase.- Parameters:
namespace
- the namespace, usually the name of the plugin calling this methodkey
- the key that is the actual name of the instance- Returns:
- the created NamespacedId
-
fromString
Creates a new NamespacedId from the full String representation, with the / separating the namespace and the key.- Parameters:
string
- the full String, with the slash separator- Returns:
- the created NamespacedId
-
fromDefault
Creates a new NamespacedId from the String representation. Works the same asfromString(String)
, but will fall back to using the default auraskills namespace if there is no slash in the input.- Parameters:
string
- the String input, with or without the slash- Returns:
- the new NamespacedId
-
equals
-
hashCode
public int hashCode()
-