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 Detail

      • validate

        @Nullable
        java.lang.String validate​(@Nonnull
                                  DocumentNode node,
                                  @Nonnull
                                  java.lang.String oldKey,
                                  @Nullable
                                  java.lang.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