public void visitData(@Nullable Function visitor) {
    if (visitor == null) {
      return;
    }
    @SuppressWarnings("unchecked")
    T newData = (T) visitor.apply(getData());
    if (newData != null) {
      data = newData;
    }
  }
public void visitData(@Nullable Function visitor)