Package org.kingdoms.constants.namespace
Class Namespace
java.lang.Object
org.kingdoms.constants.namespace.Namespace
A container that namespaces values for registration to avoid conflicts.
These values are usually registered inside of a
NamespaceRegistry
Extending this class is usually not a good idea. The NamespaceContainer should be used instead.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringIf this is a kingdoms name spaces, gives back thegetKey()otherwise, it gives backasString()final StringasString()This is not intended for data usage, you should useasNormalizedString()instead if you're saving data.final booleanstatic NamespacefromConfigString(String str) static @NonNull NamespacefromString(String str) Parses a string with the format ofasNormalizedString()final @NonNull StringgetKey()final @NonNull Stringfinal inthashCode()static NamespaceThis method is only intended to be used by Kingdoms only.toString()
-
Field Details
-
KINGDOMS
- See Also:
-
-
Constructor Details
-
Namespace
-
-
Method Details
-
getConfigOptionName
- Returns:
- returns a
asNormalizedString()except that the key is replaced with all lowercase letters and underscores replaced with dashes.
-
asString
This is not intended for data usage, you should useasNormalizedString()instead if you're saving data.- Returns:
getNamespace()+ ':' +getKey()
-
asNormalizedString
If this is a kingdoms name spaces, gives back thegetKey()otherwise, it gives backasString() -
kingdoms
This method is only intended to be used by Kingdoms only. -
getNamespace
-
getKey
-
fromString
Parses a string with the format ofasNormalizedString() -
fromConfigString
-
toString
-
equals
-
hashCode
public final int hashCode()
-