Class ValidMacroKey
java.lang.Object
com.winterhavenmc.library.messagebuilder.models.keys.ValidMacroKey
- All Implemented Interfaces:
MacroKey,StandardKey
A type that represents a validated string for a macro. This type guarantees a valid string that has been
validated upon creation. The static factory methods return an Optional of the LegacyRecordKey,
or an empty Optional if the parameter was invalid, as determined by regex pattern and Predicate.
-
Field Summary
Fields inherited from interface com.winterhavenmc.library.messagebuilder.models.keys.StandardKey
IS_INVALID_KEY, VALID_KEY_PATTERN -
Method Summary
-
Method Details
-
append
Create a new string by suffixing a dot-separated subkey to this existing string- Parameters:
subKey- a string to be used for the appended subkey- Returns:
- a new string with the subkey appended, or an empty Optional if the string was not a valid string
-
append
Create a new string by suffixing a dot-separated subkey to this existing string- Type Parameters:
E- an enum constant- Parameters:
subKey- an enu constant whose name() is to be used for the appended subkey- Returns:
- a new string with the subkey appended, or an empty Optional if the string was not a valid string
-
getBase
-
asPlaceholder
-
toString
-
equals
-
hashCode
public int hashCode()
-