@Override
  public Facet<?> @NotNull [] getSortedFacets() {
    if (mySortedFacets == null) {
      final Facet<?>[] allFacets = getAllFacets();
      if (allFacets.length == 0) {
        mySortedFacets = Facet.EMPTY_ARRAY;
      }
      else {
        LinkedHashSet<Facet<?>> facets = new LinkedHashSet<>();
        for (Facet<?> facet : allFacets) {
          addUnderlyingFacets(facets, facet);
        }
        mySortedFacets = facets.toArray(Facet.EMPTY_ARRAY);
      }
    }
    return mySortedFacets;
  }
@Override
  public Facet<?> @NotNull [] getSortedFacets()