Class FacetGroup

Represents a group of Facets

Facets in a group are combined with an OR operation

// FacetGroup with the version "1.16.5" or "1.17.1"
new FacetGroup(
// Combined with OR
new Facet(FacetType.Versions, FacetOperation.EQUALS, "1.16.5"),
new Facet(FacetType.Versions, FacetOperation.EQUALS, "1.17.1")
);

Constructors

  • Creates a new FacetGroup with the given facets. Facets in a group are combined with an OR operation

    Parameters

    • ...facets: Facet[]

      The facets to create the group with

    Returns FacetGroup

    // FacetGroup with the version "1.16.5" or "1.17.1"
    new FacetGroup(
    // Combined with OR
    new Facet(FacetType.Versions, FacetOperation.EQUALS, "1.16.5"),
    new Facet(FacetType.Versions, FacetOperation.EQUALS, "1.17.1")
    )

Methods

  • Gets the facets

    Returns Facet[]

    The facets

  • Stringifies the facet group

    Returns string

    The stringified facet group (e.g. ["categories:forge"] or ["versions:1.16.5", "versions:1.17.1"])