Interface KeyEditorField.KeyValidator

Enclosing class:
KeyEditorField
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface KeyEditorField.KeyValidator
  • Method Summary

    Modifier and Type
    Method
    Description
    validate(DocumentNode node, String oldKey, String newKey)
    Provides a way to prevent keys from being accepted.
  • Method Details

    • validate

      @Nullable String validate(@Nonnull DocumentNode node, @Nonnull String oldKey, @Nullable String newKey)
      Provides a way to prevent keys from being accepted.
      Parameters:
      node - The node that is being edited
      oldKey - The previous key
      newKey - The new key, or null if the user cancelled the interaction
      Returns:
      A validation error message, or null if the value is acceptable