private Optional<T> getRememberedVisibility(T[] visibilityVariants) {
    final String stringValue = PropertiesComponent.getInstance().getValue(getPersistenceId());
    return Stream.of(visibilityVariants).filter(visibility -> visibility.toString().equals(stringValue)).findAny();
  }
private Optional<T> getRememberedVisibility(T[] visibilityVariants)