java.lang.Object
com.winterhavenmc.library.messagebuilder.keys.AbstractKey
Direct Known Subclasses:
MacroKey, RecordKey

public abstract class AbstractKey extends Object
An abstract class that provides common methods for implementations of the StandardKey interface
  • Field Details

    • VALID_KEY

      protected static final Pattern VALID_KEY
    • IS_INVALID_KEY

      protected static final Predicate<String> IS_INVALID_KEY
    • wrappedString

      protected final String wrappedString
  • Constructor Details

    • AbstractKey

      protected AbstractKey(String key)
      Class constructor
      Parameters:
      key - a String to be used for the key
  • Method Details

    • equals

      public boolean equals(Object object)
      Test for equality. Keys must be of same type and have matching string value.
      Overrides:
      equals in class Object
      Parameters:
      object - the object to test for equality against this instance
      Returns:
      true if the object is equal to this instance, false if not
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object