public @NotNull List<T> getElements(boolean isMarked) {
    Map<T, Boolean> elementMarkStates = getElementMarkStates();
    List<T> elements = new ArrayList<>();
    for (Map.Entry<T, Boolean> entry : elementMarkStates.entrySet()) {
      if (entry.getValue() == isMarked) {
        elements.add(entry.getKey());
      }
    }
    return elements;
  }
public @NotNull List<T> getElements(boolean isMarked)