void (@NotNull YAMLKeyValue keyValueToDelete) { if (keyValueToDelete.getParent() != this) { throw new IllegalArgumentException("KeyValue should be the child of this"); } YAMLUtil.deleteSurroundingWhitespace(keyValueToDelete); keyValueToDelete.delete(); }