public final @NotNull List<E> getElements() {
    if (myElements.isEmpty()) {
      return Collections.emptyList();
    }
    return Collections.unmodifiableList(new ArrayList<>(myElements));
  }
public final @NotNull List<E> getElements()