@Override
    public Object @NotNull [] getAllElements() {
      if (myElements == null) {
        myElements = new Object2IntOpenHashMap<>();
        myElementsArray = myPairs.toArray();
        for (int idx = 0; idx < myElementsArray.length; idx++) {
          Object element = myElementsArray[idx];
          myElements.put(element, idx);
        }
      }
      return myElementsArray;
    }
@Override
    public Object @NotNull [] getAllElements()